Skip to content

Commit c6d09cb

Browse files
committed
more apis Added
1 parent c0ef24c commit c6d09cb

File tree

1 file changed

+63
-7
lines changed

1 file changed

+63
-7
lines changed

specs/ent-only/drafts.yaml

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,63 @@ info:
33
version: 1.0.0
44
title: Drafts Management API
55
paths:
6-
/orchestrator/drafts:
6+
/orchestrator/draft:
7+
get:
8+
description: get draft by resource name, app, env and resource type
9+
parameters:
10+
- name: resourceName
11+
required: true
12+
in: query
13+
schema:
14+
type: string
15+
description: Name of the resource (e.g., ConfigMap name, Secret name, or DeploymentTemplateOverride identifier)
16+
example: "restart-env-DeploymentTemplateOverride"
17+
- name: appId
18+
required: true
19+
in: query
20+
schema:
21+
type: integer
22+
description: Application ID
23+
example: 26
24+
- name: envId
25+
required: true
26+
in: query
27+
schema:
28+
type: integer
29+
description: Environment ID
30+
example: 26
31+
- name: resourceType
32+
required: true
33+
in: query
34+
schema:
35+
type: integer
36+
description: Type of resource (0=ConfigMap, 1=Secret, 2=DeploymentTemplate, 3=DeploymentTemplateOverride)
37+
example: 3
38+
responses:
39+
'200':
40+
description: successfully return config draft response
41+
content:
42+
application/json:
43+
schema:
44+
$ref: '#/components/schemas/ConfigDraftResponse'
45+
'400':
46+
description: Bad Request. validation error/wrong request body.
47+
content:
48+
application/json:
49+
schema:
50+
$ref: '#/components/schemas/Error'
51+
'500':
52+
description: Internal Server Error
53+
content:
54+
application/json:
55+
schema:
56+
$ref: '#/components/schemas/Error'
57+
'403':
58+
description: Unauthorized User
59+
content:
60+
application/json:
61+
schema:
62+
$ref: '#/components/schemas/Error'
763
post:
864
description: create drafts
965
requestBody:
@@ -38,7 +94,7 @@ paths:
3894
application/json:
3995
schema:
4096
$ref: '#/components/schemas/Error'
41-
/orchestrator/drafts/{draftId}:
97+
/orchestrator/draft/{draftId}:
4298
get:
4399
description: fetch draft metadata for draftId
44100
parameters:
@@ -72,7 +128,7 @@ paths:
72128
application/json:
73129
schema:
74130
$ref: '#/components/schemas/Error'
75-
/orchestrator/drafts/version:
131+
/orchestrator/draft/version:
76132
put:
77133
description: add drafts version to a draft
78134
requestBody:
@@ -109,7 +165,7 @@ paths:
109165
application/json:
110166
schema:
111167
$ref: '#/components/schemas/Error'
112-
/orchestrator/drafts/version/comments:
168+
/orchestrator/draft/version/comments:
113169
delete:
114170
description: delete comment of a user
115171
parameters:
@@ -144,7 +200,7 @@ paths:
144200
application/json:
145201
schema:
146202
$ref: '#/components/schemas/Error'
147-
/orchestrator/drafts/version/comments/{draftId}:
203+
/orchestrator/draft/version/comments/{draftId}:
148204
get:
149205
description: get draft comments
150206
parameters:
@@ -178,7 +234,7 @@ paths:
178234
application/json:
179235
schema:
180236
$ref: '#/components/schemas/Error'
181-
/orchestrator/drafts/version/{draftId}:
237+
/orchestrator/draft/version/{draftId}:
182238
get:
183239
description: get drafts version metadata
184240
parameters:
@@ -394,7 +450,7 @@ components:
394450
description: 0 for Init, 1 for Discarded, 2 for Published, 3 for AwaitApproval
395451
DraftResourceType:
396452
type: integer
397-
description: 0 for Config Map, 1 for Secret and 2 for Deployment Template
453+
description: 0 for Config Map, 1 for Secret, 2 for Deployment Template, and 3 for Deployment Template Override
398454
ConfigDraftRequest:
399455
type: object
400456
properties:

0 commit comments

Comments
 (0)