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.”

In SETUP > Enable Features > SuiteCloud > SuiteTalk (Web Services), I have REST WEB SERVICES, REST RECORD SERVICE (BETA), REST QUERY SERVICE (BETA) options all checked.
I am unaware of other settings that are necessary to do a simple filter.  What is it that I am missing? Is there something I can check that I may have overlooked?
Rookie Asked on November 20, 2020 in SuiteTalk.
Add Comment
2 Answer(s)

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

 

 

 

Beginner Answered 4 days ago.

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.

4 days ago.
Add Comment

Complete all the REST Web Services Prerequisites and Setup, including adding the required permissions to the role you are using

Intermediate Answered 4 days ago.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor