8837801ba6
This brings in RST plus YAML files, migrated from the source for [0]. The migration explanation is found on the openstack-dev mailing list [1]. Project instruction is in the OpenStack Documentation Contributor Guide [2]. [0]https://github.com/openstack/api-site/tree/master/api-ref/source/telemetry/v2 [1]http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html [2]http://docs.openstack.org/contributor-guide/api-guides.html Change-Id: I21d559f3abea502a0ed237d693ab24a5110d42c5
112 lines
1.7 KiB
ReStructuredText
Executable File
112 lines
1.7 KiB
ReStructuredText
Executable File
.. -*- rst -*-
|
|
|
|
=======
|
|
Samples
|
|
=======
|
|
|
|
Lists all samples and gets information for a sample.
|
|
|
|
For list operations, if you do not explicitly set the ``limit``
|
|
query parameter, a default limit is applied. The default limit is
|
|
the ``default_api_return_limit`` configuration option value.
|
|
|
|
|
|
Show sample details
|
|
===================
|
|
|
|
.. rest_method:: GET /v2/samples/{sample_id}
|
|
|
|
Shows details for a sample, by sample ID.
|
|
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- sample_id: sample_id
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- user_id: user_id
|
|
- resource_id: resource_id
|
|
- timestamp: timestamp
|
|
- meter: meter
|
|
- volume: volume
|
|
- source: source
|
|
- recorded_at: recorded_at
|
|
- project_id: project_id
|
|
- type: type
|
|
- id: id
|
|
- unit: unit
|
|
- metadata: metadata
|
|
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/sample-show-response.json
|
|
:language: javascript
|
|
|
|
|
|
|
|
|
|
List samples
|
|
============
|
|
|
|
.. rest_method:: GET /v2/samples
|
|
|
|
Lists all known samples, based on the data recorded so far.
|
|
|
|
|
|
Normal response codes: 200
|
|
Error response codes:
|
|
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- q: q
|
|
- limit: limit
|
|
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- user_id: user_id
|
|
- resource_id: resource_id
|
|
- timestamp: timestamp
|
|
- meter: meter
|
|
- volume: volume
|
|
- source: source
|
|
- recorded_at: recorded_at
|
|
- project_id: project_id
|
|
- type: type
|
|
- id: id
|
|
- unit: unit
|
|
- metadata: metadata
|
|
|
|
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ../samples/samples-list-response.json
|
|
:language: javascript
|
|
|
|
|
|
|