Triggers

List trigger subscriptions on a connection

Changed on

Lists the trigger subscriptions on a connection, newest first. Use this endpoint to show which accounts are subscribed to which triggers, and to check whether each subscription is delivering. Pass the connection ID in the path. Filter by trigger_name and statuses, and page with page_size and page_token. For a polled trigger, each subscription returns both the interval you requested and the interval it actually runs at, which can be slower when the environment's polling budget is shared across many subscriptions. A polled subscription also returns its poll state: when it last ran, why the last run failed, and whether polling is backed off. Returns one page of subscriptions, the next and previous page tokens, total_size, and status_counts, which counts subscriptions per status across every page.

get/api/v1/connections/{connection_id}/trigger-subscriptions

Request

Path parameters

connection_idstring required

ID of the connection, in this environment. Up to 64 characters.

Query parameters

trigger_namestring

Narrows the list to one trigger's subscriptions. Omit it to list every subscription on the connection.

statusesstring[]

Narrows the list to subscriptions in these statuses, at most 4. Omit it for every status; TRIGGER_SUBSCRIPTION_STATUS_UNSPECIFIED is refused. Does not affect status_counts, so a client filtering to one status still sees the totals for all of them.

  • ACTIVE: Delivering. For a polled trigger, at the requested interval.
  • THROTTLED: Running slower than requested, not stopped. Still delivering.
  • PAUSED: Stopped by the customer.
  • PAUSED_CREDENTIAL: Stopped because the account's credential no longer works. Distinct from PAUSED so the two have distinguishable explanations for missing events.
page_sizeinteger

How many subscriptions to return. Defaults to 10; a larger value than 100 is capped at 100 rather than refused.

page_tokenstring

The next_page_token or prev_page_token from a previous response. Omit it to read the first page. A value that is not a token from a previous response is refused with 400.

Response

One page of the connection's trigger subscriptions, plus page tokens, the total match count and per-status counts

next_page_tokenstring

Pass as page_token to read the next page. Empty when there is no next page.

prev_page_tokenstring

Pass as page_token to read the previous page. Empty when there is no previous page.

status_countsobject

How many subscriptions sit in each status, keyed by the status name. Counted over the whole matching set rather than the current page, so a client can show per-status totals without fetching every page. Honours trigger_name but ignores statuses, so the totals stay still while a customer switches between status filters.

total_sizeinteger

How many subscriptions match the filters in total, across every page.

Example response

{
  "next_page_token": "<next_page_token>",
  "prev_page_token": "<prev_page_token>",
  "status_counts": {
    "ACTIVE": 93,
    "PAUSED": 3,
    "PAUSED_CREDENTIAL": 4
  },
  "subscriptions": [
    {
      "config": {
        "channel": "C0123456789"
      },
      "connected_account_id": "ca_123456789012345",
      "connected_account_identifier": "user_123",
      "connection_id": "conn_123456789012345",
      "effective_interval_seconds": 60,
      "id": "trgs_123456789012345",
      "poll_state": {
        "last_error": "The provider is rate-limiting requests. Polling resumes automatically after a backoff."
      },
      "provider": "slack",
      "requested_interval_seconds": 60,
      "trigger_name": "slack_message_posted"
    }
  ],
  "total_size": 100
}

Changes