components:
  parameters:
    ActionName:
      description: The name of the action as one or more identifier strings separated
        by periods. Each identifier string consists of lowercase letters, digits,
        and underscores, and cannot start with a digit.
      in: path
      name: action_name
      required: true
      schema:
        pattern: ^[_a-z][_a-z0-9]*(?:\.[_a-z][_a-z0-9]*)*$
        type: string
    AuthorizationHeaderParam:
      description: The access token, which is obtained from a known identity provider.
      in: header
      name: Authorization
      required: true
      schema:
        pattern: ^Bearer .+
        type: string
    EntryName:
      description: The name of the trigger map entry.
      in: path
      name: entry_name
      required: true
      schema:
        pattern: ^[_a-z][_a-z0-9]*(?:\\.[_a-z][_a-z0-9]*)*$
        type: string
    MessageId:
      description: The id of the message
      in: path
      name: message_id
      required: true
      schema:
        type: string
    Tenant:
      description: The tenant name.
      example: wingdings-widgets
      in: path
      name: tenant
      required: true
      schema:
        type: string
    TriggerName:
      description: The name of the trigger.
      in: path
      name: trigger_name
      required: true
      schema:
        pattern: ^[_a-z][_a-z0-9]*(?:\\.[_a-z][_a-z0-9]*)*$
        type: string
  schemas:
    Action:
      discriminator:
        mapping:
          app-message: '#/components/schemas/AppMessageAction'
          email: '#/components/schemas/EmailAction'
          webhook: '#/components/schemas/WebhookAction'
        propertyName: kind
      oneOf:
      - $ref: '#/components/schemas/EmailAction'
      - $ref: '#/components/schemas/WebhookAction'
      - $ref: '#/components/schemas/AppMessageAction'
    ActionImmutable:
      properties:
        createdAt:
          description: The date and time this action template was created (ISO-8601
            date/time with zone).
          format: date-time
          readOnly: true
          type: string
        createdBy:
          description: The principal that created this action template.
          readOnly: true
          type: string
        kind:
          $ref: '#/components/schemas/ActionKind'
        name:
          description: The name of the action, as one or more identifier strings separated
            by periods. Each identifier string consists of lowercase letters, digits,
            and underscores, and cannot start with a digit.
          pattern: ^[_a-z][_a-z0-9]*(?:\.[_a-z][_a-z0-9]*)*$
          type: string
        updatedAt:
          description: The date and time this action template was updated (ISO-8601
            date/time with zone).
          format: date-time
          readOnly: true
          type: string
        updatedBy:
          description: The principal that updated this action template.
          readOnly: true
          type: string
      required:
      - name
      - kind
      type: object
    ActionKind:
      enum:
      - webhook
      - email
      - app-message
      type: string
    ActionMutable:
      oneOf:
      - $ref: '#/components/schemas/EmailActionMutable'
      - $ref: '#/components/schemas/WebhookActionMutable'
    AppMessage:
      allOf:
      - $ref: '#/components/schemas/AppMessageInternal'
      - $ref: '#/components/schemas/AppMessageImmutable'
      - $ref: '#/components/schemas/AppMessageMutable'
      description: A message delivered to a tenant member from the platform or a subscribed
        app.
      type: object
    AppMessageAction:
      allOf:
      - $ref: '#/components/schemas/ActionImmutable'
      - $ref: '#/components/schemas/AppMessageActionMutable'
    AppMessageActionMutable:
      properties:
        iconURL:
          description: The icon URL to be displayed along with the message.
          format: uri
          maxLength: 2048
          type: string
        link:
          description: Call to action link for this message.
          format: uri
          maxLength: 2048
          type: string
        message:
          description: The main message that user needs to receive.
          maxLength: 1024
          type: string
        title:
          description: The title to be displayed for the message.
          maxLength: 128
          type: string
      required:
      - title
      type: object
    AppMessageImmutable:
      properties:
        clientId:
          description: Application or service client ID that caused the message to
            be created.
          readOnly: true
          type: string
        clientKind:
          $ref: '#/components/schemas/ClientKind'
        clientName:
          description: Human readable name for the entity that generated the message.
          readOnly: true
          type: string
        iconURL:
          description: The icon URL to be displayed along with the message.
          format: uri
          readOnly: true
          type: string
        link:
          description: Call to action link for this message.
          format: uri
          readOnly: true
          type: string
        message:
          description: The main message that user needs to receive.
          readOnly: true
          type: string
        recipient:
          description: The tenant member the message was delivered to.
          readOnly: true
          type: string
        title:
          description: The title to be displayed for the message.
          readOnly: true
          type: string
      required:
      - recipient
      - title
      - clientId
      - clientName
      - clientKind
      type: object
    AppMessageInternal:
      properties:
        createdAt:
          description: The date and time this trigger map entry was created (ISO-8601
            date/time with zone).
          format: date-time
          readOnly: true
          type: string
        createdBy:
          description: The principal that created this trigger map entry.
          readOnly: true
          type: string
        id:
          description: The id of this message.
          readOnly: true
          type: string
        updatedAt:
          description: The date and time this trigger map entry was updated (ISO-8601
            date/time with zone).
          format: date-time
          readOnly: true
          type: string
        updatedBy:
          description: The principal that updated this trigger map entry.
          readOnly: true
          type: string
      required:
      - id
      - createdAt
      - updatedAt
      - createdBy
      - updatedBy
      type: object
    AppMessageMutable:
      properties:
        state:
          $ref: '#/components/schemas/AppMessageState'
          description: Current state of this message
      required:
      - state
      type: object
    AppMessagePaginatedList:
      description: A list of app messages delivered to the user. May also include
        a next token which can be returned to the service to retrieve the next page
        of messages.
      properties:
        items:
          description: An array of app messages
          items:
            $ref: '#/components/schemas/AppMessage'
          type: array
        next:
          description: A token that can be returned to the service to retrieve the
            next page of messages
          type: string
      required:
      - items
      type: object
    AppMessageState:
      enum:
      - unread
      - read
      type: string
    ClientKind:
      description: The kind of creator of an app message.
      enum:
      - app
      - platform
      type: string
    EmailAction:
      allOf:
      - $ref: '#/components/schemas/ActionImmutable'
      - $ref: '#/components/schemas/EmailActionMutable'
    EmailActionMutable:
      properties:
        addresses:
          description: |
            An array of email addresses to include as recipients. Requires a special permission set for use. Please DO NOT include actual bouncing emails in automated testing.
          items:
            format: email
            type: string
          type: array
        body:
          description: HTML content to send as the body of the email. You can use
            a template in this field.
          example: <html><body>Hello, this is my test email.</body></html>
          type: string
        bodyPlainText:
          description: Optional text to send as the text/plain part of the email.
            If this field is not set for an email action, the Action service converts
            the value from the body field to text and sends that as the text/plain
            part when triggering the action. You can use a template in this field.
          example: Hello, this is my test email.
          type: string
        fromName:
          description: Optional text providing a human-friendly name for the sender.
            Must be less than or equal to 81 characters. You can use a template in
            this field.
          type: string
        members:
          description: An array of tenant member names, whose profile email addresses
            will be included as recipients.
          items:
            type: string
          type: array
        subject:
          description: The subject of the email. You can use a template in this field.
          type: string
        title:
          description: A human-readable title for the action. Must be less than or
            equal to 128 characters.
          type: string
      type: object
    PublicWebhookKey:
      properties:
        key:
          description: A PEM-formatted, ASN.1 DER-encoded PKCS#1 key.
          type: string
      required:
      - key
      type: object
    RawJSONPayload:
      additionalProperties: true
      type: object
    ServiceError:
      properties:
        code:
          type: string
        details:
          type: object
        message:
          type: string
        moreInfo:
          type: string
      required:
      - code
      - message
      type: object
    TriggerEventImmutable:
      properties:
        createdAt:
          description: string-ified ISO-8601 date/time with zone.
          format: date-time
          readOnly: true
          type: string
        createdBy:
          description: The principal that generated the trigger event.
          readOnly: true
          type: string
        tenant:
          description: The tenant within which the trigger event was generated.
          pattern: ^[_a-z][_a-z0-9]*(?:\\.[_a-z][_a-z0-9]*)*$
          readOnly: true
          type: string
      type: object
    TriggerEventInput:
      properties:
        actionMetadata:
          properties:
            addresses:
              description: |
                An array of email addresses to include as recipients. Requires a special permission set for use. Please DO NOT include actual bouncing emails in automated testing.
              items:
                format: email
                type: string
              type: array
            expiresAtUTCEpoch:
              description: Unix epoch timestamp in UTC indicating when the message
                expires.
              type: integer
            members:
              description: An array of tenant member names, whose profile email addresses
                will be included as recipients.
              items:
                type: string
              type: array
          type: object
        id:
          description: |
            A unique identifier for this trigger event. Generated from a hash of all recursively sorted event field values.
          type: string
        payload:
          $ref: '#/components/schemas/RawJSONPayload'
        triggerName:
          description: The name of the trigger for which this event was created.
          pattern: ^[_a-z][_a-z0-9]*(?:\\.[_a-z][_a-z0-9]*)*$
          type: string
        ttlSeconds:
          default: 3600
          description: |
            A time to live (TTL), expressed as seconds after createdAt, after which the trigger event will not be acted upon.
          format: int32
          minimum: 1
          type: integer
      required:
      - triggerName
      type: object
    TriggerEventResponse:
      allOf:
      - $ref: '#/components/schemas/TriggerEventInput'
      - $ref: '#/components/schemas/TriggerEventImmutable'
      required:
      - id
      - triggerName
      - tenant
      - createdAt
      - createdBy
      type: object
    TriggerMapEntry:
      allOf:
      - $ref: '#/components/schemas/TriggerMapEntryImmutable'
      - $ref: '#/components/schemas/TriggerMapEntryMutable'
      description: |
        A trigger map entry describes a mapping between a named trigger and a set of actions. There can be multiple trigger map entries for each trigger within the system. The combination of trigger name and entry name must be unique.
      type: object
    TriggerMapEntryImmutable:
      properties:
        createdAt:
          description: The date and time this trigger map entry was created (ISO-8601
            date/time with zone).
          format: date-time
          readOnly: true
          type: string
        createdBy:
          description: The principal that created this trigger map entry.
          readOnly: true
          type: string
        entryName:
          default: default
          description: The entry name for this trigger mapping.
          pattern: ^[_a-z][_a-z0-9]*(?:\.[_a-z][_a-z0-9]*)*$
          type: string
        triggerName:
          description: The trigger name for this mapping entry.
          pattern: ^[_a-z][_a-z0-9]*(?:\.[_a-z][_a-z0-9]*)*$
          type: string
        updatedAt:
          description: The date and time this trigger map entry was updated (ISO-8601
            date/time with zone).
          format: date-time
          readOnly: true
          type: string
        updatedBy:
          description: The principal that updated this trigger map entry.
          readOnly: true
          type: string
      required:
      - triggerName
      - entryName
      type: object
    TriggerMapEntryMutable:
      properties:
        actionNames:
          description: An array of action template names to invoke when the trigger
            fires.
          items:
            type: string
          type: array
      required:
      - actionNames
      type: object
    WebhookAction:
      allOf:
      - $ref: '#/components/schemas/ActionImmutable'
      - $ref: '#/components/schemas/WebhookActionMutable'
      required:
      - webhookUrl
      - webhookPayload
    WebhookActionMutable:
      properties:
        title:
          description: A human-readable title for the action. Must be less than 128
            characters.
          type: string
        webhookHeaders:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
        webhookPayload:
          description: |
            The (possibly) templated payload body, which is POSTed to the webhookUrl.
          type: string
        webhookUrl:
          description: |
            Only HTTPS is allowed.
          format: uri
          type: string
      type: object
