APIs & Integrations

vurazov
Member

How to get new/updated engagements

Hello!

I need to get engagements created today, for example.
I’m using Get all engagements API method, but not sure I’m using it properly as response missing some engagements.

According to documentation I should use offset param (and set engagement id as value) in request to get engagements created after it ( I may be wrong here as ID could be not just incremented value ).

Anyway, it works well if I use it for the first time.
Example: I have 2 pages of results, so I do 2 requests and use offset param from the response for the first request as a value of offset param in the second request, and it works fine.

Next time I only want to load new engagements, so I use id of last loaded engagement from the first request as a value for offset param and in response I only have engagement with that ID and nothing more (actually I have plenty of notes made after the first request).

So, the question is: how to get new engagements?
And updated engagements if possible too?

Thanks in advance.

0 Upvotes
2 Replies 2
vurazov
Member

How to get new/updated engagements

Hello @dadams, could you give any help with this?
I would really appreciate any explanation.

Thanks

0 Upvotes
vurazov
Member

How to get new/updated engagements

I’ve found an interesting bug.

If I load all engagements by one request I get all notes.
If I divide it into parts by setting limit param - I’m missing at least one note (which I was watching).

Update:
There is no bug - it was a browser cache.

I did some tests and found out following:
engagements in response are sorted neither by DATE nor by ID and at 1st page (in paged results) I can get the latest engagement.

The question still the same: how to get new engagements?

0 Upvotes