Devtron Labels API

The Labels API from Devtron — 1 operation(s) for labels.

OpenAPI Specification

devtron-labels-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.0
  title: Devtron APIs Specs Applications Labels 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: Labels
  x-displayName: Labels
paths:
  /app/labels/list:
    get:
      summary: List Application Labels
      description: "Retrieves a list of application labels. By default, returns all labels. \nUse the `showPropagatedOnly` parameter to filter for labels where propagate = true.\n\n**Required Token Permission:**\n- Must have **View** access to the applications in scope.\n"
      operationId: getAppLabels
      tags:
      - Labels
      security: []
      parameters:
      - name: token
        in: header
        required: true
        description: Authentication token.
        schema:
          type: string
      - name: showPropagatedOnly
        in: query
        description: "If true, only returns labels where propagate = true. \nIf false or not provided, all labels are returned.\n"
        required: false
        schema:
          type: boolean
          default: false
        example: false
      responses:
        '200':
          description: Successfully retrieved labels list
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code
                    example: 200
                  status:
                    type: string
                    description: Response status message
                    example: OK
                  result:
                    type: array
                    description: Array of label objects
                    items:
                      type: object
                      required:
                      - key
                      - value
                      - propagate
                      - appId
                      - appName
                      properties:
                        key:
                          type: string
                          description: The label key/name
                          example: environment
                        value:
                          type: string
                          description: The label value
                          example: production
                        propagate:
                          type: boolean
                          description: Whether this label should be propagated
                          example: true
                        appId:
                          type: integer
                          description: The unique identifier of the application
                          example: 1234
                        appName:
                          type: string
                          description: The name of the application
                          example: web-service
              examples:
                all_labels:
                  summary: All labels response
                  description: Example response when showPropagatedOnly is false or not provided
                  value:
                    code: 200
                    status: OK
                    result:
                    - key: environment
                      value: production
                      propagate: true
                      appId: 1234
                      appName: web-service
                    - key: team
                      value: backend
                      propagate: false
                      appId: 1234
                      appName: web-service
                propagated_only:
                  summary: Propagated labels only
                  description: Example response when showPropagatedOnly is true
                  value:
                    code: 200
                    status: OK
                    result:
                    - key: environment
                      value: production
                      propagate: true
                      appId: 1234
                      appName: web-service
        '401':
          description: Authentication required or token invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 401
                  status:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication token is required
        '403':
          description: Insufficient permissions to access the resource
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 403
                  status:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: Token does not have View access to the applications in scope
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 500
                  status:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An unexpected error occurred
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