Skip to content

Commit 3ba7ce5

Browse files
committed
corrected api specs
1 parent 540ca01 commit 3ba7ce5

File tree

5 files changed

+335
-160
lines changed

5 files changed

+335
-160
lines changed

specs/app-store.yaml

Lines changed: 73 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,64 @@ openapi: "3.0.0"
22
info:
33
version: 1.0.0
44
title: Devtron Labs
5+
description: Devtron API for app store management
6+
termsOfService: https://devtron.ai/terms/
7+
contact:
8+
name: Devtron Labs
9+
10+
url: https://devtron.ai
11+
license:
12+
name: Apache 2.0
13+
url: https://www.apache.org/licenses/LICENSE-2.0.html
14+
servers:
15+
- url: http://localhost:8080/orchestrator
516
paths:
6-
/orchestrator/app-store/discover/:
17+
/app-store/discover:
718
get:
819
description: this api will return all the charts from charts repos.
9-
parameters: [ ]
20+
parameters:
21+
- name: includeDeprecated
22+
in: query
23+
description: include deprecated charts
24+
required: false
25+
schema:
26+
type: boolean
27+
- name: chartRepoId
28+
in: query
29+
description: chart repository ids (comma separated)
30+
required: false
31+
schema:
32+
type: string
33+
- name: registryId
34+
in: query
35+
description: registry ids (comma separated)
36+
required: false
37+
schema:
38+
type: string
39+
- name: appStoreName
40+
in: query
41+
description: app store name filter
42+
required: false
43+
schema:
44+
type: string
45+
- name: offset
46+
in: query
47+
description: offset for pagination
48+
required: false
49+
schema:
50+
type: integer
51+
- name: size
52+
in: query
53+
description: size for pagination
54+
required: false
55+
schema:
56+
type: integer
57+
- name: chartCategoryId
58+
in: query
59+
description: chart category ids (comma separated)
60+
required: false
61+
schema:
62+
type: string
1063
responses:
1164
'200':
1265
description: list response
@@ -21,15 +74,10 @@ paths:
2174
type: string
2275
description: status
2376
result:
24-
allOf:
25-
- type: object
26-
properties:
27-
appId:
28-
type: integer
29-
description: unique application id
30-
required:
31-
- appId
32-
- $ref: '#/components/schemas/AppStore'
77+
type: array
78+
description: app store applications with versions
79+
items:
80+
$ref: '#/components/schemas/AppStoreWithVersion'
3381
default:
3482
description: unexpected error
3583
content:
@@ -45,11 +93,8 @@ paths:
4593
# components mentioned below
4694
components:
4795
schemas:
48-
AppStore:
96+
AppStoreWithVersion:
4997
type: object
50-
required:
51-
- id
52-
- name
5398
properties:
5499
id:
55100
type: integer
@@ -60,13 +105,13 @@ components:
60105
appStoreApplicationVersionId:
61106
type: integer
62107
description: app store version id
63-
chart_git_location:
108+
chartGitLocation:
64109
type: string
65110
description: chart git repo location
66-
chart_name:
111+
chartName:
67112
type: string
68113
description: chart name
69-
chart_repo_id:
114+
chartRepoId:
70115
type: integer
71116
description: app store and chart repo link id
72117
deprecated:
@@ -78,18 +123,26 @@ components:
78123
icon:
79124
type: string
80125
description: app store icon link
81-
created_on:
126+
createdOn:
82127
type: string
128+
format: date-time
83129
description: created on
84-
updated_on:
130+
updatedOn:
85131
type: string
132+
format: date-time
86133
description: modification date
87134
version:
88135
type: string
89136
description: app store version
90137
active:
91138
type: boolean
92139
description: active app store
140+
chartRepoName:
141+
type: string
142+
description: chart repository name
143+
isChartRepoActive:
144+
type: boolean
145+
description: whether chart repository is active
93146

94147
ErrorResponse:
95148
required:

