-
Notifications
You must be signed in to change notification settings - Fork 527
/
Copy pathapiToken_api-spec.yaml
195 lines (195 loc) · 5.26 KB
/
apiToken_api-spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
openapi: "3.0.3"
info:
version: 1.0.0
title: Devtron Labs
paths:
/orchestrator/api-token:
get:
description: Get All active Api Tokens
responses:
"200":
description: Successfully fetched active API tokens links
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ApiToken"
post:
description: Create api-token
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/CreateApiTokenRequest"
responses:
"200":
description: Api-token creation response
content:
application/json:
schema:
$ref: "#/components/schemas/CreateApiTokenResponse"
/orchestrator/api-token/{id}:
put:
description: Update api-token
parameters:
- name: id
in: path
description: api-token Id
required: true
schema:
type: integer
format: int64
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateApiTokenRequest"
responses:
"200":
description: Api-token update response
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateApiTokenResponse"
delete:
description: Delete api-token
parameters:
- name: id
in: path
description: api-token Id
required: true
schema:
type: integer
format: int64
responses:
"200":
description: Api-token delete response
content:
application/json:
schema:
$ref: "#/components/schemas/ActionResponse"
components:
schemas:
ApiToken:
type: object
properties:
id:
type: integer
description: Id of api-token
example: 1
nullable: false
userId:
type: integer
description: User Id associated with api-token
example: 1
nullable: false
userIdentifier:
type: string
description: EmailId of that api-token user
example: "some email"
nullable: false
name:
type: string
description: Name of api-token
example: "some name"
nullable: false
description:
type: string
description: Description of api-token
example: "some description"
nullable: false
expireAtInMs:
type: integer
description: Expiration time of api-token in milliseconds
example: "12344546"
format: int64
token:
type: string
description: Token of that api-token
example: "some token"
nullable: false
lastUsedAt:
type: string
description: Date of Last used of this token
example: "some date"
lastUsedByIp:
type: string
description: token last used by IP
example: "some ip"
updatedAt:
type: string
description: token last updatedAt
example: "some date"
CreateApiTokenRequest:
type: object
properties:
name:
type: string
description: Name of api-token
example: "some name"
nullable: false
description:
type: string
description: Description of api-token
example: "some description"
nullable: false
expireAtInMs:
type: integer
description: Expiration time of api-token in milliseconds
example: "12344546"
format: int64
UpdateApiTokenRequest:
type: object
properties:
description:
type: string
description: Description of api-token
example: "some description"
nullable: false
expireAtInMs:
type: integer
description: Expiration time of api-token in milliseconds
example: "12344546"
format: int64
ActionResponse:
type: object
properties:
success:
type: boolean
description: success or failure
example: true
CreateApiTokenResponse:
type: object
properties:
success:
type: boolean
description: success or failure
example: true
token:
type: string
description: Token of that api-token
example: "some token"
userId:
type: integer
description: User Id associated with api-token
example: 1
userIdentifier:
type: string
description: EmailId of that api-token user
example: "some email"
UpdateApiTokenResponse:
type: object
properties:
success:
type: boolean
description: success or failure
example: true
token:
type: string
description: Token of that api-token
example: "some token"