Poll Executions
This endpoint is used to regularly poll for new executions that have been processed by Stedi.
You must define one of startDateTime
or pageToken
when making a request.
You may optionally define a pageSize
. The minimum pageSize
is 1, and the maximum pageSize
is 1000. The default is 100.
startDateTime
takes a string in ISO 8601 format. (ex: 2023-08-10T18:00:00Z
).
startDateTime
must be set to at least 1 minute in the past.
The results will contain executions that occurred after this startDateTime
. Starting from the oldest to newest executions ordered by the processedAt
field. Note, this is exclusive of the startDateTime
, a execution occuring at exactly 2023-08-10T18:00:00Z
for instance, would not be included. In addition, there is a 15 second window where newly created executions will not be included to account for any network latency or clock drifts within the systems to ensure you do not miss any executions.
Each request will always return a nextPageToken
, regardless of whether there are new executions or not.
We DO NOT recommend trying to roll your own polling strategy leveraging startDateTime
only. There are edge cases around two executions occuring at the exact same time and being on the edge of a pagination which could cause you to miss one due to the exclusive nature of startDateTime
. We recommend using pageToken
’s instead.
When making subsequent polling requests (not initiating with startDateTime
), the pageToken
can be used to continue iterating through pages of executions. Usage of the pageToken
guaruntees you will not miss any executions on the stream. If at any point there are no more new executions in the item
array, you will still receive a nextPageToken
. Continue to use this token to poll for new executions. Once there are new executions, they will be returned in the item
array.
pageToken
’s you have retrieved can serve as checkpoints. They do not expire, and you can always start from that point in the execution stream again if you need to catch a system up or recover from a failure. Storing pageToken
’s as part of your polling process is encouraged.
pageToken
’s are unique per request, opaque, and should not be parsed or modified in any way. They are not guaranteed to be in any particular format, and may change in the future.
Authorizations
A Stedi API Key for authentication.
Query Parameters
The maximum number of elements to return in a page. You can set this to a maximum of 500 elements. If not specified, the default is 100.
A token returned by a previous call to this operation in the nextPageToken
. If not specified, Stedi returns the first page of results.
An ISO 8601 formatted string. For example 2023-08-28T00:00:00Z
. Stedi returns executions processed after this time.
Response
The token used for pagination
Was this page helpful?