-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
Copy pathdevcenter.json
350 lines (350 loc) · 9.42 KB
/
devcenter.json
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
{
"swagger": "2.0",
"info": {
"version": "2023-09-01-preview",
"title": "DevCenter"
},
"x-ms-parameterized-host": {
"hostTemplate": "{endpoint}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "devcenter.json#/parameters/EndpointParameter"
}
]
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"AADToken": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"AADToken": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/projects": {
"get": {
"tags": [
"Projects"
],
"description": "Lists all projects.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/FilterParameter"
},
{
"$ref": "#/parameters/TopParameter"
}
],
"operationId": "DevCenter_ListProjects",
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/ProjectListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"DevCenter_ListProjects": {
"$ref": "./examples/Projects_ListByDevCenter.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/projects/{projectName}": {
"get": {
"tags": [
"Projects"
],
"description": "Gets a project.",
"parameters": [
{
"$ref": "#/parameters/ProjectNameMethodParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"operationId": "DevCenter_GetProject",
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/Project"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"DevCenter_GetProject": {
"$ref": "./examples/Projects_Get.json"
}
}
}
}
},
"definitions": {
"ProjectListResult": {
"description": "Results of the project list operation.",
"type": "object",
"properties": {
"value": {
"description": "Current page of results.",
"type": "array",
"items": {
"$ref": "#/definitions/Project"
}
},
"nextLink": {
"description": "URL to get the next set of results if there are any.",
"type": "string"
}
},
"required": [
"value"
]
},
"Project": {
"description": "Project details.",
"type": "object",
"properties": {
"uri": {
"description": "The unique URI of the project",
"type": "string"
},
"name": {
"type": "string",
"description": "Name of the project"
},
"description": {
"type": "string",
"description": "Description of the project."
},
"maxDevBoxesPerUser": {
"type": "integer",
"format": "int32",
"minimum": 0,
"description": "When specified, indicates the maximum number of Dev Boxes a single user can create across all pools in the project."
},
"displayName": {
"type": "string",
"description": "Display name of the project."
}
},
"required": [
"uri",
"name"
]
},
"CloudError": {
"x-ms-external": true,
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"description": "Error body",
"$ref": "#/definitions/CloudErrorBody"
}
},
"description": "An error response from the service."
},
"CloudErrorBody": {
"x-ms-external": true,
"description": "An error response from the service.",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
},
"message": {
"type": "string",
"description": "A message describing the error, intended to be suitable for display in a user interface."
},
"target": {
"type": "string",
"description": "The target of the particular error. For example, the name of the property in error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudErrorBody"
},
"description": "A list of additional details about the error."
}
}
},
"OperationStatus": {
"description": "The current status of an async operation",
"type": "object",
"properties": {
"id": {
"description": "Fully qualified ID for the operation status.",
"type": "string"
},
"name": {
"description": "The operation id name",
"type": "string"
},
"status": {
"description": "Provisioning state of the resource.",
"type": "string"
},
"resourceId": {
"description": "The id of the resource.",
"type": "string"
},
"startTime": {
"description": "The start time of the operation",
"type": "string",
"format": "date-time"
},
"endTime": {
"description": "The end time of the operation",
"type": "string",
"format": "date-time"
},
"percentComplete": {
"description": "Percent of the operation that is complete",
"type": "number",
"minimum": 0,
"maximum": 100
},
"properties": {
"description": "Custom operation properties, populated only for a successful operation.",
"type": "object"
},
"error": {
"description": "Operation Error message",
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
}
}
}
},
"required": [
"status"
]
}
},
"parameters": {
"ProjectNameParameter": {
"name": "projectName",
"description": "The DevCenter Project upon which to execute operations.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$",
"minLength": 3,
"maxLength": 63,
"in": "path",
"x-ms-parameter-location": "client"
},
"ProjectNameMethodParameter": {
"name": "projectName",
"description": "The DevCenter Project upon which to execute operations.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$",
"minLength": 3,
"maxLength": 63,
"in": "path",
"x-ms-parameter-location": "method"
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The API version to be used with the HTTP request.",
"x-ms-parameter-location": "client"
},
"FilterParameter": {
"name": "filter",
"in": "query",
"description": "An OData filter clause to apply to the operation.",
"type": "string",
"required": false,
"x-ms-parameter-location": "method"
},
"TopParameter": {
"name": "top",
"in": "query",
"description": "The maximum number of resources to return from the operation. Example: 'top=10'.",
"type": "integer",
"format": "int32",
"required": false,
"x-ms-parameter-location": "method"
},
"UserIdParameter": {
"name": "userId",
"in": "path",
"required": true,
"x-ms-client-default": "me",
"type": "string",
"pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$",
"minLength": 2,
"maxLength": 36,
"description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.",
"x-ms-parameter-location": "method"
},
"EndpointParameter": {
"name": "endpoint",
"description": "The DevCenter-specific URI to operate on.",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "client"
}
}
}