add v2 query examples
add v2 query curl examples to doc and fix a spelling mistake. Change-Id: Ide0bae84c3fadfdb5c4c0c40b7f47aa174e46f43
This commit is contained in:
parent
1816a982fe
commit
4a1cda6c80
@ -65,9 +65,9 @@ run through tox_.
|
||||
.. _nose options documentation: http://readthedocs.org/docs/nose/en/latest/usage.html#options
|
||||
|
||||
Use a double hyphen to pass options to nose. For example, to set verbose
|
||||
flag and to run only tests under tests/api/v2:
|
||||
flag and to run only tests under tests/api/v2::
|
||||
|
||||
$ tox -e py27 -- -v api/v2
|
||||
$ tox -e py27 -- -v api/v2
|
||||
|
||||
.. seealso::
|
||||
|
||||
|
@ -35,8 +35,16 @@ Samples and Statistics
|
||||
Filtering Queries
|
||||
=================
|
||||
|
||||
Many of the endpoints above accecpt a query filter argument, which
|
||||
Many of the endpoints above accept a query filter argument, which
|
||||
should be a list of Query data structures:
|
||||
|
||||
.. autotype:: ceilometer.api.controllers.v2.Query
|
||||
:members:
|
||||
|
||||
For example, to list all samples since a specified time::
|
||||
|
||||
$ curl -X GET -H 'X-Auth-Token:token_id' -H 'Content-Type:application/json' -d '{"q":[{"field": "timestamp","op": "ge","value":"2013-04-01T13:34:17"}]}' http://localhost:8777/v2/meters
|
||||
|
||||
or::
|
||||
|
||||
$ curl -X GET -H 'X-Auth-Token:token_id' "http://localhost:8777/v2/meters?q.field=timestamp&q.op=ge&q.value=2013-04-01T13:34:17"
|
||||
|
Loading…
Reference in New Issue
Block a user