Akash Network Alert API

The Alert API from Akash Network — 2 operation(s) for alert.

OpenAPI Specification

akash-alert-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: AKASH - gRPC Gateway docs Addresses Alert API
  description: A REST interface for state queries
  version: 1.0.0
tags:
- name: Alert
paths:
  /v1/alerts:
    post:
      operationId: createAlert
      parameters:
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertCreateInput'
      responses:
        '201':
          description: Returns the created alert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertOutputResponse'
        '400':
          description: Validation error responded when some request parameters are invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized error responded when the user is not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden error responded when the user is not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - Alert
    get:
      operationId: listAlerts
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of items per page
        schema:
          type: number
      - name: page
        required: false
        in: query
        description: Page number
        schema:
          type: number
      - name: type
        required: false
        in: query
        description: Chain message type, used in conjunction with dseq to filter alerts liked to a specific deployment
        schema:
          type: string
      - name: dseq
        required: false
        in: query
        description: Linked deployment's dseq
        schema:
          type: string
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns the list of alerts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertListOutputResponse'
        '400':
          description: Validation error responded when some request parameters are invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized error responded when the user is not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden error responded when the user is not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - Alert
  /v1/alerts/{id}:
    get:
      operationId: getAlert
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns the requested alert by id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertOutputResponse'
        '400':
          description: Validation error responded when some request parameters are invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized error responded when the user is not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden error responded when the user is not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - Alert
    patch:
      operationId: updateAlert
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertPatchInput'
      responses:
        '200':
          description: Returns the updated alert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertOutputResponse'
        '400':
          description: Validation error responded when some request parameters are invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized error responded when the user is not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden error responded when the user is not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - Alert
    delete:
      operationId: deleteAlert
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns the deleted alert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertOutputResponse'
        '400':
          description: Validation error responded when some request parameters are invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized error responded when the user is not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '403':
          description: Forbidden error responded when the user is not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - Alert
