Devtron Notifications API

The Notifications API from Devtron — 3 operation(s) for notifications.

OpenAPI Specification

devtron-notifications-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.0
  title: Devtron APIs Specs Applications Notifications API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: Application management operations including creation, listing, and updates
servers:
- url: http://localhost/orchestrator
  description: Local development server
tags:
- name: Notifications
  x-displayName: Notifiactions
paths:
  /notification:
    get:
      summary: Returns all notification settings
      description: Returns all notification settings
      operationId: findNotificationSetting
      parameters:
      - name: token
        in: header
        required: true
        description: Authentication token.
        schema:
          type: string
      - name: offset
        in: query
        description: value can be regex search string.
        required: true
        schema:
          type: integer
      - name: size
        in: query
        description: value can be regex search string.
        required: true
        schema:
          type: integer
      security: []
      tags:
      - Notifications
      responses:
        '200':
          description: list response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSetting'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Creates a new NotificationSetting
      description: create NotificationSetting api.
      operationId: addNotificationSetting
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationSetting'
      security: []
      tags:
      - Notifications
      responses:
        '200':
          description: create NotificationSetting response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSetting'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      summary: Update  NotificationSetting
      description: Update NotificationSetting api either recipients or events(trigger/success/failed).
      operationId: updateNotificationSetting
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationSetting'
      security: []
      tags:
      - Notifications
      responses:
        '200':
          description: create NotificationSetting response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSetting'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete NotificationSetting
      description: delete notification setting.
      operationId: DeleteNotificationSetting
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationSetting'
      security: []
      tags:
      - Notifications
      responses:
        '200':
          description: create NotificationSetting response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationSetting'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /notification/recipient:
    get:
      summary: used to fetch providers(recipients)
      description: recipients fetch by string search, it will return slacks providers and email ids
      operationId: deleteGroupPolicy
      parameters:
      - name: token
        in: header
        required: true
        description: Authentication token.
        schema:
          type: string
      - name: value
        in: query
        description: value can be regex search string.
        required: true
        schema:
          type: string
      security: []
      tags:
      - Notifications
      responses:
        '204':
          description: list of recipients
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /notification/channel:
    get:
      summary: get all NotificationSettingConfig list
      description: get all NotificationSettingConfig list
      operationId: findNotificationSettingConfig
      security: []
      tags:
      - Notifications
      responses:
        '200':
          description: list response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationConfigResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Creates a new NotificationSettingConfig
      description: create NotificationSettingConfig, Slack or SES
      operationId: addNotificationSettingConfig
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationConfig'
      security: []
      tags:
      - Notifications
      responses:
        '200':
          description: create NotificationSettingConfig response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationConfigResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    configs:
      type: object
      required:
      - type
      - configName
      properties:
        id:
          type: integer
          description: unique id for config either slack or ses on response or update only
        type:
          type: string
          description: channel destination type, slack or ses
        configName:
          type: string
          description: configName
        secretKey:
          type: string
          description: secretKey, only in case of ses
        accessKey:
          type: string
          description: accessKey, only in case of ses
        fromEmail:
          type: string
          description: fromEmail, only in case of ses
        region:
          type: string
          description: region, only in case of ses
        webhookUrl:
          type: string
          description: webhook url, only fill in case of type is slack
        teamId:
          type: integer
          description: project id, only fill in case of type is slack
        userId:
          type: integer
          description: project id, only fill in case of type is slack
    NotificationSetting:
      type: object
      required:
      - configName
      properties:
        id:
          type: integer
          description: Unique id
        configName:
          type: string
          description: Unique name of group
        appId:
          type: integer
          description: app id
        envId:
          type: integer
          description: env id
        pipelineIds:
          type: array
          items:
            type: integer
        eventTypeIds:
          type: array
          items:
            type: integer
        pipelineType:
          type: string
          description: pipeline type CI or CD
        providers:
          type: array
          items:
            $ref: '#/components/schemas/providers'
          description: role filters objects
    NotificationConfigResponse:
      type: object
      properties:
        slackConfigs:
          type: array
          items:
            $ref: '#/components/schemas/configs'
          description: config holds for either slack or ses
        sesConfigs:
          type: array
          items:
            $ref: '#/components/schemas/configs'
          description: config holds for either slack or ses
    Error:
      required:
      - code
      - message
      properties:
        code:
          type: integer
          description: Error code
        message:
          type: string
          description: Error message
    providers:
      type: object
      required:
      - dest
      properties:
        dest:
          type: string
          description: channel destination name
        rule:
          type: string
          description: rule
        configId:
          type: integer
          description: config id
    NotificationConfig:
      type: object
      required:
      - channel
      properties:
        channel:
          type: string
          description: channel type
          enum:
          - slack
          - ses
        configs:
          type: array
          items:
            $ref: '#/components/schemas/configs'
          description: config holds for either slack or ses
x-tagGroups:
- name: Common Devtron automation APIs
  tags:
  - Metadata
  - Jobs
  - Helm Charts
  - List Applications
  - Applications
  - Labels
  - bulk_other
  - BulkUpdate
  - SSO Configuration
  - User Management
  - Role Group Management
  - RBAC
  - Authentication
  - Policy Management
  - Cache Management
  - Cluster Environment
  - Cluster Management
  - Environment Management
  - Change Chart
  - Clone Workflow
  - Deployment History
  - K8s Resource
  - Resource Recommendation
  - Workflow Management
  - Devtron Server version
  - GitOps Validation
  - Notifications