REST query using q param getting …does not have permission…
I can query an inventory item successfully using this format:
…./record/v1/inventoryItem/2062
returns the item JSON
…”displayName”: “blah”,…
Querying using the q parameter like this:
…,/record/v1/customer?q=displayName START_WITH bla
returns a 400 Bad Request, “Your current role does not have permission to perform this action.”
When I have seen this my RESTlet was running a Saved Search which was accessing records for which the REST role did not have access. Options:
Run your search “Unrestricted”
or
Give your REST role access to the records that it needs to return what you are requesting
Thanks for you reply.
I’ve read that there’s a difference between REST and RESTlet. RESTlet being a slightly lighter version of REST in this context. I don’t know if that matters here though, probably not.
If I query by adding the ID in the path I get a valid response. When I add the q parameter, I get the 400 bad request. I wonder if the query means the response will be a collection of InventoryItem’s. I am not certain that I have that configured. Under Permissions for the REST role I’m using has Full permissions to Item Collection. I do not see an option for Inventory Item Collection. I can only assume that I have it configured correctly. This is very frustrating.
Any help is appreciated.
Thanks.
Complete all the REST Web Services Prerequisites and Setup, including adding the required permissions to the role you are using