> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lists options for configuring AI Automation triggers

> Returns the source-of-truth options used by the AI Automation editor.



## OpenAPI

````yaml https://rootly-heroku.s3.amazonaws.com/swagger/v1/swagger.json get /v1/ai_automations/trigger_options
openapi: 3.0.1
info:
  title: Rootly API v1
  version: v1
  license:
    name: Rootly
    url: https://rootly.com
  description: >+
    # How to generate an API Key?

    - **Organization dropdown** > **Organization Settings** > **API Keys**


    # JSON:API Specification

    Rootly is using **JSON:API** (https://jsonapi.org) specification:

    - JSON:API is a specification for how a client should request that resources
    be fetched or modified, and how a server should respond to those requests.

    - JSON:API is designed to minimize both the number of requests and the
    amount of data transmitted between clients and servers. This efficiency is
    achieved without compromising readability, flexibility, or discoverability.

    - JSON:API requires use of the JSON:API media type
    (**application/vnd.api+json**) for exchanging data.


    # Authentication and Requests

    We use standard HTTP Authentication over HTTPS to authorize your requests.

    ```
      curl --request GET \
    --header 'Content-Type: application/vnd.api+json' \

    --header 'Authorization: Bearer YOUR-TOKEN' \

    --url https://api.rootly.com/v1/incidents

    ```


    <br/>


    # Rate limiting

    - There is a default limit of **5** **GET**, **HEAD**, and **OPTIONS** calls
    **per API key** every **60 seconds** (0 hours). The limit is calculated over
    a **0-hour sliding window** looking back from the current time. While the
    limit can be configured to support higher thresholds, you must first contact
    your **Rootly Customer Success Manager** to make any adjustments.

    - There is a default limit of **3** **POST**, **PUT**, **PATCH** or
    **DELETE** calls **per API key** every **60 seconds** (0 hours). The limit
    is calculated over a **0-hour sliding window** looking back from the current
    time. While the limit can be configured to support higher thresholds, you
    must first contact your **Rootly Customer Success Manager** to make any
    adjustments.

    - When rate limits are exceeded, the API will return a **429 Too Many
    Requests** HTTP status code with the response: `{"error": "Rate limit
    exceeded. Try again later."}`

    - **X-RateLimit headers** are included in every API response, providing
    real-time rate limit information:
      - **X-RateLimit-Limit** - The maximum number of requests permitted and the time window (e.g., "1000, 1000;window=3600" for 1000 requests per hour)
      - **X-RateLimit-Remaining** - The number of requests remaining in the current rate limit window
      - **X-RateLimit-Used** - The number of requests already made in the current window
      - **X-RateLimit-Reset** - The time at which the current rate limit window resets, in UTC epoch seconds

    # Pagination

    - Pagination is supported for all endpoints that return a collection of
    items.

    - Pagination is controlled by the **page** query parameter


    ## Example

    ```
      curl --request GET \
    --header 'Content-Type: application/vnd.api+json' \

    --header 'Authorization: Bearer YOUR-TOKEN' \

    --url https://api.rootly.com/v1/incidents?page[number]=1&page[size]=10

    ```

  x-logo:
    url: https://rootly-heroku.s3.us-east-1.amazonaws.com/swagger/v1/logo.png
servers:
  - url: https://api.rootly.com
security: []
paths:
  /v1/ai_automations/trigger_options:
    get:
      tags:
        - AIAutomations
      summary: Lists options for configuring AI Automation triggers
      description: Returns the source-of-truth options used by the AI Automation editor.
      operationId: GetAIAutomationTriggerOptions
      responses:
        '200':
          description: OAuth Automations read scope permits access
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ai_automation_trigger_options'
        '403':
          description: AI Automations are disabled
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_list'
        '404':
          description: OAuth Skills read scope does not permit access
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_list'
      security:
        - bearer_auth: []
components:
  schemas:
    ai_automation_trigger_options:
      type: object
      description: >-
        Options for configuring AI Automation triggers and destinations.
        `sources` lists each trigger source with its events, condition fields
        and operators. Send triggers as rows in `triggers`: schedule rows take
        `schedule_rrule` or the preset fields, and incident, alert, Slack and
        webhook rows take `event_name` plus `conditions` as `[{field, operator,
        values}]`, all of which must match. `choice` values must match one of
        the field's choices (case-insensitive), `text` values are free-form, and
        `none` operators take no value. Skills are listed by `GET
        /v1/ai_skills?filter[invocable_by]=automation`; Slack channels, users
        and user groups are listed by `GET /v1/ai_automations/slack_channels`,
        `/slack_users` and `/slack_user_groups`. Slack `channel`, `user`,
        `item_user` and `usergroup` conditions take Slack IDs; `matches_regex`
        takes Ruby regular expressions (case-insensitive, at most 500
        characters). `schedule_rrule` accepts custom RRULEs using
        `rrule_frequencies`. Any IANA timezone resolved by
        `ActiveSupport::TimeZone[...]` is accepted; `timezones` is the editor's
        list.
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              enum:
                - ai_automation_trigger_options
            type:
              type: string
              enum:
                - ai_automation_trigger_options
            attributes:
              type: object
              properties:
                sources:
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        enum:
                          - schedule
                          - incident
                          - alert
                          - slack
                          - webhook
                      label:
                        type: string
                      events:
                        type: array
                        items:
                          type: string
                          enum:
                            - incident.created
                            - incident.updated
                            - incident.status_changed
                            - incident.severity_changed
                            - incident.resolved
                            - incident.cancelled
                            - alert.created
                            - alert.acknowledged
                            - alert.resolved
                            - slack.message_posted
                            - slack.reaction_added
                            - slack.usergroup_mentioned
                            - webhook.received
                      fields:
                        type: array
                        items:
                          type: object
                          properties:
                            value:
                              type: string
                              description: >-
                                Field token to send as a condition's `field`.
                                Custom alert fields use `alert_field:<id>`.
                            label:
                              type: string
                              description: Display name for custom alert fields.
                            requires_key:
                              type: boolean
                              description: >-
                                True for the alert and webhook `payload` fields,
                                which need a JSONPath `key`.
                            operators:
                              type: array
                              items:
                                type: string
                            choices:
                              type: array
                              items:
                                type: object
                                properties:
                                  value:
                                    type: string
                                  label:
                                    type: string
                                required:
                                  - value
                                  - label
                          required:
                            - value
                            - operators
                            - choices
                          additionalProperties: false
                    required:
                      - value
                      - label
                      - events
                      - fields
                    additionalProperties: false
                trigger_kinds:
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        enum:
                          - schedule
                          - event
                      label:
                        type: string
                    required:
                      - value
                      - label
                    additionalProperties: false
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        enum:
                          - incident.created
                          - incident.updated
                          - incident.status_changed
                          - incident.severity_changed
                          - incident.resolved
                          - incident.cancelled
                          - alert.created
                          - alert.acknowledged
                          - alert.resolved
                          - slack.message_posted
                          - slack.reaction_added
                          - slack.usergroup_mentioned
                          - webhook.received
                      source:
                        type: string
                        enum:
                          - schedule
                          - incident
                          - alert
                          - slack
                          - webhook
                      label:
                        type: string
                      condition_fields:
                        type: array
                        items:
                          type: string
                          enum:
                            - severity
                            - status
                            - to_status
                            - incident_type
                            - service
                            - group
                            - environment
                            - title
                            - from_severity
                            - to_severity
                            - changed_fields
                            - channel
                            - usergroup
                            - user
                            - item_user
                            - emoji
                            - text
                            - sender_type
                            - payload
                            - summary
                            - description
                            - urgency
                            - source
                            - group_status
                    required:
                      - value
                      - label
                      - condition_fields
                    additionalProperties: false
                conditions:
                  type: object
                  properties:
                    fields:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            enum:
                              - severity
                              - status
                              - to_status
                              - incident_type
                              - service
                              - group
                              - environment
                              - title
                              - from_severity
                              - to_severity
                              - changed_fields
                              - channel
                              - usergroup
                              - user
                              - item_user
                              - emoji
                              - text
                              - sender_type
                              - payload
                          label:
                            type: string
                          choices:
                            type: array
                            items:
                              type: object
                              properties:
                                value:
                                  type: string
                                label:
                                  type: string
                              required:
                                - value
                                - label
                              additionalProperties: false
                        required:
                          - value
                          - label
                          - choices
                        additionalProperties: false
                    operators:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            enum:
                              - eq
                              - neq
                              - contains
                              - present
                              - blank
                          label:
                            type: string
                          value_type:
                            type: string
                            enum:
                              - choice
                              - text
                              - none
                        required:
                          - value
                          - label
                          - value_type
                        additionalProperties: false
                  required:
                    - fields
                    - operators
                  additionalProperties: false
                schedule:
                  type: object
                  properties:
                    frequencies:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            enum:
                              - hourly
                              - daily
                              - weekdays
                              - weekly
                          label:
                            type: string
                          uses_hour:
                            type: boolean
                          uses_weekday:
                            type: boolean
                        required:
                          - value
                          - label
                          - uses_hour
                          - uses_weekday
                        additionalProperties: false
                    weekdays:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            enum:
                              - MO
                              - TU
                              - WE
                              - TH
                              - FR
                              - SA
                              - SU
                          label:
                            type: string
                        required:
                          - value
                          - label
                        additionalProperties: false
                    default_frequency:
                      type: string
                      enum:
                        - hourly
                        - daily
                        - weekdays
                        - weekly
                    default_hour:
                      type: integer
                      minimum: 0
                      maximum: 23
                    default_weekday:
                      type: string
                      enum:
                        - MO
                        - TU
                        - WE
                        - TH
                        - FR
                        - SA
                        - SU
                    default_timezone:
                      type: string
                    rrule_frequencies:
                      type: array
                      items:
                        type: string
                        enum:
                          - HOURLY
                          - DAILY
                          - WEEKLY
                          - MONTHLY
                    timezones:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          label:
                            type: string
                          aliases:
                            type: array
                            items:
                              type: string
                            description: >-
                              Rails time zone names stored as
                              `schedule_timezone` that resolve to this option.
                              Any IANA name `schedule_timezone` accepts may also
                              appear; show unmatched stored values as-is.
                        required:
                          - value
                          - label
                          - aliases
                        additionalProperties: false
                  required:
                    - frequencies
                    - weekdays
                    - default_frequency
                    - default_hour
                    - default_weekday
                    - default_timezone
                    - rrule_frequencies
                    - timezones
                  additionalProperties: false
                destinations:
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        enum:
                          - slack_channel
                          - incident_timeline
                          - none
                      label:
                        type: string
                      trigger_kinds:
                        type: array
                        items:
                          type: string
                          enum:
                            - schedule
                            - event
                      event_names:
                        type: array
                        items:
                          type: string
                          enum:
                            - incident.created
                            - incident.updated
                            - incident.status_changed
                            - incident.severity_changed
                            - incident.resolved
                            - incident.cancelled
                            - alert.created
                            - alert.acknowledged
                            - alert.resolved
                            - slack.message_posted
                            - slack.reaction_added
                            - slack.usergroup_mentioned
                            - webhook.received
                      requires_slack_channel:
                        type: boolean
                    required:
                      - value
                      - label
                      - trigger_kinds
                      - event_names
                      - requires_slack_channel
                    additionalProperties: false
                slack_targets:
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        enum:
                          - channel
                          - trigger_thread
                          - incident_channel
                      label:
                        type: string
                      trigger_sources:
                        type: array
                        items:
                          type: string
                          enum:
                            - schedule
                            - incident
                            - alert
                            - slack
                            - webhook
                    required:
                      - value
                      - label
                      - trigger_sources
                    additionalProperties: false
                limits:
                  type: object
                  properties:
                    max_credits_per_run:
                      type: integer
                      enum:
                        - 1000
                    max_runs_per_window:
                      type: integer
                      enum:
                        - 1440
                    run_windows:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            enum:
                              - 1_hour
                              - 1_day
                              - 7_days
                          label:
                            type: string
                          seconds:
                            type: integer
                            enum:
                              - 3600
                              - 86400
                              - 604800
                        required:
                          - value
                          - label
                          - seconds
                        additionalProperties: false
                  required:
                    - max_credits_per_run
                    - max_runs_per_window
                    - run_windows
                  additionalProperties: false
              required:
                - sources
                - trigger_kinds
                - events
                - conditions
                - schedule
                - destinations
                - slack_targets
                - limits
              additionalProperties: false
          required:
            - id
            - type
            - attributes
          additionalProperties: false
      required:
        - data
      additionalProperties: false
    errors_list:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              status:
                type: string
              code:
                type: string
                nullable: true
              detail:
                type: string
                nullable: true
            required:
              - title
              - status
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.