Skip to content
23 changes: 21 additions & 2 deletions specs/apiToken_api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ openapi: "3.0.3"
info:
version: 1.0.0
title: Devtron Labs
servers:
- url: http://localhost/orchestrator
paths:
/orchestrator/api-token:
/api-token:
get:
description: Get All active Api Tokens
summary: Get All active Api Tokens
security:
- ApiKeyAuth: []
responses:
"200":
description: Successfully fetched active API tokens links
Expand All @@ -17,6 +22,9 @@ paths:
$ref: "#/components/schemas/ApiToken"
post:
description: Create api-token
summary: Create Api Token
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
Expand All @@ -32,9 +40,12 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/CreateApiTokenResponse"
/orchestrator/api-token/{id}:
/api-token/{id}:
put:
description: Update api-token
summary: Update Api Token
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
Expand All @@ -58,6 +69,9 @@ paths:
$ref: "#/components/schemas/UpdateApiTokenResponse"
delete:
description: Delete api-token
summary: Delete the Api Token
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
Expand All @@ -74,6 +88,11 @@ paths:
schema:
$ref: "#/components/schemas/ActionResponse"
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
schemas:
ApiToken:
type: object
Expand Down
16 changes: 15 additions & 1 deletion specs/gitops-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ info:
version: 1.0.0
title: GitOps Validation
servers:
- url: http://localhost:3000/orchestrator/gitops
- url: https://api.yourdomain.com
paths:
/validate:
post:
description: Validate gitops configuration by dry run
summary: Validate gitops configuration by dry run
security:
- ApiKeyAuth: []
operationId: GitOpsValidateDryRun
requestBody:
description: A JSON object containing the gitops configuration
Expand Down Expand Up @@ -44,6 +47,9 @@ paths:
/config:
post:
description: create/save new configuration and validate them before saving
summary: create/save new configuration and validate them before saving
security:
- ApiKeyAuth: []
operationId: CreateGitOpsConfig
requestBody:
description: A JSON object containing the gitops configuration
Expand Down Expand Up @@ -79,7 +85,10 @@ paths:
$ref: '#/components/schemas/Error'
put:
description: update configuration and validate them before saving(if last validation is within 30 seconds then do not validate)
summary: update configuration and validate them before saving(if last validation is within 30 seconds then do not validate)
operationId: UpdateGitOpsConfig
security:
- ApiKeyAuth: []
requestBody:
description: A JSON object containing the gitops configuration
required: true
Expand Down Expand Up @@ -114,6 +123,11 @@ paths:
$ref: '#/components/schemas/Error'

components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
schemas:
GitOpsConfigDto:
type: object
Expand Down
Loading
Loading