ceilometer/api-ref/source/samples.inc
Lianhao Lu 62f6a5f338 Corrected file mode settings.
Drop the undesired executable bit for files under the following
directory:

1. ceilometer/compute/pollsters
2. api-ref/source

Change-Id: Icfd1293f6e147b70051c115ae0b143f991aea474
2016-09-13 14:54:16 +08:00

112 lines
1.7 KiB
ReStructuredText

.. -*- 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