specs/application.yaml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@ openapi: "3.0.0"
22
info:
33
version: 1.0.0
44
title: Devtron Labs
5+
description: Devtron API for application management
6+
termsOfService: https://devtron.ai/terms/
7+
contact:
8+
name: Devtron Labs
9+
10+
url: https://devtron.ai
11+
license:
12+
name: Apache 2.0
13+
url: https://www.apache.org/licenses/LICENSE-2.0.html
14+
servers:
15+
- url: http://localhost:8080/orchestrator
516
paths:
6-
/orchestrator/app:
17+
/core/v1beta1/application:
718
post:
819
description: create new application
920
requestBody:
@@ -12,7 +23,7 @@ paths:
1223
content:
1324
application/json:
1425
schema:
15-
$ref: '#/components/schemas/App'
26+
$ref: '#/components/schemas/CreateAppRequest'
1627
responses:
1728
'200':
1829
description: App create response
@@ -27,24 +38,15 @@ paths:
2738
type: string
2839
description: status
2940
result:
30-
type: object
31-
description: string
32-
allOf:
33-
- type: object
34-
properties:
35-
id:
36-
type: integer
37-
description: unique application id
38-
required:
39-
- id
40-
- $ref: '#/components/schemas/App'
41+
type: string
42+
description: success message
4143
default:
4244
description: unexpected error
4345
content:
4446
application/json:
4547
schema:
4648
$ref: '#/components/schemas/ErrorResponse'
47-
/orchestrator/app/edit:
49+
/app/edit:
4850
post:
4951
description: update application projects and labels
5052
requestBody:
@@ -86,7 +88,7 @@ paths:
8688
schema:
8789
$ref: '#/components/schemas/ErrorResponse'
8890

89-
/orchestrator/app/list:
91+
/app/list:
9092
post:
9193
description: app listing, collection of deployed applications or undeployed or incomplete configured apps.
9294
requestBody:
@@ -136,7 +138,7 @@ paths:
136138
schema:
137139
$ref: '#/components/schemas/ErrorResponse'
138140

139-
/orchestrator/app/edit/projects:
141+
/app/edit/projects:
140142
post:
141143
description: update project for app
142144
requestBody:
@@ -189,6 +191,24 @@ components:
189191
type: boolean
190192
description: Whether to propagate to kubernetes resources
191193

194+
CreateAppRequest:
195+
type: object
196+
required:
197+
- metadata
198+
properties:
199+
metadata:
200+
$ref: '#/components/schemas/App'
201+
appWorkflows:
202+
type: array
203+
description: app workflows
204+
items:
205+
type: object
206+
environmentOverrides:
207+
type: array
208+
description: environment overrides
209+
items:
210+
type: object
211+
192212
App:
193213
type: object
194214
required:

specs/cluster_api_spec.yaml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@ openapi: "3.0.0"
22
info:
33
version: 1.0.0
44
title: Devtron Labs
5+
description: Devtron API for cluster management
6+
termsOfService: https://devtron.ai/terms/
7+
contact:
8+
name: Devtron Labs
9+
10+
url: https://devtron.ai
11+
license:
12+
name: Apache 2.0
13+
url: https://www.apache.org/licenses/LICENSE-2.0.html
14+
servers:
15+
- url: http://localhost:8080/orchestrator
516
paths:
6-
/orchestrator/cluster:
17+
/cluster:
718
put:
819
description: Update Cluster
920
operationId: UpdateCluster
@@ -74,7 +85,7 @@ paths:
7485
application/json:
7586
schema:
7687
$ref: '#/components/schemas/Error'
77-
/orchestrator/cluster/auth-list:
88+
/cluster/auth-list:
7889
get:
7990
description: list of accessible cluster
8091
responses:
@@ -109,22 +120,41 @@ components:
109120
properties:
110121
id:
111122
type: integer
123+
description: cluster id
112124
cluster_name:
113125
type: string
126+
description: cluster name
127+
description:
128+
type: string
129+
description: cluster description
114130
server_url:
115131
type: string
132+
description: server url
116133
prometheus_url:
117134
type: string
135+
description: prometheus url
118136
active:
119137
type: boolean
138+
description: whether cluster is active
120139
config:
121140
type: object
122-
properties:
123-
bearer_token:
124-
type: string
125-
description: it will be empty while fetching, and if no change while updating
126-
k8sversion:
141+
additionalProperties:
142+
type: string
143+
description: cluster config
144+
prometheusAuth:
145+
$ref: '#/components/schemas/PrometheusAuth'
146+
k8sVersion:
147+
type: string
148+
description: kubernetes version
149+
errorInConnecting:
127150
type: string
151+
description: error message if cluster failed to connect
152+
isVirtualCluster:
153+
type: boolean
154+
description: whether cluster is virtual
155+
agentInstallationStage:
156+
type: integer
157+
description: agent installation stage
128158
PrometheusAuth:
129159
type: object
130160
properties:

0 commit comments

Comments
 (0)