Skip to content
92 changes: 74 additions & 18 deletions specs/app-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,32 @@ openapi: "3.0.0"
info:
version: 1.0.0
title: Devtron Labs
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: http://localhost/orchestrator
description: Local development server
security:
- ApiKeyAuth: []
paths:
/orchestrator/app/labels/list:
get:
description: this api will return all the labels available in database.
summary: List all app labels
description: This API will return all the labels available in the database.
operationId: listAppLabels
security:
- ApiKeyAuth: []
parameters: [ ]
responses:
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Not found
'500':
description: Internal server error
'200':
description: list response
content:
Expand Down Expand Up @@ -39,7 +59,11 @@ paths:

/orchestrator/app/meta/info/{appId}:
get:
description: application basic info, projects and labels
summary: Get application meta info
description: Application basic info, projects and labels
operationId: getAppMetaInfo
security:
- ApiKeyAuth: []
parameters:
- name: appId
in: path
Expand All @@ -65,6 +89,14 @@ paths:
type: object
description: meta info project name and labels
$ref: '#/components/schemas/AppMetaInfo'
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Not found
'500':
description: Internal server error
default:
description: unexpected error
content:
Expand All @@ -73,7 +105,11 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
/orchestrator/helm/meta/info/{appId}:
get:
description: application info for all types of helm apps
summary: Get Helm application meta info
description: Application info for all types of Helm apps
operationId: getHelmAppMetaInfo
security:
- ApiKeyAuth: []
parameters:
- name: appId
in: path
Expand All @@ -98,9 +134,28 @@ paths:
type: object
description: meta info project name and labels
$ref: '#/components/schemas/AppMetaInfo'
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Not found
'500':
description: Internal server error
default:
description: unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

# components mentioned below
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
schemas:
AppLabel:
type: object
Expand Down Expand Up @@ -167,35 +222,36 @@ components:
description: app created by

ErrorResponse:
required:
- code
- status
type: object
properties:
code:
type: integer
format: int32
description: Error code
status:
type: string
description: Error message
result:
type: object
nullable: true
errors:
type: array
description: errors
items:
$ref: '#/components/schemas/Error'
type: object
properties:
userMessage:
type: string
nullable: true
internalMessage:
type: string
nullable: true

Error:
required:
- code
- status
- message
properties:
code:
type: integer
format: int32
description: Error internal code
internalMessage:
type: string
description: Error internal message
userMessage:
description: Error code
message:
type: string
description: Error user message
description: Error message
85 changes: 69 additions & 16 deletions specs/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@ openapi: "3.0.0"
info:
version: 1.0.0
title: Devtron Labs
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.yourdomain.com
description: Production server
security:
- ApiKeyAuth: []
paths:
/orchestrator/app:
post:
summary: Create a new application
operationId: createApplication
description: create new application
security:
- ApiKeyAuth: []
requestBody:
description: json as request body
required: true
Expand Down Expand Up @@ -38,6 +50,12 @@ paths:
required:
- id
- $ref: '#/components/schemas/App'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
default:
description: unexpected error
content:
Expand All @@ -46,7 +64,11 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
/orchestrator/app/edit:
post:
summary: Update application projects and labels
operationId: updateApplicationProjectsAndLabels
description: update application projects and labels
security:
- ApiKeyAuth: []
requestBody:
description: json as request body
required: true
Expand Down Expand Up @@ -79,6 +101,12 @@ paths:
required:
- id
- $ref: '#/components/schemas/App'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
default:
description: unexpected error
content:
Expand All @@ -88,7 +116,11 @@ paths:

/orchestrator/app/list:
post:
summary: List applications
operationId: listApplications
description: app listing, collection of deployed applications or undeployed or incomplete configured apps.
security:
- ApiKeyAuth: []
requestBody:
description: json as request body
required: true
Expand Down Expand Up @@ -129,6 +161,12 @@ paths:
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:
Expand All @@ -138,7 +176,11 @@ paths:

/orchestrator/app/edit/projects:
post:
summary: Update project for app
operationId: updateProjectForApp
description: update project for app
security:
- ApiKeyAuth: []
requestBody:
description: json as request body
required: true
Expand All @@ -163,7 +205,12 @@ paths:
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:
Expand All @@ -172,6 +219,11 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
# components mentioned below
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
schemas:
AppLabel:
type: object
Expand Down Expand Up @@ -363,35 +415,36 @@ components:


ErrorResponse:
required:
- code
- status
type: object
properties:
code:
type: integer
format: int32
description: Error code
status:
type: string
description: Error message
result:
type: object
nullable: true
errors:
type: array
description: errors
items:
$ref: '#/components/schemas/Error'
type: object
properties:
userMessage:
type: string
nullable: true
internalMessage:
type: string
nullable: true

Error:
required:
- code
- status
- message
properties:
code:
type: integer
format: int32
description: Error internal code
internalMessage:
type: string
description: Error internal message
userMessage:
description: Error code
message:
type: string
description: Error user message
description: Error message
Loading
Loading