Can we get the data of activity using rest APIs

kiran kumar m1
Tera Contributor

can we get activity data using rest APIs ?

 

 

kirankumarm1_0-1749460615689.png

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@kiran kumar m1 

activity tracks what is happening on each of the table's field, when it was changed and what was the previous and current value

It's store in sys_audit table and it's a system table

You should not allow direct access to that table via API

what's your business requirement for this? what the 3rd party wants?

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

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

Hi @Ankur Bawiskar , I want the fetch the activity details and put that details in a field in a different instance using rest APIs

@kiran kumar m1 

You can send details from 1 instance to another whenever a field changes, why to send complete activity details?

For your question then have a scripted REST API developed in instance A and consume that from instance B

Instance A's scripted REST API will send what you want in API response and then in instance B add those details in whichever field you want.

But remember the scripted REST API in instance A will query Audit table and will have performance impact.

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

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

@kiran kumar m1 

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
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader