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

Not applicable

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?

6 REPLIES 6

Muhammad Khan
Mega Sage
Mega Sage

Hi,

 

You will need to create Scripted Rest API with delete resource.

 

Hopefully, this will give you a direction.

Ethan Davies
Mega Sage
Mega Sage

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.

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader