cinder/api-ref/source/v3/messages.inc
Sean McGinnis fffdac20c2 api-ref: Make v3 enclosing objects consistent
Some request details provided information about the other
JSON value while others didn't. To make things consistent
and to make sure API consumers understand how the requests
need to be structured, this adds missing instances. It also
reorders some parameter lists to be a little more logical,
so even though we can't show the nested nature of some of
these, it at least doesn't show inner values before outer
ones.

This also corrects many errors seen while going through
the API ref. This is by no means exhaustive, and is already
somewhat out of the scope for this patch, so it is expected
that there are some (many) cases that are not addressed by
this patch. Those will be fixed with ongoing effort in
future patches.

Partial-bug: #1713517
Change-Id: I30964ba8d829778fd01174d639d44ba07e4b77a6
2017-09-01 09:54:34 -05:00

123 lines
2.1 KiB
ReStructuredText

.. -*- rst -*-
Messages
========
Lists all, shows, and deletes messages.
Delete message
~~~~~~~~~~~~~~
.. rest_method:: DELETE /v3/{project_id}/messages/{message_id}
Deletes a message.
Normal response codes: 202
Error response codes: badRequest(400), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- message_id: message_id
Show message details
~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/messages/{message_id}
Shows details for a message.
Normal response codes: 200
Error response codes: badRequest(400), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- message_id: message_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- message: user_message
- request_id: request_id
- links: links_5
- message_level: message_level
- event_id: event_id
- created_at: created_at
- guaranteed_until: guaranteed_until
- resource_uuid: resource_uuid
- id: id_8
- resource_type: resource_type
- user_message: user_message
Response Example
----------------
.. literalinclude:: ./samples/messages-show-response.json
:language: javascript
List messages
~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/messages
Lists all messages, since v3.31 if non-admin users
specify invalid filters in the url, API will return bad request.
Normal response codes: 200
Error response codes: badRequest(400)
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- sort: sort
- limit: limit
- offset: offset
- marker: marker
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- messages: user_messages
- request_id: request_id
- links: links_5
- message_level: message_level
- event_id: event_id
- created_at: created_at
- guaranteed_until: guaranteed_until
- resource_uuid: resource_uuid
- id: id_8
- resource_type: resource_type
- user_message: user_message
Response Example
----------------
.. literalinclude:: ./samples/messages-list-response.json
:language: javascript