Updated on 2024-02-27 GMT+08:00

Querying Information of API Versions

Function

This API is used to query information of API versions.

Calling Method

For details, see Calling APIs.

URI

GET /

Request Parameters

None

Response Parameters

Status code: 300

Table 1 Response body parameters

Parameter

Type

Description

versions

Array of Versions objects

The version information.

Table 2 Versions

Parameter

Type

Description

id

String

The API version ID.

links

Array of Link objects

The API version URI.

media-types

Array of MediaTypes objects

The request message type of the API version.

min_version

String

The minimum API version.

status

String

The API version status.

updated

String

The last time when the API version was updated.

version

String

The API version number.

Table 4 MediaTypes

Parameter

Type

Description

base

String

The text type.

type

String

The return type.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error

Error object

The error message returned if an error occurs.

Table 6 Error

Parameter

Type

Description

code

String

The error code returned if an error occurs.

For details about error codes and their meanings, see Error Codes.

message

String

The error message returned if an error occurs.

Example Requests

GET https://{endpoint}/

https://{endpoint}/

Example Responses

Status code: 300

The details of API versions are returned.

{
  "versions" : [ {
    "min_version" : "",
    "media-types" : [ {
      "type" : "application/vnd.openstack.volume+json;version=1",
      "base" : "application/json"
    }, {
      "type" : "application/vnd.openstack.volume+xml;version=1",
      "base" : "application/xml"
    } ],
    "links" : [ {
      "rel" : "describedby",
      "href" : "http://docs.openstack.org/",
      "type" : "text/html"
    }, {
      "rel" : "self",
      "href" : "https://evs.localdomain.com/v1"
    } ],
    "id" : "v1.0",
    "updated" : "2014-06-28T12:20:21Z",
    "version" : "",
    "status" : "SUPPORTED"
  }, {
    "min_version" : "",
    "media-types" : [ {
      "type" : "application/vnd.openstack.volume+json;version=1",
      "base" : "application/json"
    }, {
      "type" : "application/vnd.openstack.volume+xml;version=1",
      "base" : "application/xml"
    } ],
    "links" : [ {
      "rel" : "describedby",
      "href" : "http://docs.openstack.org/",
      "type" : "text/html"
    }, {
      "rel" : "self",
      "href" : "https://evs.localdomain.com/v2"
    } ],
    "id" : "v2.0",
    "updated" : "2014-06-28T12:20:21Z",
    "version" : "",
    "status" : "SUPPORTED"
  }, {
    "min_version" : "3.0",
    "media-types" : [ {
      "type" : "application/vnd.openstack.volume+json;version=1",
      "base" : "application/json"
    }, {
      "type" : "application/vnd.openstack.volume+xml;version=1",
      "base" : "application/xml"
    } ],
    "links" : [ {
      "rel" : "describedby",
      "href" : "http://docs.openstack.org/",
      "type" : "text/html"
    }, {
      "rel" : "self",
      "href" : "https://evs.localdomain.com/v3"
    } ],
    "id" : "v3.0",
    "updated" : "2016-02-08T12:20:21Z",
    "version" : "3.0",
    "status" : "CURRENT"
  } ]
}

Status code: 400

Bad Request

{
  "error" : {
    "code" : "string",
    "message" : "string"
  }
}

Status Codes

Status Code

Description

300

The details of API versions are returned.

400

Bad Request

Error Codes

See Error Codes.