Files
cloudkitty/doc/source/api-reference/v2/scope/scope.inc
Justin Ferrieu d78ba8740e Add a v2 API endpoint to reset the state of different scopes
A new endpoint is available to admin users on ``PUT /v2/scope``
with relatively similar parameters that are to be found on the
``GET /v2/scope`` endpoint regarding filtering. This allows
end users to reset the scope state of several scopes at once
if they are willing to.

Story: 2005395
Task: 30790
Change-Id: I28ccd24c65163b3e1b59e478653b01b84f2bb1b0
2019-07-18 08:05:50 +00:00

82 lines
1.3 KiB
HTML

====================
Scope state endpoint
====================
Get the status of several scopes
================================
Returns the status of several scopes.
.. rest_method:: GET /v2/scope
.. rest_parameters:: scope/scope_parameters.yml
- collector: collector
- fetcher: fetcher
- limit: limit
- offset: offset
- scope_id: scope_id
- scope_key: scope_key
Status codes
------------
.. rest_status_code:: success http_status.yml
- 200
.. rest_status_code:: error http_status.yml
- 400
- 403
- 404
- 405
Response
--------
.. rest_parameters:: scope/scope_parameters.yml
- collector: collector_resp
- fetcher: fetcher_resp
- state: state
- scope_id: scope_id_resp
- scope_key: scope_key_resp
Response Example
----------------
.. literalinclude:: ./api_samples/scope/scope_get.json
:language: javascript
Reset the status of several scopes
==================================
Reset the status of several scopes.
.. rest_method:: PUT /v2/scope
.. rest_parameters:: scope/scope_parameters.yml
- state: state
- collector: collector
- fetcher: fetcher
- scope_id: scope_id
- scope_key: scope_key
- all_scopes: all_scopes
Status codes
------------
.. rest_status_code:: success http_status.yml
- 202
.. rest_status_code:: error http_status.yml
- 400
- 403
- 404
- 405