Devtron Applications API

Application management operations including creation, listing, and updates

OpenAPI Specification

devtron-applications-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.0
  title: Devtron APIs Specs Applications 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: Applications
  description: Application management operations including creation, listing, and updates
  x-displayName: Application Management
paths:
  /orchestrator/app:
    post:
      summary: Create a new application
      operationId: createApplication
      description: create new application
      security: []
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/App'
      responses:
        '200':
          description: App create response
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: integer
                    description: status code
                  status:
                    type: string
                    description: status
                  result:
                    type: object
                    description: string
                    allOf:
                    - type: object
                      properties:
                        id:
                          type: integer
                          description: unique application id
                      required:
                      - id
                    - $ref: '#/components/schemas/App'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Applications
  /orchestrator/app/edit:
    post:
      summary: Update application projects and labels
      operationId: updateApplicationProjectsAndLabels
      description: update application projects and labels
      security: []
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/App'
      responses:
        '200':
          description: App update response
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: integer
                    description: status code
                  status:
                    type: string
                    description: status
                  result:
                    type: object
                    description: string
                    allOf:
                    - type: object
                      properties:
                        id:
                          type: integer
                          description: unique application id
                      required:
                      - id
                    - $ref: '#/components/schemas/App'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Applications
  /orchestrator/app/list:
    post:
      summary: List applications
      operationId: listApplications
      description: app listing, collection of deployed applications or undeployed or incomplete configured apps.
      security: []
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppListingRequest'
      responses:
        '200':
          description: App create response
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: integer
                    description: status code
                  status:
                    type: string
                    description: status
                  result:
                    type: object
                    description: string
                    required:
                    - appCount
                    - appContainers
                    - deploymentGroup
                    properties:
                      appCount:
                        type: integer
                        description: app count, total number of apps available based on filter provided in request.
                      appContainers:
                        type: array
                        description: app containers
                        items:
                          $ref: '#/components/schemas/AppContainer'
                      deploymentGroup:
                        type: object
                        description: deployment group
                        $ref: '#/components/schemas/DeploymentGroup'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Applications
  /orchestrator/app/edit/projects:
    post:
      summary: Update project for app
      operationId: updateProjectForApp
      description: update project for app
      security: []
      requestBody:
        description: json as request body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppProjectUpdateRequest'
      responses:
        '200':
          description: App update response
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: integer
                    description: status code
                  status:
                    type: string
                    description: status
                  result:
                    type: object
                    description: string
                    $ref: '#/components/schemas/AppProjectUpdateRequest'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Applications
components:
  schemas:
    EnvContainer:
      type: object
      required:
      - appId
      - appName
      - environmentId
      - environmentName
      properties:
        appId:
          type: integer
          description: app id
        appName:
          type: string
          description: app name
        cdStageStatus:
          type: string
          description: app name
        dataSource:
          type: string
          description: app name
        ciArtifactId:
          type: integer
          description: app name
        deleted:
          type: boolean
          description: app name
        environmentId:
          type: integer
          description: app name
        environmentName:
          type: string
          description: app name
        status:
          type: string
          description: app name
        appStatus:
          type: string
          description: app status for this environment
        postStageStatus:
          type: string
          description: app name
        preStageStatus:
          type: string
          description: app name
        lastDeployedTime:
          type: string
          description: deployed time
        materialInfo:
          type: array
          items:
            type: object
    AppContainer:
      type: object
      required:
      - appId
      - appName
      - environments
      properties:
        appId:
          type: integer
          description: app id
        appName:
          type: string
          description: app name
        environments:
          type: array
          items:
            $ref: '#/components/schemas/EnvContainer'
    AppLabel:
      type: object
      required:
      - key
      - value
      properties:
        key:
          type: string
          description: label key
        value:
          type: string
          description: label value
        propagate:
          type: boolean
          description: Whether to propagate to kubernetes resources
    App:
      type: object
      required:
      - appName
      - teamId
      - templateId
      properties:
        appName:
          type: string
          description: app name
        teamId:
          type: integer
          description: project id
        templateId:
          type: integer
          description: reference app id, used for clone, set default value 0 for blank app.
        labels:
          type: array
          description: each apps may have multiple labels. these are optional.
          items:
            $ref: '#/components/schemas/AppLabel'
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
        status:
          type: string
        result:
          type: object
          nullable: true
        errors:
          type: array
          items:
            type: object
            properties:
              userMessage:
                type: string
                nullable: true
              internalMessage:
                type: string
                nullable: true
    AppProjectUpdateRequest:
      type: object
      required:
      - teamId
      - appId
      properties:
        teamId:
          type: integer
          description: project id
        appId:
          type: array
          description: team id, teams ids are projects ids
          items:
            type: integer
    DeploymentGroup:
      type: object
      required:
      - id
      properties:
        id:
          type: integer
          description: id
        ciPipelineId:
          type: integer
          description: ciPipelineId
        environmentId:
          type: integer
          description: environmentId
        appCount:
          type: integer
          description: appCount
        name:
          type: string
          description: name
        noOfApps:
          type: string
          description: noOfApps
    AppListingRequest:
      type: object
      required:
      - offset
      - size
      properties:
        appNameSearch:
          type: string
          description: app name search, wildcard match
        offset:
          type: integer
          description: offset
        size:
          type: integer
          description: result size
        sortBy:
          type: string
          description: sort by
        sortOrder:
          type: string
          description: sort order
        environments:
          type: array
          description: environment id
          items:
            type: integer
        teams:
          type: array
          description: team id, teams ids are projects ids
          items:
            type: integer
        labels:
          type: array
          description: app labels
          items:
            type: string
        statuses:
          type: array
          description: status
          items:
            type: string
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