We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Detect deleted records using REST API

Hapatil
Tera Contributor

Uusing servicenow as a web service provider and will be reading records using TABLE API for a given duration. For same duration, want to know how to find deleted records using Rest API.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Hapatil 

Deletion of records may or may not be stored based on auditing.

Use the Deleted Records module to restore a deleted record 

you can check this in sys_audit_delete table; but providing access to external systems for this OOB table is not a good practice

AnkurBawiskar_0-1694427877290.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

10 REPLIES 10

Ankur Bawiskar
Tera Patron

@Hapatil 

Deletion of records may or may not be stored based on auditing.

Use the Deleted Records module to restore a deleted record 

you can check this in sys_audit_delete table; but providing access to external systems for this OOB table is not a good practice

AnkurBawiskar_0-1694427877290.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Rest API explorer does not show 'sys_audit_delete'. Any reason for same?

@Hapatil 

that's system table so it won't show.

you need to add that table in the property then it will start showing

glide.ui.permitted_tables

AnkurBawiskar_0-1694429131272.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

this works for rest api explorer, but how do i achieve same using curl?

@Hapatil 

Glad to know.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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