
Some request details provided information about the other JSON value while others didn't. To make things consistent and to make sure API consumers understand how the requests need to be structured, this adds missing instances. It also reorders some parameter lists to be a little more logical, so even though we can't show the nested nature of some of these, it at least doesn't show inner values before outer ones. This also corrects many errors seen while going through the API ref. This is by no means exhaustive, and is already somewhat out of the scope for this patch, so it is expected that there are some (many) cases that are not addressed by this patch. Those will be fixed with ongoing effort in future patches. Partial-bug: #1713517 Change-Id: I30964ba8d829778fd01174d639d44ba07e4b77a6
238 lines
4.7 KiB
ReStructuredText
238 lines
4.7 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
Group snapshots
|
|
===============
|
|
|
|
Lists all, lists all with details, shows details for, creates, and
|
|
deletes group snapshots.
|
|
|
|
|
|
Delete group snapshot
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: DELETE /v3/{project_id}/group_snapshots/{group_snapshot_id}
|
|
|
|
Deletes a group snapshot.
|
|
|
|
Normal response codes: 202
|
|
|
|
Error response codes: badRequest(400), itemNotFound(404)
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- group_snapshot_id: group_snapshot_id
|
|
|
|
|
|
Show group snapshot details
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{project_id}/group_snapshots/{group_snapshot_id}
|
|
|
|
Shows details for a group snapshot.
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: badRequest(400), itemNotFound(404)
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- group_snapshot_id: group_snapshot_id
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- group_snapshot: group_snapshot
|
|
- created_at: created_at
|
|
- group_id: source_group_id
|
|
- id: group_snapshot_id_1
|
|
- name: name_18
|
|
- status: status_7
|
|
- description: description_14
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/group-snapshots-show-response.json
|
|
:language: javascript
|
|
|
|
|
|
List group snapshots with details
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{project_id}/group_snapshots/detail
|
|
|
|
Lists all group snapshots with details. Since v3.31 if non-admin
|
|
users specify invalid filters in the url, API will return bad request.
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: badRequest(400)
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- sort_key: sort_key_group_snapshot
|
|
- sort_dir: sort_dir_group_snapshot
|
|
- limit: limit_group_snapshot
|
|
- offset: offset_group_snapshot
|
|
- marker: marker_group_snapshot
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- group_snapshots: group_snapshots
|
|
- id: group_snapshot_id_1
|
|
- name: name_18
|
|
- status: status_7
|
|
- description: description_14
|
|
- created_at: created_at
|
|
- group_id: group_id_1
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/group-snapshots-list-detailed-response.json
|
|
:language: javascript
|
|
|
|
List group snapshots
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{project_id}/group_snapshots
|
|
|
|
Lists all group snapshots, since v3.31 if non-admin users
|
|
specify invalid filters in the url, API will return bad request.
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: badRequest(400)
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- sort_key: sort_key_group_snapshot
|
|
- sort_dir: sort_dir_group_snapshot
|
|
- limit: limit_group_snapshot
|
|
- offset: offset_group_snapshot
|
|
- marker: marker_group_snapshot
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- group_snapshots: group_snapshots
|
|
- id: group_snapshot_id_1
|
|
- name: name_18
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/group-snapshots-list-response.json
|
|
:language: javascript
|
|
|
|
|
|
Create group snapshot
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: POST /v3/{project_id}/group_snapshots
|
|
|
|
Creates a group snapshot.
|
|
|
|
Normal response codes: 202
|
|
|
|
Error response codes: badRequest(400), itemNotFound(404)
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id_path
|
|
- group_snapshot: group_snapshot
|
|
- name: name_18
|
|
- description: description_14
|
|
- group_id: group_id_1
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/group-snapshots-create-request.json
|
|
:language: javascript
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- group_snapshot: group_snapshot
|
|
- id: group_snapshot_id_1
|
|
- name: name_18
|
|
- status: status_7
|
|
- description: description_14
|
|
- created_at: created_at
|
|
- group_id: group_id_1
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/group-snapshots-create-response.json
|
|
:language: javascript
|
|
|
|
|
|
Reset group snapshot status
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: POST /v3/{project_id}/group_snapshots/{group_snapshot_id}/action
|
|
|
|
Resets the status for a group snapshot. Specifies the ``reset_status`` action in the request body.
|
|
|
|
Normal response codes: 202
|
|
|
|
Error response codes: badRequest(400), itemNotFound(404)
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- project_id: project_id
|
|
- group_snapshot_id: group_snapshot_id
|
|
- reset_status: reset_status
|
|
- status: status_7
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/group-snapshot-reset-status-request.json
|
|
:language: javascript
|