Logs API: Next Link Response Header sent even when no further records are to be displayed

Hi,

We are upgrading our implementation from /events to /logs API. What I have observed is that if the changed objects count is 100 and I pass the limit as 200 in the first call, then the rel=“next” URL is sent, which ideally should be null as with other API’s. The response using next URL is blank.

Is this a bug with the /logs API?

First URL used:
/api/v1/logs?limit=200&since=2018-08-27T07:37:46.046Z&filter=eventType eq “user.lifecycle.delete.initiated” and outcome.result eq “SUCCESS”

Next URL in response:
/api/v1/logs?since=2018-08-27T07%3A37%3A46.046Z&limit=200&filter=eventType+eq+%22user.lifecycle.delete.initiated%22+and+outcome.result+eq+%22SUCCESS%22&after=1535356288214_1

Regards,
Pranav

@tom, Any idea if this is indeed a bug?

This is the expected behavior of the System Log API. See the Request Types section:

Polling Requests
Polling requests are for situations when you want to consume an ongoing stream of events from Okta.

In your case, because you did not specify an until parameter, the request is polling (unbounded). It will always have a next link that you can poll to see if there are any new matching items.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.