v18

latestOpenAPI 3.1.0raw.githubusercontent.com2023-07-1410950.6 KB
Triggers

Get trigger

Retrieve information about an existing trigger

get/triggers/{trigger-name}

Response

Trigger exists

namestring

A human-readable name to identify the trigger. The server generates a name if this is not supplied. This has to be unique within a project.

descriptionstring

A human-readable description of the trigger. This can be helpful to identify the purpose of the trigger.

created_atstring date-time

RFC3339 Datetime when this trigger was created

updated_atstring date-time

RFC3339 datetime when this trigger was updated

status'scheduled' | 'on_demand' | 'paused' | 'expired' | 'cancelled'

Status of the trigger.

  • scheduled trigger will run according to their trigger.schedule
  • on_demand trigger is not configured to run on a schedule, it can only run manually.
  • paused trigger has a schedule but is currently paused. When time is due for it to run, it will not create the run but will account for the skipped run as if it was executed (remaining is reduced if schedule has limit)
  • expired triggers are scheduled triggers that exhausted their runs or have no future timepoints.
  • cancelled triggers cannot be rund. Those have been cancelled manually via the /triggers/{trigger-name}/cancel API.
last_ran_atstring date-time

RFC3339 datetime of the latest run of this trigger.

estimated_future_runsstring[]

The list of estimated future run timestamps of this trigger (clipped at 5 points or the number of remaining runs, whichever smaller).

Example response

{
  "name": "my example trigger",
  "description": "A reminder to sign-up to our promotion",
  "created_at": "2023-03-25T17:43:23.654278298Z",
  "updated_at": "2023-03-25T17:43:23.654278298Z",
  "action": {
    "url": "https://example.com/my-own-endpoint",
    "timeout_s": 6.2,
    "retry": {
      "max_num_attempts": 5,
      "delay_s": 10
    }
  },
  "payload": {
    "body": "My Message Payload",
    "content_type": "application/json; charset=utf-8",
    "headers": {
      "X-Custom-Header": "Custom-Value"
    }
  },
  "schedule": {
    "cron": "*/30 * * * * *",
    "timezone": "Etc/UTC",
    "type": "recurring"
  },
  "status": "scheduled",
  "estimated_future_runs": [
    "2023-06-22T18:00:00Z"
  ]
}