components:
  schemas:
    ValidationErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          minimum: 400
          maximum: 400
        message:
          type: string
        errors:
          type: object
          properties:
            issues:
              type: array
              items:
                type: object
                properties: {}
          required:
          - issues
      required:
      - statusCode
      - message
      - errors
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          minimum: 500
          maximum: 500
        message:
          type: string
      required:
      - statusCode
      - message
    UnauthorizedErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          minimum: 401
          maximum: 401
        message:
          type: string
      required:
      - statusCode
      - message
    AlertPatchInput:
      type: object
      properties:
        data:
          type: object
          properties:
            notificationChannelId:
              type: string
              format: uuid
            name:
              type: string
              minLength: 3
            enabled:
              type: boolean
              default: true
            summary:
              type: string
              minLength: 3
            description:
              type: string
              minLength: 3
            conditions:
              oneOf:
              - oneOf:
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - and
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - or
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      oneOf:
                      - type: string
                        enum:
                        - eq
                      - type: string
                        enum:
                        - lt
                      - type: string
                        enum:
                        - gt
                      - type: string
                        enum:
                        - lte
                      - type: string
                        enum:
                        - gte
                    field:
                      type: string
                    value:
                      oneOf:
                      - type: string
                      - type: number
                      - type: boolean
                  required:
                  - operator
                  - field
                  - value
              - oneOf:
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - and
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                            enum:
                            - balance
                          value:
                            type: number
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - or
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                            enum:
                            - balance
                          value:
                            type: number
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      oneOf:
                      - type: string
                        enum:
                        - eq
                      - type: string
                        enum:
                        - lt
                      - type: string
                        enum:
                        - gt
                      - type: string
                        enum:
                        - lte
                      - type: string
                        enum:
                        - gte
                    field:
                      type: string
                      enum:
                      - balance
                    value:
                      type: number
                  required:
                  - operator
                  - field
                  - value
      required:
      - data
    AlertCreateInput:
      type: object
      properties:
        data:
          oneOf:
          - type: object
            properties:
              notificationChannelId:
                type: string
                format: uuid
              name:
                type: string
                minLength: 3
              enabled:
                type: boolean
                default: true
              summary:
                type: string
                minLength: 3
              description:
                type: string
                minLength: 3
              params:
                type: object
                properties:
                  dseq:
                    type: string
                    pattern: ^\d+$
                  type:
                    type: string
                  suppressedBySystem:
                    type: boolean
                required:
                - dseq
                - type
              conditions:
                oneOf:
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - and
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - or
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      oneOf:
                      - type: string
                        enum:
                        - eq
                      - type: string
                        enum:
                        - lt
                      - type: string
                        enum:
                        - gt
                      - type: string
                        enum:
                        - lte
                      - type: string
                        enum:
                        - gte
                    field:
                      type: string
                    value:
                      oneOf:
                      - type: string
                      - type: number
                      - type: boolean
                  required:
                  - operator
                  - field
                  - value
              type:
                type: string
                enum:
                - CHAIN_MESSAGE
            required:
            - notificationChannelId
            - name
            - summary
            - description
            - conditions
            - type
          - type: object
            properties:
              notificationChannelId:
                type: string
                format: uuid
              name:
                type: string
                minLength: 3
              enabled:
                type: boolean
                default: true
              summary:
                type: string
                minLength: 3
              description:
                type: string
                minLength: 3
              params:
                type: object
                properties:
                  dseq:
                    type: string
                    pattern: ^\d+$
                  type:
                    type: string
                  suppressedBySystem:
                    type: boolean
                required:
                - dseq
                - type
              conditions:
                oneOf:
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - and
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - or
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                          value:
                            oneOf:
                            - type: string
                            - type: number
                            - type: boolean
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      oneOf:
                      - type: string
                        enum:
                        - eq
                      - type: string
                        enum:
                        - lt
                      - type: string
                        enum:
                        - gt
                      - type: string
                        enum:
                        - lte
                      - type: string
                        enum:
                        - gte
                    field:
                      type: string
                    value:
                      oneOf:
                      - type: string
                      - type: number
                      - type: boolean
                  required:
                  - operator
                  - field
                  - value
              type:
                type: string
                enum:
                - CHAIN_EVENT
            required:
            - notificationChannelId
            - name
            - summary
            - description
            - conditions
            - type
          - type: object
            properties:
              notificationChannelId:
                type: string
                format: uuid
              name:
                type: string
                minLength: 3
              enabled:
                type: boolean
                default: true
              summary:
                type: string
                minLength: 3
              description:
                type: string
                minLength: 3
              type:
                type: string
                enum:
                - DEPLOYMENT_BALANCE
              conditions:
                oneOf:
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - and
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                            enum:
                            - balance
                          value:
                            type: number
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      type: string
                      enum:
                      - or
                    value:
                      type: array
                      minItems: 2
                      items:
                        type: object
                        properties:
                          operator:
                            oneOf:
                            - type: string
                              enum:
                              - eq
                            - type: string
                              enum:
                              - lt
                            - type: string
                              enum:
                              - gt
                            - type: string
                              enum:
                              - lte
                            - type: string
                              enum:
                              - gte
                          field:
                            type: string
                            enum:
                            - balance
                          value:
                            type: number
                        required:
                        - operator
                        - field
                        - value
                  required:
                  - operator
                  - value
                - type: object
                  properties:
                    operator:
                      oneOf:
                      - type: string
                        enum:
                        - eq
                      - type: string
                        enum:
                        - lt
                      - type: string
                        enum:
                        - gt
                      - type: string
                        enum:
                        - lte
                      - type: string
                        enum:
                        - gte
                    field:
                      type: string
                      enum:
                      - balance
                    value:
                      type: number
                  required:
                  - operator
                  - field
                  - value
              params:
                type: object
                properties:
                  dseq:
                    type: string
                    pattern: ^\d+$
                  owner:
                    type: string
                  suppressed

# --- truncated at 32 KB (82 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/akash/refs/heads/main/openapi/akash-alert-api-openapi.yml