> ## 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.
        Conditions only apply to `event` triggers and are sent as `{"any":
        [{"all": [{field, operator, value}]}]}`. `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 are
        listed by `GET /v1/ai_automations/slack_channels`. `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:
                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.status_changed
                          - incident.resolved
                      label:
                        type: string
                      condition_fields:
                        type: array
                        items:
                          type: string
                          enum:
                            - severity
                            - status
                            - to_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
                          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.status_changed
                            - incident.resolved
                      requires_slack_channel:
                        type: boolean
                    required:
                      - value
                      - label
                      - trigger_kinds
                      - event_names
                      - requires_slack_channel
                    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:
                - trigger_kinds
                - events
                - conditions
                - schedule
                - destinations
                - 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.