Skip to content

Commit 0353b5e

Browse files
committed
api specs
1 parent 6b58c01 commit 0353b5e

File tree

7 files changed

+854
-8
lines changed

7 files changed

+854
-8
lines changed

specs/app_create_api.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ info:
33
version: 1.0.0
44
title: Create App Api
55
paths:
6-
/orchestrator/core/v1beta1/application/{appId}:
6+
/core/v1beta1/application/{appId}:
77
get:
88
description: Get all details of an app by appId. These details include - metadata(appName, projectNamr, labels), gitMaterials, docker config, templates, workflows, configMaps, secrets, environment override configurations.
99
operationId: GetAppAllDetail
@@ -108,7 +108,7 @@ paths:
108108
application/json:
109109
schema:
110110
$ref: '#/components/schemas/Error'
111-
/orchestrator/core/v1beta1/application:
111+
/core/v1beta1/application:
112112
post:
113113
description: Creates a new app for the configurations provided. The input json object is the same we get in response of GET method for fetching all details of an app
114114
operationId: CreateApp
@@ -121,11 +121,21 @@ paths:
121121
$ref: '#/components/schemas/AppDetail'
122122
responses:
123123
'200':
124-
description: Successfully return a message stating the operation is successful.
124+
description: Successfully created the application
125125
content:
126126
application/json:
127127
schema:
128-
type: string
128+
type: object
129+
properties:
130+
code:
131+
type: integer
132+
description: HTTP status code
133+
status:
134+
type: string
135+
description: Status message
136+
result:
137+
type: string
138+
description: Success message
129139
'400':
130140
description: Bad Request. Validation error/wrong request body.
131141
content:

specs/applisting.yaml

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ info:
33
version: 1.0.0
44
title: Devtron Labs
55
paths:
6-
/orchestrator/app/autocomplete:
6+
/app/autocomplete:
77
get:
88
description: list of namespaces group by clusters
99
parameters:
@@ -60,6 +60,69 @@ components:
6060
name:
6161
type: string
6262
description: app name
63+
teamId:
64+
type: integer
65+
description: project id
66+
teamName:
67+
type: string
68+
description: project name
69+
active:
70+
type: boolean
71+
description: whether app is active
72+
createdOn:
73+
type: string
74+
format: date-time
75+
description: creation timestamp
76+
createdBy:
77+
type: string
78+
description: creator's name
79+
updatedOn:
80+
type: string
81+
format: date-time
82+
description: last update timestamp
83+
material:
84+
type: array
85+
description: git materials
86+
items:
87+
$ref: '#/components/schemas/GitMaterial'
88+
labels:
89+
type: array
90+
description: app labels
91+
items:
92+
$ref: '#/components/schemas/AppLabel'
93+
AppLabel:
94+
type: object
95+
properties:
96+
key:
97+
type: string
98+
description: label key
99+
value:
100+
type: string
101+
description: label value
102+
propagate:
103+
type: boolean
104+
description: whether to propagate to kubernetes resources
105+
GitMaterial:
106+
type: object
107+
properties:
108+
id:
109+
type: integer
110+
description: material id
111+
gitProviderId:
112+
type: integer
113+
description: git provider id
114+
gitProviderUrl:
115+
type: string
116+
description: git provider url
117+
gitRepoUrl:
118+
type: string
119+
description: git repository url
120+
checkoutPath:
121+
type: string
122+
description: checkout path
123+
fetchSubmodules:
124+
type: boolean
125+
description: whether to fetch submodules
63126
ErrorResponse:
64127
required:
65128
- code

specs/cluster_api_spec.yaml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ info:
1212
name: Apache 2.0
1313
url: https://www.apache.org/licenses/LICENSE-2.0.html
1414
servers:
15-
- url: http://localhost:8080/orchestrator
15+
- url: http://localhost:8080
1616
paths:
1717
/cluster:
1818
put:
@@ -155,6 +155,25 @@ components:
155155
agentInstallationStage:
156156
type: integer
157157
description: agent installation stage
158+
createdOn:
159+
type: string
160+
format: date-time
161+
description: creation timestamp
162+
updatedOn:
163+
type: string
164+
format: date-time
165+
description: last update timestamp
166+
createdBy:
167+
type: string
168+
description: creator's name
169+
updatedBy:
170+
type: string
171+
description: last updater's name
172+
defaultClusterComponent:
173+
type: array
174+
description: default cluster components
175+
items:
176+
$ref: '#/components/schemas/DefaultClusterComponent'
158177
PrometheusAuth:
159178
type: object
160179
properties:
@@ -196,6 +215,26 @@ components:
196215
errorInConnecting:
197216
type: string
198217
description: error message if cluster failed to connect
218+
isVirtualCluster:
219+
type: boolean
220+
description: whether cluster is virtual
221+
serverUrl:
222+
type: string
223+
description: cluster server URL
224+
config:
225+
type: object
226+
description: cluster configuration
227+
properties:
228+
bearerToken:
229+
type: string
230+
description: bearer token for cluster access
231+
tlsConfig:
232+
type: object
233+
description: TLS configuration
234+
properties:
235+
insecureSkipTLSVerify:
236+
type: boolean
237+
description: whether to skip TLS verification
199238

200239
ErrorResponse:
201240
required:

0 commit comments

Comments
 (0)