Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to know when to apply single quote in URL?

0 Kudos

Hi, I am trying to delete an entry, I used the Olingo library and wrote java code, and also replicate the below mention request in postman.

While testing first when I am using this endpoint for deleting an entry https://services.odata.org/TripPinRESTierService/(S(t3zbjkgooaodo2gkucai4qbw))/People('russellwhyte') in which russellwhite comes under singles quotes, then it is working fine.

But when i am using https://orga96614eb.api.crm8.dynamics.com/api/data/v9.2/accounts('25373cd9-9ae8-eb11-bacb-000d3ac9969a') in which GUID comes under single quotes is not working and giving response 400


Later when i removed single quotes from GUID, using URL https://orga96614eb.api.crm8.dynamics.com/api/data/v9.2/accounts(25373cd9-9ae8-eb11-bacb-000d3ac9969...

then it worked fine.

So, why is that, and how does one comes to know when to use single quotes in URI? Please guide

1 ACCEPTED SOLUTION

MortenWittrock
Active Contributor

Hi Vinay

Strings need single quotes, GUID values do not. When in doubt, look to the standard (search for guidValue) 😄

Regards,

Morten

4 REPLIES 4

MortenWittrock
Active Contributor

Hi Vinay

Strings need single quotes, GUID values do not. When in doubt, look to the standard (search for guidValue) 😄

Regards,

Morten

0 Kudos

Thanks, Morten, I went through the document and was able to find the guidValue. Could you please let me know one more thing that what is the meaning of all others are quoted and prefixed in the below screenshot?

Like what and how should be the value. If you could give an example then it would be a great help.

I am assuming that only String will be the only data type that will be in single quotes.

Thank you

0 Kudos

Hi vinaysharma27

"Quoted and prefixed" simply means that there is a prefix before the first single quote, like geometry'.....'. This tells them apart from e.g. strings.

Regards,

Morten

evanireland
Advisor
Advisor