GET
/
polling
/
executions
curl --request GET \
  --url https://core.us.stedi.com/2023-08-01/polling/executions \
  --header 'Authorization: <api-key>'
{
  "nextPageToken": "<string>",
  "items": [
    {
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "executionId": "<string>",
      "status": "COMPLETED",
      "direction": "INBOUND",
      "transactionCount": 123,
      "faultCount": 123,
      "faultCode": "DELIVERY_FAILURE",
      "faultMessage": "<string>",
      "fileType": "CSV",
      "retryable": true,
      "parentExecutionId": "<string>",
      "childExecutionId": "<string>",
      "partnershipId": "<string>",
      "connectionType": "bucket",
      "connectionId": "<string>",
      "source": {
        "dirname": "<string>",
        "name": "<string>"
      },
      "operation": "<string>"
    }
  ]
}

This endpoint returns file executions that Stedi processed after the specified startDateTime.

Executions are ordered from oldest to newest according to the processedAt property. This is exclusive of the startDateTime. For example, if the provided startDateTime is 2023-08-10T18:00:00Z, an execution processed at exactly that time would not be included in the results. There is also a fifteen-second window where newly created executions are excluded, meaning Stedi returns results up to fifteen seconds before the time of your request. This functionality accounts for any network latency or clock drift within the systems to ensure you don’t miss any executions.

Polling with page tokens

We don’t recommend polling using startDateTime only. Due to the exclusive nature of startDateTime, you could potentially miss an execution if two executions occur at the exact same time and are on the edge of a pagination. Instead, you should use pageToken.

After the initial request, you can poll again immediately using pageToken to continue iterating through the pages of executions. The endpoint always returns a nextPageToken, regardless of whether additional executions match the request criteria. If the items array is empty, continue using the provided nextPageToken to poll for new executions. New executions will be returned when available.

We recommend storing pageToken values as part of your polling process. They don’t expire, allowing you to start from that point in the execution stream again if you need to catch a system up to date or recover from a failure.

Note that pageToken values are unique per request, opaque, and shouldn’t be parsed or modified in any way. They are not guaranteed to be in any particular format, and may change in the future.

Authorizations

Authorization
string
header
required

A Stedi API Key for authentication.

Query Parameters

pageSize
number

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.

Required range: x >= 1
pageToken
string

A token returned by a previous call to this operation in the nextPageToken. If not specified, Stedi returns the first page of results.

Required string length: 1 - 1024
startDateTime
string

An ISO 8601 formatted string. For example 2023-08-28T00:00:00Z. Stedi returns executions processed after this time.

Response

200
application/json
ListPollingExecutions 200 response
items
object[]
required
nextPageToken
string

The token used for pagination

Required string length: 1 - 1024