Is there any API exposed which can list the ServiceNow tables which had changes i.e entries made in a certain time interval?

Shrinil
Tera Contributor

I need to make regular API calls on couple of ServiceNow tables to see if any new records were created in the time interval.

I want to extend the support from two to hundreds of ServiceNow tables.

So rather than making an API call to each of the table and getting an empty response for most of them, I was looking for an API which gives the information about which table was updated in a given time internal, so that I make API calls to only those tables.

Let me know if there exists such an API which can help me.

Thanks.

11 REPLIES 11

Alok Gupta5
Tera Guru
Tera Guru

Hello,

 

Yes for that you need Scripted Rest API which allows you to query multiple tables in single call.

 

Regards,
Alok Gupta

Thank you for your response. However I have 2 issues:

1. I went through the doc of Scripted REST API but could not understand how to use it or how is it helpful to me. It would be very helpful if you could show me its usage with an easy example.

2. As you say, Scripted REST API can be used to query multiple tables in single call, then how is it different from Batch API?

Thank you.

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Shrinil

If audit is enabled, changes will be logged in sys_audit table. The table contains all changes so it'll probably better to create a Scripted REST API to query between dates and return only the unique table names.

Thank you for your response. However I have 2 issues:

1. I queried sys_audit table but it does not seem to be of my help. It contains information about meta data of other tables. It does not tell me if an entry id made into another table or not.
Let me know if I'm wrong with this and if there is a way to know if an entry is made into any table.

2. I went through the doc of Scripted REST API but could not understand how to use it or how is it helpful to me. It would be very helpful if you could show me its usage with an easy example.

Thank you.