Skip to main content

I am calling the Endpoint Status GSM API using postman and providing a date and time for the modifiedSince parameter. REST API Call below

GET /service/api/status/gsm/{keyCode}?batchSize=1000 &modifiedSince={modifiedSince}

I would expect to see the count of records being returned to steadily increment each time I execute this request, since new records or updated records get returned,  but what I am seeing is confusing and I was hoping someone could help clarify.

lets say on my first call I want to see all records that were modified since 11am today. I should see (let’s say in this use case) 100 records returned with no continuation token or URI since my batch size is set to max (1000).

If I run the exact same query again a few seconds later I should see the same data or maybew 1 or 2 extra records depending on how busy my system is.

What I am seeing instead is less records being returned, often along with a continuation token.

I never seem to get a consistent result back, at times I see what I would expect to see, and at other times this anomaly creeps in where I get a continuation token back and less records than I would expect.

This is a problem for me since I am writing a data pipeline to bring this data in to report on that dates agent status and I am not confident that the API is working as expected, or maybe I have a big misunderstanding of how the API works.

Is this something anyone else has seen or can someone shed some further light here for me please?

 

Thanks

Matt

 

 

Hello Matt,

Thanks for raising this. Can you DM me with a few more details so that we can analyse the logs in your instance.

 

Regards,

Aqil


Hello Matt,

I hope the following clarification of how the API works helps:

1.AgentStatus will return varying sizes of data. This is because the data  spans across multiple servers and data volumes in the backend. The results set obtained is dependent upon the overall system load at the time.

2.The continuation token is issued signalling that there is still further data to query which explains why you receive one when you see less data than expected.

3.Endpoint Status database is updated in a batched manner so there maybe lag in refreshed data being served.

I  hope this helps to explain what you are seeing.

Thanks,

Aqil


Hi Aquila. Thanks for the reply, the documentation indicates

batchSize

Specifies the number of entries returned per request. Valid values range from 1 to 1000.

ContinuationToken

Provides a continuation token for follow-up calls if more data is available than the given batch size.

So if the first batch returns 67 entries and a continuation token this can be somewhat misleading and contrary to the documentation. However if  the entries returned do not equate to the “count” measure in the result I think I get it. Is that the case?

I also am not receiving any results for statusRefreshTime on any of my agents, just null

Also what field does the modifiedSince filter on, is it lastseen?

I have dm’d you 

Many thanks

Matt


Hi Aquila

 

I have also dm’d you.

You mentioned you would feedback to the dev team on the issues I am having with the API. Have they come back with anything. 

It appears the firstseen column returns no data either

 

Many thanks

Matthew Lang

 


Hi Matthew,

I have sent you a DM at which point I think we can close this particular thread if thats ok?

Thanks,

Aqil


Sure, thanks Aquila


Reply