Workflow

Run workflow

Start a workflow. Supports running courier groups, orchestration groups, and campaigns.

post/workflow/runs

Request

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.

Request body

api_versionstring

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

config_idstring required

The configuration ID of the courier group, orchestration group, or campaign to run. To find it, open the menu in the row for the courier group on the Sources page, the orchestration group on the Destinations page, or the campaign on the Campaigns page, and select Copy ID.

range_fromstring date-time

Courier groups only. A timestamp that defines the start (inclusive) of the time window for which couriers pull files. Must be in ISO-8601 format and in UTC. Without range_to, couriers pull files for the 24 hours starting at range_from, so a date alone selects that day. Required for courier groups that pull files from cloud storage: SFTP, Amazon S3, Azure Blob Storage, or Google Cloud Storage.

range_tostring date-time

Courier groups only. A timestamp that defines the end (exclusive) of the time window for which couriers pull files. Must be in ISO-8601 format and in UTC. Requires range_from; a request with range_to alone returns a 400 response.

run_modestring

Courier groups only. The run mode for the courier group workflow. full pulls data, refreshes domain tables, runs Stitch, updates databases, and then runs every activation associated with the workflow, including orchestrations, campaigns, and journeys. refresh stops after updating databases. source pulls data and refreshes domain tables. Defaults to the run mode configured for the courier group; any other value returns a 400 response.

Response

Workflow details for newly launched workflow

created_atstring date-time required

Time the workflow was created

current_versionstring

The current ent version associated with the workflow

ended_atstring date-time

Time the workflow reached a terminal state

idstring required

Unique identifier for the workflow

launched_versionstring

The ent version that was launched with the workflow

namestring

Human-readable identifier for the workflow

principal_emailstring

Email address for who or what created the workflow

principal_idstring

Principal id for who or what created the workflow

principal_namestring

Human-readable name for who or what created the workflow

statestring required

Current workflow state.

tenantstring required

The unique identifier for the tenant.

typestring required

Keyword identifying the type of workflow

warn_after_msnumber double

The time in milliseconds we should send a running long duration warning

Example response

{
  "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"
}

Changes

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