ceilometer/api-ref/source/resources.inc
Ha Van Tu 37c45c03c1 Refactor Ceilometer resource API
This patch refactors Ceilometer resource API to make it be readable
and maintainable.

Change-Id: I93d9520ab2a3247c1877e568416efacecb49d888
2016-09-19 09:19:48 +07:00

96 lines
1.3 KiB
ReStructuredText

.. -*- rst -*-
=========
Resources
=========
Lists all and gets information for resources.
List resources
==============
.. rest_method:: GET /v2/resources
Lists definitions for all resources.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- q: q
- meter_links: meter_links
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- resources: resources
- user_id: user_id
- links: links
- resource_id: resource_id
- source: source
- project_id: project_id
- metadata: metadata
Response Example
----------------
.. literalinclude:: ../samples/resources-list-response.json
:language: javascript
Show resource details
=====================
.. rest_method:: GET /v2/resources/{resource_id}
Shows details for a resource, by resource ID.
Normal response codes: 200
Error response codes:
Request
-------
.. rest_parameters:: parameters.yaml
- resource_id: resource_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- resource: resource
- user_id: user_id
- links: links
- resource_id: resource_id
- source: source
- project_id: project_id
- metadata: metadata
Response Example
----------------
.. literalinclude:: ../samples/resource-show-response.json
:language: javascript