How to delete a record from a ServiceNow table through scripted REST API?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 09:39 AM
Scenario: There is a table name "x_test", in this table i need to delete a record through JSON request in "Request body"
Payload:
{"name": "xyz"}
is there any way to achieve this solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 09:49 AM
Hi,
You will need to create Scripted Rest API with delete resource.
Hopefully, this will give you a direction.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 09:50 AM
Hey VJ,
Take a look at this article here, should contain all you need.
Thanks,
Ethan
Please mark my answer as correct or helpful if it aided in solving your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 09:57 AM
Hi,
Didn't get completely the use-case
You can use OOB Table API with DELETE method
OR
You can use Scripted REST API with Delete HTTP method
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2022 11:27 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader