nova/api-ref/source/versions.inc
Sean Dague d929b9fc76 add tags to files for the content verification phase
This adds a set of tags in comments to the beginning of files so that
we can process them according to the documentation here:
https://wiki.openstack.org/wiki/NovaAPIRef

Part of bp:api-ref-in-rst

Change-Id: I17cf584dafb5bd969c12f51b7e7185d92365bf93
2016-04-20 16:21:58 -04:00

114 lines
2.7 KiB
ReStructuredText

.. -*- rst -*-
.. needs:method_verification
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
==============
API Versions
==============
Concepts
========
In order to bring new features to users over time, the Nova API
supports versioning. There are two kinds of versions in Nova.
- ''major versions'', which have dedicated urls
- ''microversions'', which can be requested through the use of the
``X-OpenStack-Nova-API-Version`` header
.. TODO(sdague): build a more detailed link to using Microversions on
requests.
List All Major Versions
=======================
.. rest_method:: GET /
This fetches all the information about all known major API versions in
the deployment. Links to more specific information will be provided
for each API version, as well as information about supported min and
max microversions.
Normal Response Codes: 200, 300
Response
--------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- versions: versions
- id: version_id
- status: version_status
- links: links
- version: version_max
- min_version: version_min
.. note::
The ``updated`` parameter in the response is vestigial and provides
no useful information.
Response Example
----------------
This demonstrates the expected response from a bleeding edge server
that supports up to the current microversion. When querying OpenStack
environments you will typically find the current microversion on the
v2.1 API is lower than listed below.
.. literalinclude:: /../../doc/api_samples/versions/versions-get-resp.json
:language: javascript
Show Details of Specific API Version
====================================
.. rest_method:: GET /{api_version}
This gets the details of a specific API at it's root. Nearly all this
information exists at the API root, so this is mostly a redundant
operation.
.. TODO(sdague) we should probably deprecate this call as everything
that's needed is really in the root now
Normal Response Codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- api_version: api_version
Response
--------
.. rest_parameters:: parameters.yaml
- x-openstack-request-id: x-openstack-request-id
- version: version
- id: version_id
- status: version_status
- links: links
- version: version_max
- min_version: version_min
.. note::
The ``updated`` and ``media-types`` parameters in the response are
vestigial and provide no useful information. They will probably be
deprecated and removed in the future.
Response Example
----------------
This is an example of a ``GET /v2.1`` on a relatively current server.
.. literalinclude:: /../../doc/api_samples/versions/v21-version-get-resp.json
:language: javascript