The CreatorCon Call for Content is officially open! Get started here.

Table API request only for records that has not been requested yet

caiooliveira
Tera Expert

There is some way to make a table api endpoint that only request records that was not retrieved before? Something like, when the record is retrieved once, he is marked as 'retrieved' on a field?

The objective is to only retrieve from this table api endpoint the records that was not retrieved before.

2 REPLIES 2

James Chun
Kilo Patron

Hi @caiooliveira,

 

Some options to explore:

  • Store the retrieved records within the client system (i.e. the system invoking the ServiceNow Table API). Then exclude them in the next API call.
  • Use a date/time filter when retrieving the records. e.g. get all records that were created after 20xx/xx/xx and store the last date/time filter in the client system.
  • Create a custom field or use a tag field (not sure if a tag will work tho) to indicate that a record has been retrieved previously and use the field within the query parameter.

I would recommend the 2nd option but I guess it depends on your use case.

Can you elaborate on why you are doing this?

 

Cheers

I cannot do anything on client system.. I need to do all the work inside the instance.. There is some way to update a field using table api? I think, if I could do this, I would just need to create a custom field as you said and add filter to endpoint...