summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzlyqqq <hfzhengliuyang@163.com>2017-12-06 16:43:30 +0800
committerzlyqqq <hfzhengliuyang@163.com>2017-12-06 16:43:30 +0800
commit82a53de9b178f488e7b7d045096438e3a85a445c (patch)
tree376591e95d9b84238aed4c724618831dc8e36d60
parent51d5b63a083450468cec474b9b6400df5d977091 (diff)
Reorganize api-ref:v3 groups
Notes
Notes (review): Code-Review+2: Colleen Murphy <colleen@gazlene.net> Code-Review+2: Lance Bragstad <lbragstad@gmail.com> Workflow+1: Lance Bragstad <lbragstad@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 07 Dec 2017 06:55:11 +0000 Reviewed-on: https://review.openstack.org/525989 Project: openstack/keystone Branch: refs/heads/master
-rw-r--r--api-ref/source/v3/groups.inc336
1 files changed, 195 insertions, 141 deletions
diff --git a/api-ref/source/v3/groups.inc b/api-ref/source/v3/groups.inc
index 834614b..93175da 100644
--- a/api-ref/source/v3/groups.inc
+++ b/api-ref/source/v3/groups.inc
@@ -26,33 +26,26 @@ List groups
26 26
27.. rest_method:: GET /v3/groups 27.. rest_method:: GET /v3/groups
28 28
29Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/groups``
30
31Lists groups. 29Lists groups.
32 30
33Response Codes 31Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/groups``
34--------------
35
36.. rest_status_code:: success status.yaml
37
38 - 200
39
40.. rest_status_code:: error status.yaml
41 32
42 - 400 33Request
43 - 401 34-------
44 - 403
45 35
46Request Parameters 36Parameters
47------------------ 37~~~~~~~~~~
48 38
49.. rest_parameters:: parameters.yaml 39.. rest_parameters:: parameters.yaml
50 40
51 - name: group_name_query 41 - name: group_name_query
52 - domain_id: domain_id_query 42 - domain_id: domain_id_query
53 43
54Response Parameters 44Response
55------------------- 45--------
46
47Parameters
48~~~~~~~~~~
56 49
57.. rest_parameters:: parameters.yaml 50.. rest_parameters:: parameters.yaml
58 51
@@ -64,8 +57,21 @@ Response Parameters
64 - links: link_response_body 57 - links: link_response_body
65 - name: group_name_response_body 58 - name: group_name_response_body
66 59
67Response Example 60Status Codes
68---------------- 61~~~~~~~~~~~~
62
63.. rest_status_code:: success status.yaml
64
65 - 200
66
67.. rest_status_code:: error status.yaml
68
69 - 400
70 - 401
71 - 403
72
73Example
74~~~~~~~
69 75
70.. literalinclude:: ./samples/admin/groups-list-response.json 76.. literalinclude:: ./samples/admin/groups-list-response.json
71 :language: javascript 77 :language: javascript
@@ -76,26 +82,15 @@ Create group
76 82
77.. rest_method:: POST /v3/groups 83.. rest_method:: POST /v3/groups
78 84
79Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/groups``
80
81Creates a group. 85Creates a group.
82 86
83Response Codes 87Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/groups``
84--------------
85
86.. rest_status_code:: success status.yaml
87 88
88 - 201 89Request
90-------
89 91
90.. rest_status_code:: error status.yaml 92Parameters
91 93~~~~~~~~~~
92 - 400
93 - 401
94 - 403
95 - 409
96
97Request Parameters
98------------------
99 94
100.. rest_parameters:: parameters.yaml 95.. rest_parameters:: parameters.yaml
101 96
@@ -104,14 +99,17 @@ Request Parameters
104 - domain_id: group_domain_id_request_body 99 - domain_id: group_domain_id_request_body
105 - name: group_name_request_body 100 - name: group_name_request_body
106 101
107Request Example 102Example
108--------------- 103~~~~~~~
109 104
110.. literalinclude:: ./samples/admin/group-create-request.json 105.. literalinclude:: ./samples/admin/group-create-request.json
111 :language: javascript 106 :language: javascript
112 107
113Response Parameters 108Response
114------------------- 109--------
110
111Parameters
112~~~~~~~~~~
115 113
116.. rest_parameters:: parameters.yaml 114.. rest_parameters:: parameters.yaml
117 115
@@ -122,8 +120,22 @@ Response Parameters
122 - links: link_response_body 120 - links: link_response_body
123 - name: group_name_response_body 121 - name: group_name_response_body
124 122
125Response Example 123Status Codes
126---------------- 124~~~~~~~~~~~~
125
126.. rest_status_code:: success status.yaml
127
128 - 201
129
130.. rest_status_code:: error status.yaml
131
132 - 400
133 - 401
134 - 403
135 - 409
136
137Example
138~~~~~~~
127 139
128.. literalinclude:: ./samples/admin/group-show-response.json 140.. literalinclude:: ./samples/admin/group-show-response.json
129 :language: javascript 141 :language: javascript
@@ -134,33 +146,25 @@ Show group details
134 146
135.. rest_method:: GET /v3/groups/{group_id} 147.. rest_method:: GET /v3/groups/{group_id}
136 148
137Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group``
138
139Shows details for a group. 149Shows details for a group.
140 150
141Response Codes 151Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group``
142--------------
143
144.. rest_status_code:: success status.yaml
145
146 - 200
147
148.. rest_status_code:: error status.yaml
149 152
150 - 400 153Request
151 - 401 154-------
152 - 403
153 - 404
154 155
155Request Parameters 156Parameters
156------------------ 157~~~~~~~~~~
157 158
158.. rest_parameters:: parameters.yaml 159.. rest_parameters:: parameters.yaml
159 160
160 - group_id: group_id_path 161 - group_id: group_id_path
161 162
162Response Parameters 163Response
163------------------- 164--------
165
166Parameters
167~~~~~~~~~~
164 168
165.. rest_parameters:: parameters.yaml 169.. rest_parameters:: parameters.yaml
166 170
@@ -171,8 +175,22 @@ Response Parameters
171 - links: link_response_body 175 - links: link_response_body
172 - name: group_name_response_body 176 - name: group_name_response_body
173 177
174Response Example 178Status Codes
175---------------- 179~~~~~~~~~~~~
180
181.. rest_status_code:: success status.yaml
182
183 - 200
184
185.. rest_status_code:: error status.yaml
186
187 - 400
188 - 401
189 - 403
190 - 404
191
192Example
193~~~~~~~
176 194
177.. literalinclude:: ./samples/admin/group-show-response.json 195.. literalinclude:: ./samples/admin/group-show-response.json
178 :language: javascript 196 :language: javascript
@@ -183,31 +201,18 @@ Update group
183 201
184.. rest_method:: PATCH /v3/groups/{group_id} 202.. rest_method:: PATCH /v3/groups/{group_id}
185 203
186Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group``
187
188Updates a group. 204Updates a group.
189 205
190If the back-end driver does not support this functionality, the 206If the back-end driver does not support this functionality, the
191call returns the ``Not Implemented (501)`` response code. 207call returns the ``Not Implemented (501)`` response code.
192 208
193Response Codes 209Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group``
194--------------
195
196.. rest_status_code:: success status.yaml
197
198 - 200
199 210
200.. rest_status_code:: error status.yaml 211Request
212-------
201 213
202 - 400 214Parameters
203 - 401 215~~~~~~~~~~
204 - 403
205 - 404
206 - 409
207 - 501
208
209Request Parameters
210------------------
211 216
212.. rest_parameters:: parameters.yaml 217.. rest_parameters:: parameters.yaml
213 218
@@ -217,14 +222,17 @@ Request Parameters
217 - domain_id: group_domain_id_update_request_body 222 - domain_id: group_domain_id_update_request_body
218 - name: group_name_update_request_body 223 - name: group_name_update_request_body
219 224
220Request Example 225Example
221--------------- 226~~~~~~~
222 227
223.. literalinclude:: ./samples/admin/group-update-request.json 228.. literalinclude:: ./samples/admin/group-update-request.json
224 :language: javascript 229 :language: javascript
225 230
226Response Parameters 231Response
227------------------- 232--------
233
234Parameters
235~~~~~~~~~~
228 236
229.. rest_parameters:: parameters.yaml 237.. rest_parameters:: parameters.yaml
230 238
@@ -235,8 +243,24 @@ Response Parameters
235 - links: link_response_body 243 - links: link_response_body
236 - name: group_name_response_body 244 - name: group_name_response_body
237 245
238Response Example 246Status Codes
239---------------- 247~~~~~~~~~~~~
248
249.. rest_status_code:: success status.yaml
250
251 - 200
252
253.. rest_status_code:: error status.yaml
254
255 - 400
256 - 401
257 - 403
258 - 404
259 - 409
260 - 501
261
262Example
263~~~~~~~
240 264
241.. literalinclude:: ./samples/admin/group-update-response.json 265.. literalinclude:: ./samples/admin/group-update-response.json
242 :language: javascript 266 :language: javascript
@@ -247,12 +271,25 @@ Delete group
247 271
248.. rest_method:: DELETE /v3/groups/{group_id} 272.. rest_method:: DELETE /v3/groups/{group_id}
249 273
274Deletes a group.
275
250Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group`` 276Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group``
251 277
252Deletes a group. 278Request
279-------
280
281Parameters
282~~~~~~~~~~
283
284.. rest_parameters:: parameters.yaml
285
286 - group_id: group_id_path
287
288Response
289--------
253 290
254Response Codes 291Status Codes
255-------------- 292~~~~~~~~~~~~
256 293
257.. rest_status_code:: success status.yaml 294.. rest_status_code:: success status.yaml
258 295
@@ -265,25 +302,32 @@ Response Codes
265 - 403 302 - 403
266 - 404 303 - 404
267 304
268Request Parameters
269------------------
270
271.. rest_parameters:: parameters.yaml
272
273 - group_id: group_id_path
274
275 305
276List users in group 306List users in group
277=================== 307===================
278 308
279.. rest_method:: GET /v3/groups/{group_id}/users 309.. rest_method:: GET /v3/groups/{group_id}/users
280 310
311Lists the users that belong to a group.
312
281Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_users`` 313Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_users``
282 314
283Lists the users that belong to a group. 315Request
316-------
317
318Parameters
319~~~~~~~~~~
284 320
285Response Codes 321.. rest_parameters:: parameters.yaml
286-------------- 322
323 - group_id: group_id_path
324 - password_expires_at: password_expires_at_query
325
326Response
327--------
328
329Status Codes
330~~~~~~~~~~~~
287 331
288.. rest_status_code:: success status.yaml 332.. rest_status_code:: success status.yaml
289 333
@@ -296,16 +340,8 @@ Response Codes
296 - 403 340 - 403
297 - 404 341 - 404
298 342
299Request Parameters 343Example
300------------------ 344~~~~~~~
301
302.. rest_parameters:: parameters.yaml
303
304 - group_id: group_id_path
305 - password_expires_at: password_expires_at_query
306
307Response Example
308----------------
309 345
310.. literalinclude:: ./samples/admin/group-users-list-response.json 346.. literalinclude:: ./samples/admin/group-users-list-response.json
311 :language: javascript 347 :language: javascript
@@ -316,12 +352,26 @@ Add user to group
316 352
317.. rest_method:: PUT /v3/groups/{group_id}/users/{user_id} 353.. rest_method:: PUT /v3/groups/{group_id}/users/{user_id}
318 354
355Adds a user to a group.
356
319Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_user`` 357Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_user``
320 358
321Adds a user to a group. 359Request
360-------
361
362Parameters
363~~~~~~~~~~
364
365.. rest_parameters:: parameters.yaml
366
367 - user_id: user_id_path
368 - group_id: group_id_path
369
370Response
371--------
322 372
323Response Codes 373Status Codes
324-------------- 374~~~~~~~~~~~~
325 375
326.. rest_status_code:: success status.yaml 376.. rest_status_code:: success status.yaml
327 377
@@ -334,26 +384,32 @@ Response Codes
334 - 403 384 - 403
335 - 404 385 - 404
336 386
337Request Parameters
338------------------
339
340.. rest_parameters:: parameters.yaml
341
342 - user_id: user_id_path
343 - group_id: group_id_path
344
345 387
346Check whether user belongs to group 388Check whether user belongs to group
347=================================== 389===================================
348 390
349.. rest_method:: HEAD /v3/groups/{group_id}/users/{user_id} 391.. rest_method:: HEAD /v3/groups/{group_id}/users/{user_id}
350 392
393Validates that a user belongs to a group.
394
351Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_user`` 395Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_user``
352 396
353Validates that a user belongs to a group. 397Request
398-------
399
400Parameters
401~~~~~~~~~~
402
403.. rest_parameters:: parameters.yaml
404
405 - user_id: user_id_path
406 - group_id: group_id_path
354 407
355Response Codes 408Response
356-------------- 409--------
410
411Status Codes
412~~~~~~~~~~~~
357 413
358.. rest_status_code:: success status.yaml 414.. rest_status_code:: success status.yaml
359 415
@@ -366,26 +422,32 @@ Response Codes
366 - 403 422 - 403
367 - 404 423 - 404
368 424
369Request Parameters
370------------------
371
372.. rest_parameters:: parameters.yaml
373
374 - user_id: user_id_path
375 - group_id: group_id_path
376
377 425
378Remove user from group 426Remove user from group
379====================== 427======================
380 428
381.. rest_method:: DELETE /v3/groups/{group_id}/users/{user_id} 429.. rest_method:: DELETE /v3/groups/{group_id}/users/{user_id}
382 430
431Removes a user from a group.
432
383Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_user`` 433Relationship: ``https://docs.openstack.org/api/openstack-identity/3/rel/group_user``
384 434
385Removes a user from a group. 435Request
436-------
437
438Parameters
439~~~~~~~~~~
386 440
387Response Codes 441.. rest_parameters:: parameters.yaml
388-------------- 442
443 - user_id: user_id_path
444 - group_id: group_id_path
445
446Response
447--------
448
449Status Codes
450~~~~~~~~~~~~
389 451
390.. rest_status_code:: success status.yaml 452.. rest_status_code:: success status.yaml
391 453
@@ -397,11 +459,3 @@ Response Codes
397 - 401 459 - 401
398 - 403 460 - 403
399 - 404 461 - 404
400
401Request Parameters
402------------------
403
404.. rest_parameters:: parameters.yaml
405
406 - user_id: user_id_path
407 - group_id: group_id_path