Table API request only for records that has not been requested yet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 01:29 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 02:12 PM - edited ‎04-17-2024 02:14 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2024 01:18 PM
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...