zaqar/doc/source/install/verify.rst
wangxiyuan 13b85cc38f Refactor the doc tree
This patch refactor zaqar doc according to
the doc-migration spec.

api, cli, configuration and reference should
be added in the next few patches if need.

Change-Id: I74a4949f4eace423c06ab6e8d95838df1f312d93
2017-07-19 10:12:28 +08:00

37 lines
1.3 KiB
ReStructuredText

.. _verify:
Verify operation
~~~~~~~~~~~~~~~~
Verify operation of the Messaging service by creating messages via curl
utility:
.. code-block:: console
$ curl -i -X POST http://ZAQAR_ENDPOINT:8888/v2/queues/samplequeue/messages \
-d '{"messages": [{"body": {"event": 1}, "ttl": 600}, {"body": {"event": 2}, "ttl": 600}]}' \
-H "Content-type: application/json" \
-H "Client-ID: CLIENT_ID" \
-H "X-Auth-ToKen: TOKEN"
Replace ``CLIENT_ID`` variable with the universally unique identifier (UUID)
which can be generated by, for example, ``uuidgen`` utility.
Replace ``TOKEN`` variable with the authentication token retrieved from
Identity service. If you choose not to enable Keystone authentication you
won't have to pass a token.
Replace ``ZAQAR_ENDPOINT`` variable with the endpoint of Messaging service.
The normal response would be with status code 201 and look something like this:
.. code-block:: console
HTTP/1.1 201 Created
content-length: 135
content-type: application/json; charset=UTF-8
location: http://ZAQAR_ENDPOINT:8888/v2/queues/samplequeue/messages?ids=575f6f2515e5c87d779a9b20,575f6f2515e5c87d779a9b21
Connection: close
{"resources": ["/v2/queues/samplequeue/messages/575f6f2515e5c87d779a9b20", "/v2/queues/samplequeue/messages/575f6f2515e5c87d779a9b21"]}