Workflow

List workflows

Return a list of workflows that exist within the date range defined in the request.

get/workflow/runs

Request

Query parameters

typestring

Return workflows that match the specified workflow type. Use a type value returned by this endpoint, such as campaign.send.

next_tokenstring

An opaque token that is used to paginate results. Omit the next_token property to return the first page. Use the cursor value for next_token that was returned in a response to view the next page of results. The value cannot be empty.

statestring

Return workflows in the specified state: scheduled, running, succeeded, failed, running-with-failures, canceling, canceled, or paused.

limitinteger

The maximum number of records to include in a single page of results.

ended_fromstring date-time

A timestamp that defines the start (inclusive) of the time window in which workflows stopped running. Must be in ISO-8601 format and in UTC, and may be a date alone, such as 2024-06-01. Only workflows with an "ended_at" value that falls within the "ended_from"-"ended_to" time window will be returned.

created_fromstring date-time

A timestamp that defines the start (inclusive) of the time window in which workflows started to run. Must be in ISO-8601 format and in UTC, and may be a date alone, such as 2024-06-01. Only workflows with a "created_at" value that falls within the "created_from"-"created_to" time window will be returned.

api_versionstring

A supported version of the Amperity API. You may use the api-version request header instead of the api_version request parameter.

ended_tostring date-time

A timestamp that defines the end (exclusive) of the time window in which workflows stopped running. Must be in ISO-8601 format and in UTC, and may be a date alone, such as 2024-06-02. Only workflows with an "ended_at" value that falls within the "ended_from"-"ended_to" time window will be returned.

created_tostring date-time

A timestamp that defines the end (exclusive) of the time window in which workflows started to run. Must be in ISO-8601 format and in UTC, and may be a date alone, such as 2024-06-02. Only workflows with a "created_at" value that falls within the "created_from"-"created_to" time window will be returned.

with_totalboolean

Set this value to true to include a total count of all results. Default value: false. Obtaining the total count of all results can be an expensive operation when there is a high number of pages in the results set.

Headers

Amperity-Tenantstring required

The ID for the tenant to which a request will be sent.

Api-Versionstring required

A supported version of the Amperity API.

Response

List of workflows

next_tokenstring

The cursor value to use in a subsequent request to return the next page of results.

totalinteger

The total count of all results. This property is only returned when with_total is set to true in a request.

Example response

{
  "data": [
    {
      "created_at": "2024-06-19T04:00:18.764Z",
      "ended_at": "2024-06-19T04:03:10.119Z",
      "error": {
        "attribution": "customer",
        "data": {
          "error_code": "InvalidAccessKeyId",
          "id": "s3",
          "request_id": "Z47DXHNGJ7ZPMRVS",
          "retryable?": false
        },
        "message": "The credential does not provide access to the given resource. Please update\n                      the credential's access or try another credential.",
        "type": "amperity.plugin.error/invalid-credentials"
      },
      "id": "wf-20240619-14418-6UhqSe",
      "name": "Customer Attribute Daily",
      "state": "failed",
      "tenant": "acme2-max",
      "type": "campaign.send"
    }
  ],
  "next_token": "ZVEy1iwsKBs9a6H"
}

Changes

No recorded changes to this operation across all 1 revision of this API.