Akash Network NotificationChannel API

The NotificationChannel API from Akash Network — 3 operation(s) for notificationchannel.

OpenAPI Specification

akash-notificationchannel-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: AKASH - gRPC Gateway docs Addresses NotificationChannel API
  description: A REST interface for state queries
  version: 1.0.0
tags:
- name: NotificationChannel
paths:
  /v1/notification-channels:
    post:
      operationId: createNotificationChannel
      parameters:
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationChannelCreateInput'
      responses:
        '201':
          description: Returns the created notification channel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationChannelOutput'
        '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:
      - NotificationChannel
    get:
      operationId: listNotificationChannels
      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: Authorization
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns a paginated list of notification channels
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationChannelListOutput'
        '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:
      - NotificationChannel
  /v1/notification-channels/default:
    post:
      operationId: createDefaultNotificationChannel
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationChannelCreateDefaultInput'
      responses:
        '204':
          description: Creates the default notification channel only if it doesn't exist.
      tags:
      - NotificationChannel
  /v1/notification-channels/{id}:
    get:
      operationId: getNotificationChannel
      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 notification channel by id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationChannelOutput'
        '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'
        '404':
          description: Returns 404 if the notification channel is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - NotificationChannel
    patch:
      operationId: updateNotificationChannel
      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/NotificationChannelPatchInput'
      responses:
        '200':
          description: Returns the updated notification channel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationChannelOutput'
        '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'
        '404':
          description: Returns 404 if the notification channel is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - NotificationChannel
    delete:
      operationId: deleteNotificationChannel
      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 notification channel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationChannelOutput'
        '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'
        '404':
          description: Returns 404 if the notification channel is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
        '500':
          description: Internal server error, should probably be reported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      tags:
      - NotificationChannel
components:
  schemas:
    NotificationChannelCreateInput:
      type: object
      properties:
        data:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
              - email
            config:
              type: object
              properties:
                addresses:
                  type: array
                  items:
                    type: string
                    format: email
              required:
              - addresses
            isDefault:
              type: boolean
          required:
          - name
          - type
          - config
      required:
      - data
    NotFoundErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          minimum: 404
          maximum: 404
        message:
          type: string
      required:
      - statusCode
      - message
    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
    NotificationChannelOutput:
      type: object
      properties:
        data:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
              - email
            config:
              type: object
              properties:
                addresses:
                  type: array
                  items:
                    type: string
                    format: email
              required:
              - addresses
            isDefault:
              type: boolean
            id:
              type: string
              format: uuid
            userId:
              type: string
              format: uuid
            createdAt: {}
            updatedAt: {}
          required:
          - name
          - type
          - config
          - isDefault
          - id
          - userId
          - createdAt
          - updatedAt
      required:
      - data
    NotificationChannelPatchInput:
      type: object
      properties:
        data:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
              - email
            config:
              type: object
              properties:
                addresses:
                  type: array
                  items:
                    type: string
                    format: email
              required:
              - addresses
      required:
      - data
    ForbiddenErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          minimum: 403
          maximum: 403
        message:
          type: string
      required:
      - statusCode
      - message
    NotificationChannelCreateDefaultInput:
      type: object
      properties:
        data:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
              enum:
              - email
            config:
              type: object
              properties:
                addresses:
                  type: array
                  items:
                    type: string
                    format: email
              required:
              - addresses
          required:
          - name
          - type
          - config
      required:
      - data
    NotificationChannelListOutput:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
                enum:
                - email
              config:
                type: object
                properties:
                  addresses:
                    type: array
                    items:
                      type: string
                      format: email
                required:
                - addresses
              isDefault:
                type: boolean
              id:
                type: string
                format: uuid
              userId:
                type: string
                format: uuid
              createdAt: {}
              updatedAt: {}
            required:
            - name
            - type
            - config
            - isDefault
            - id
            - userId
            - createdAt
            - updatedAt
        pagination:
          type: object
          properties:
            page:
              type: number
              minimum: 0
              exclusiveMinimum: false
            limit:
              type: number
              minimum: 0
              exclusiveMinimum: false
              maximum: 1000
              exclusiveMaximum: false
            total:
              type: number
              minimum: 0
              exclusiveMinimum: false
            totalPages:
              type: number
              minimum: 0
              exclusiveMinimum: false
            hasNextPage:
              type: boolean
            hasPreviousPage:
              type: boolean
          required:
          - page
          - limit
          - total
          - totalPages
          - hasNextPage
          - hasPreviousPage
      required:
      - data
      - pagination
securityDefinitions:
  kms:
    type: basic