How to build a request object in REST API Explorer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 04:01 PM
Hi,
I have this data with me for which I am using REST API explorer to test it first:
Endpoint | HTTP Method | Request Parms/Header/body | HTTP Code | Response Body | Cpmments |
/servicenow/revoke | POST | { "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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 08:11 PM
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.