Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

REST GET with payload

dj21
Tera Expert

We are working on a SNOW solution to provide a custom table data to an external system using Scripted REST GET API.

External system has a list of sysids and would invoke the GET API with a request(JSON payload - object array of sysids). Expectation on service now is to query the custom table and return the record values in the response(JSON Payload).

So on the API GET resource I have tried to retrieve the payload as "request.body"; But this options looks not possible as request.body is allowed on SNOW only for POST/ PUT.

Please suggest if there are other possible ways to retrieve the request as JSON.

GET error.jpg

5 REPLIES 5

Hi Ankur


Thanks for the suggestion, We implemented a simplified option to make a GET call with url param and not a JSON payload.