Opal Security message-channels API

Operations related to message channels

OpenAPI Specification

opal-security-message-channels-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically.
  title: Opal access-rules message-channels API
  version: '1.0'
servers:
- description: Production
  url: https://api.opal.dev/v1
tags:
- name: message-channels
  description: Operations related to message channels
paths:
  /message-channels:
    get:
      summary: Get message channels
      description: Returns a list of `MessageChannel` objects.
      operationId: get_message_channels
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageChannelList'
          description: A list of message channels for your organization.
      security:
      - BearerAuth: []
      tags:
      - message-channels
    post:
      description: Creates a `MessageChannel` objects.
      operationId: create_message_channel
      requestBody:
        description: The `MessageChannel` object to be created.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageChannelInfo'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageChannel'
          description: The message channel that was created.
      security:
      - BearerAuth: []
      tags:
      - message-channels
  /message-channels/{message_channel_id}:
    get:
      summary: Get message channel by ID
      description: Gets a `MessageChannel` object.
      operationId: get_message_channel
      parameters:
      - description: The ID of the message_channel.
        example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
        explode: false
        in: path
        name: message_channel_id
        required: true
        schema:
          format: uuid
          type: string
        style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageChannel'
          description: The requested message channel.
      security:
      - BearerAuth: []
      tags:
      - message-channels
components:
  schemas:
    MessageChannelList:
      example:
        channels:
        - message_channel_id: 7870617d-e72a-47f5-a84c-693817ab4567
          third_party_provider: SLACK
          remote_id: C03FJR97276
          name: api-team-audit-channel
          is_private: false
        - message_channel_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
          third_party_provider: SLACK
          remote_id: A4FJR97365D
          name: api-team-monitor-channel
          is_private: false
      properties:
        channels:
          items:
            $ref: '#/components/schemas/MessageChannel'
          type: array
      type: object
      required:
      - channels
    MessageChannel:
      description: '# MessageChannel Object

        ### Description

        The `MessageChannel` object is used to represent a message channel.


        ### Usage Example

        Update a groups message channel from the `UPDATE Groups` endpoint.'
      example:
        message_channel_id: 6670617d-e72a-47f5-a84c-693817ab4860
        third_party_provider: SLACK
        remote_id: C03FJR97276
        name: api-team-audit-channel
        is_private: false
      properties:
        message_channel_id:
          description: The ID of the message channel.
          example: 6670617d-e72a-47f5-a84c-693817ab4860
          format: uuid
          type: string
        third_party_provider:
          $ref: '#/components/schemas/MessageChannelProviderEnum'
        remote_id:
          description: The remote ID of the message channel
          example: C03FJR97276
          type: string
        name:
          description: The name of the message channel.
          example: api-team-audit-channel
          type: string
        is_private:
          description: A bool representing whether or not the message channel is private.
          example: false
          type: boolean
      type: object
      required:
      - message_channel_id
    CreateMessageChannelInfo:
      description: '# CreateMessageChannelInfo Object

        ### Description

        The `CreateMessageChannelInfo` object is used to describe the message channel object to be created.'
      example:
        third_party_provider: SLACK
        remote_id: C03FJR97276
      properties:
        third_party_provider:
          $ref: '#/components/schemas/MessageChannelProviderEnum'
        remote_id:
          description: The remote ID of the message channel
          example: C03FJR97276
          type: string
      type: object
      required:
      - third_party_provider
      - remote_id
    MessageChannelProviderEnum:
      description: The third party provider of the message channel.
      enum:
      - SLACK
      example: SLACK
      type: string
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http