Correct JSON-based query examples in documentation

Need to formulate GET query parameters in JSON, but "-d" in curl implies
a POST request.

Change-Id: I71a8204282ff88b07a9dfdde3f3812e7073acc33
Closes-bug: 1362591
This commit is contained in:
Lena Novokshonova 2014-09-25 14:16:39 +04:00
parent 94ebf00429
commit afc977b976

View File

@ -245,15 +245,15 @@ the CPU utilization for a given instance (identified by *resource_id*)::
JSON based example:: JSON based example::
curl -H 'X-Auth-Token: <inserttokenhere>' -H 'Content-Type: application/json' \ curl -X GET -H "X-Auth-Token: <inserttokenhere>" -H "Content-Type: application/json"
-d '{"q":[{"field": "timestamp","op": "ge","value":"2013-04-01T13:34:17"}]}' \ -d '{"q": [{"field": "timestamp", "op": "ge", "value": "2014-04-01T13:34:17"}]}'
http://localhost:8777/v2/meters http://localhost:8777/v2/meters/instance
JSON based example with multiple filters:: JSON based example with multiple filters::
curl -H 'X-Auth-Token: <inserttokenhere>' -H 'Content-Type: application/json' \ curl -X GET -H "X-Auth-Token: <inserttokenhere>" -H "Content-Type: application/json"
-d '{"q":[{"field": "timestamp","op": "ge","value":"2013-04-01T13:34:17"},'\ -d '{"q": [{"field": "timestamp", "op": "ge", "value": "2014-04-01T13:34:17"},
"'{"field": "project_id","op": "eq","value":"8d6057bc-5b90-4296-afe0-84acaa2ef909"}]}' \ {"field": "resource_id", "op": "eq", "value": "4da2b992-0dc3-4a7c-a19a-d54bf918de41"}]}'
http://localhost:8777/v2/meters/instance http://localhost:8777/v2/meters/instance
.. _functional-examples: .. _functional-examples: