---
title: "Get Trigger"
method: GET
path: "/api/v1/triggers/{trigger_id}"
tags: ["triggers"]
---

# Get Trigger

`GET /api/v1/triggers/{trigger_id}`

Returns the requested trigger.

Args:
    trigger_id: ID of the trigger.
    hydrate: Flag deciding whether to hydrate the output model(s)
        by including metadata fields in the response.

Returns:
    The requested trigger.

## Path parameters

- `trigger_id` string, uuid, required

## Query parameters

- `hydrate` boolean

## Response `200`

Successful Response

- TriggerResponse — Response model for models.
  - `body` TriggerResponseBody — Response body for triggers.
    - `created` string, date-time, required
    - `updated` string, date-time, required
    - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
      - `body` UserResponseBody — Response body for users.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `active` boolean
        - `activation_token` string, nullable
        - `full_name` string
        - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
        - `is_service_account` boolean, required
        - `is_admin` boolean, required
      - `metadata` UserResponseMetadata — Response metadata for users.
        - `email` string, nullable
        - `external_user_id` string, uuid, nullable
        - `user_metadata` object
      - `resources` UserResponseResources — Class for all resource models associated with the user entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `action_flavor` string, required
    - `action_subtype` string, required
    - `event_source_flavor` string, nullable
    - `event_source_subtype` string, nullable
    - `is_active` boolean, required
  - `metadata` TriggerResponseMetadata — Response metadata for triggers.
    - `workspace` WorkspaceResponse, required — Response model for workspaces.
      - `body` WorkspaceResponseBody — Response body for workspaces.
        - `created` string, date-time, required
        - `updated` string, date-time, required
      - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
        - `description` string
      - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `description` string
    - `event_filter` object, nullable
    - `schedule` Schedule — Class for defining a pipeline schedule. Attributes: name: Optional name to give to the schedule. If not set, a default name will be generated based on the pipeline name and the current date and time. cron_expression: Cron expression for the pipeline schedule. If a value for this is set it takes precedence over the start time + interval. start_time: datetime object to indicate when to start the schedule. end_time: datetime object to indicate when to end the schedule. interval_second: datetime timedelta indicating the seconds between two recurring runs for a periodic schedule. catchup: Whether the recurring run should catch up if behind schedule. For example, if the recurring run is paused for a while and re-enabled afterward. If catchup=True, the scheduler will catch up on (backfill) each missed interval. Otherwise, it only schedules the latest interval if more than one interval is ready to be scheduled. Usually, if your pipeline handles backfill internally, you should turn catchup off to avoid duplicate backfill. run_once_start_time: datetime object to indicate when to run the pipeline once. This is useful for one-off runs.
      - `name` string, nullable
      - `cron_expression` string, nullable
      - `start_time` string, date-time, nullable
      - `end_time` string, date-time, nullable
      - `interval_second` string, duration, nullable
      - `catchup` boolean
      - `run_once_start_time` string, date-time, nullable
  - `resources` TriggerResponseResources — Class for all resource models associated with the trigger entity.
    - `action` ActionResponse, required — Response model for actions.
      - `body` ActionResponseBody — Response body for actions.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
          - `body` UserResponseBody — Response body for users.
            - `created` string, date-time, required
            - `updated` string, date-time, required
            - `active` boolean
            - `activation_token` string, nullable
            - `full_name` string
            - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
            - `is_service_account` boolean, required
            - `is_admin` boolean, required
          - `metadata` UserResponseMetadata — Response metadata for users.
            - `email` string, nullable
            - `external_user_id` string, uuid, nullable
            - `user_metadata` object
          - `resources` UserResponseResources — Class for all resource models associated with the user entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
        - `flavor` string, required
        - `plugin_subtype` 'webhook' | 'pipeline_run', required — All possible types of Plugins.
      - `metadata` ActionResponseMetadata — Response metadata for actions.
        - `workspace` WorkspaceResponse, required — Response model for workspaces.
          - `body` WorkspaceResponseBody — Response body for workspaces.
            - `created` string, date-time, required
            - `updated` string, date-time, required
          - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
            - `description` string
          - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
        - `description` string
        - `configuration` object, required
        - `auth_window` integer, required
      - `resources` ActionResponseResources — Class for all resource models associated with the action entity.
        - `service_account` UserResponse, required — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
          - `body` UserResponseBody — Response body for users.
            - `created` string, date-time, required
            - `updated` string, date-time, required
            - `active` boolean
            - `activation_token` string, nullable
            - `full_name` string
            - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
            - `is_service_account` boolean, required
            - `is_admin` boolean, required
          - `metadata` UserResponseMetadata — Response metadata for users.
            - `email` string, nullable
            - `external_user_id` string, uuid, nullable
            - `user_metadata` object
          - `resources` UserResponseResources — Class for all resource models associated with the user entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `event_source` EventSourceResponse — Response model for event sources.
      - `body` EventSourceResponseBody — ResponseBody for event sources.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
          - `body` UserResponseBody — Response body for users.
            - `created` string, date-time, required
            - `updated` string, date-time, required
            - `active` boolean
            - `activation_token` string, nullable
            - `full_name` string
            - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
            - `is_service_account` boolean, required
            - `is_admin` boolean, required
          - `metadata` UserResponseMetadata — Response metadata for users.
            - `email` string, nullable
            - `external_user_id` string, uuid, nullable
            - `user_metadata` object
          - `resources` UserResponseResources — Class for all resource models associated with the user entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
        - `flavor` string, required
        - `plugin_subtype` 'webhook' | 'pipeline_run', required — All possible types of Plugins.
        - `is_active` boolean, required
      - `metadata` EventSourceResponseMetadata — Response metadata for event sources.
        - `workspace` WorkspaceResponse, required — Response model for workspaces.
          - `body` WorkspaceResponseBody — Response body for workspaces.
            - `created` string, date-time, required
            - `updated` string, date-time, required
          - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
            - `description` string
          - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
        - `description` string
        - `configuration` object, required
      - `resources` EventSourceResponseResources — Class for all resource models associated with the code repository entity.
        - `triggers` PageTriggerResponse, required
          - `index` integer, required
          - `max_size` integer, required
          - `total_pages` integer, required
          - `total` integer, required
          - `items` TriggerResponse[], required
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `executions` PageTriggerExecutionResponse, required
      - `index` integer, required
      - `max_size` integer, required
      - `total_pages` integer, required
      - `total` integer, required
      - `items` TriggerExecutionResponse[], required
        - `body` TriggerExecutionResponseBody — Response body for trigger executions.
          - `created` string, date-time, required
          - `updated` string, date-time, required
        - `metadata` TriggerExecutionResponseMetadata — Response metadata for trigger executions.
          - `event_metadata` object
        - `resources` TriggerExecutionResponseResources — Class for all resource models associated with the trigger entity.
          - `trigger` TriggerResponse, required — recursive
        - `id` string, uuid, required
        - `permission_denied` boolean
  - `id` string, uuid, required
  - `permission_denied` boolean
  - `name` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/zenml-io/apis/zenml-2.md) · [All operations](https://skmtc.net/zenml-io/apis/zenml-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zenml-io/zenml-2/versions/febb01b8bce3/schema)