info:
  description: |
    With the Splunk Cloud Action service, you can receive incoming trigger events and use pre-defined action templates to turn these events into meaningful actions.
  title: Action Service
  version: v2alpha1.12
openapi: 3.0.0
paths:
  /{tenant}/action/v2alpha1/actions:
    get:
      operationId: listActions
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Action'
                type: array
          description: The action templates were returned successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The user isn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The operation isn't authorized.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: An error occurred.
      summary: Returns the list of action templates.
      tags:
      - Actions
    parameters:
    - $ref: '#/components/parameters/AuthorizationHeaderParam'
    - $ref: '#/components/parameters/Tenant'
    post:
      operationId: createAction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Action'
        description: The action template to create.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Action'
          description: The action template was created successfully.
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The request isn't valid.
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The user isn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The operation isn't authorized.
        "409":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The action template already exists.
        "422":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The provided fields aren't valid.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: An error occurred.
      summary: Creates an action template.
      tags:
      - Actions
      x-authz-scope: action.actions.create
  /{tenant}/action/v2alpha1/actions/{action_name}:
    delete:
      operationId: deleteAction
      responses:
        "204":
          description: The action template was removed successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The user isn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The operation isn't authorized.
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The resource wasn't found.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: An error occurred.
      summary: Removes an action template.
      tags:
      - Actions
      x-authz-scope: action.actions.modify
    get:
      operationId: getAction
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Action'
          description: The action template was returned successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The user isn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The operation isn't authorized.
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The resource wasn't found.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: An error occurred.
      summary: Returns a specific action template.
      tags:
      - Actions
      x-authz-scope: action.actions.read
    parameters:
    - $ref: '#/components/parameters/AuthorizationHeaderParam'
    - $ref: '#/components/parameters/Tenant'
    - $ref: '#/components/parameters/ActionName'
    patch:
      operationId: updateAction
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionMutable'
        description: Updates to the action template.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Action'
          description: The action was updated successfully.
          headers:
            Location:
              description: The URL of the updated action.
              schema:
                type: string
        "400":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The request isn't valid.
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The user isn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The operation isn't authorized.
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The resource wasn't found.
        "422":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: The provided fields aren't valid.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: An error occurred.
      summary: Modifies an action template.
      tags:
      - Actions
      x-authz-scope: action.actions.modify
  /system/action/v2alpha1/webhook/keys:
    get:
      operationId: getPublicWebhookKeys
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PublicWebhookKey'
                type: array
          description: The public webhook keys were returned successfully.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceError'
          description: An error occurred.
      summary: Get the current webhook key(s). If multiple keys were returned, one
        is active and one is expired.
      tags:
      - Webhook Keys
      x-auth-required: false

# Retrieved from scp-openapi commit 820564ba8a17697d087ff171b14cbad60a716ee3 path: action/v2alpha1/openapi.yaml