The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to build a request object in REST API Explorer

geet
Tera Guru

Hi,

 

I have this data with me for which I am using REST API explorer to test it first:

EndpointHTTP MethodRequest Parms/Header/bodyHTTP CodeResponse BodyCpmments
/servicenow/revokePOST{
"revocations": [
{
"id": "aq-7be5639365248446"
},
{
"id": "aq-0dd6e1da65248446"
}
]
}
200{
"revocations": [
{
"id": "aq-7be5639365248446",
"result": "error revoking request"
},
{
"id": "aq-0dd6e1da65248446",
"result": "OK"
}
]
}
Request
Request object has a revocations list of objects containing the request id as a string

Response
Response object returns the original requested list of revocations with either "OK" as the result or an error string

 

I am trying to test the above in REST API Explorer taking this as an example for another table:
My question is related to "Revocations" parameter.
How to define it in post method and where to define it?

1 REPLY 1

Tony Chatfield1
Kilo Patron

Hi, I do not see 'revoke' as a documented API method
Account API | ServiceNow Developers

Or a table named 'revoke' in an OOB PDI

Can you clarify your configuration and objective\intention, provide link to the documentation involved?


If you want to update related records with no documented API method to deliver the requirement, you would probably need to post your data to a temp table and transform to your target, or use a scripted rest api endpoint and then process the data into your target table.