438585e3d7
'x-openstack-request-id' is the common header name for request ID which is implemented in most of the OpenStack services. Using the oslo middleware `request_id` middleware is a convenient way to generate request ID and also include it in the response. The request ID will be generated by the oslo middleware and is inserted into the request environment. On the response end, the middleware is again used, this time to attach the 'x-openstack-request-id' header, using the value of the generated request ID. Sample log output of blazar-api service for ``GET v1/os-hosts`` API which logs local request ID `req-de45521c-2a04-4e7d-809a-960e782eb1e7` is shown below: http://paste.openstack.org/show/753805/ Note: For v2 apis, the request_id is not returned in response header but it will be logged in logs. APIImpact: responses of the API will include 'x-openstack-request-id' header. Implements: blueprint oslo-middleware-request-id Change-Id: I437f783787514ff1add2d7f0059cb27addd12c3e
24 lines
552 B
ReStructuredText
24 lines
552 B
ReStructuredText
.. -*- rst -*-
|
|
|
|
===========
|
|
Request ID
|
|
===========
|
|
|
|
For each REST API request, a local request ID is returned as a header in the response.
|
|
|
|
**Response**
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- X-Openstack-Request-Id: x-openstack-request-id_resp
|
|
|
|
**Response Header**
|
|
|
|
For each REST API request, the response contains a ``X-Openstack-Request-Id`` header.
|
|
|
|
The value of the ``X-Openstack-Request-Id`` header is the local request ID assigned to the request.
|
|
|
|
Response header example::
|
|
|
|
X-Openstack-Request-Id: req-d7bc29d0-7b99-4aeb-a356-89975043ab5e
|