2021 Jul 20 10:42 AM
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
2021 Jul 20 12:10 PM
Hi Vinay
Strings need single quotes, GUID values do not. When in doubt, look to the standard (search for guidValue) 😄
Regards,
Morten
2021 Jul 20 12:10 PM
Hi Vinay
Strings need single quotes, GUID values do not. When in doubt, look to the standard (search for guidValue) 😄
Regards,
Morten
2021 Jul 21 6:16 AM
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
2021 Jul 21 9:55 AM
2021 Jul 20 11:33 PM
Look here also:
http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html
Search for "Primitive Literals".