
# 查询接口版本信息列表 - ListVersions
#### 功能介绍
查询接口版本信息列表。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-evs/evs_04_0009.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-evs/evs_04_0023.html)。
- 如果使用身份策略授权，当前API调用无需身份策略权限。
 
#### URI
GET /
#### 请求参数
无
#### 响应参数
**状态码：300**
表1响应Body参数 
| 参数       | 参数类型                                                         | 描述    |
|:---|:---|:---|
| versions | Array of [Versions] objects | 版本信息。 |
   
 表2Versions 
| 参数          | 参数类型                                                             | 描述              |
|:---|:---|:---|
| id          | String                                                           | 接口版本的ID。        |
| links       | Array of [Link] objects             | 接口版本信息的URI描述信息。 |
| media-types | Array of [MediaTypes] objects | 接口版本的请求消息类型信息。  |
| min_version | String                                                           | 接口版本的最小版本号。     |
| status      | String                                                           | 接口版本的状态。        |
| updated     | String                                                           | 接口版本更新时间。       |
| version     | String                                                           | 接口版本的版本号信息。     |
   
 表3Link 
| 参数   | 参数类型   | 描述                                                                                                                            |
|:---|:---|:---|
| href | String | **参数解释** 对应的快捷链接。 **取值范围** 不涉及。  |
| rel  | String | **参数解释** 快捷链接标记名称。 **取值范围** 不涉及。 |
   
 表4MediaTypes 
| 参数   | 参数类型   | 描述    |
|:---|:---|:---|
| base | String | 文本类型。 |
| type | String | 返回类型。 |
   
**状态码：400**
表5响应Body参数 
| 参数    | 参数类型                                         | 描述                                                                                                                                 |
|:---|:---|:---|
| error | [Error] object | **参数解释** 出现错误时，返回的错误信息。 **取值范围** 不涉及。 |
   
 表6Error 
| 参数      | 参数类型   | 描述                                                                                                                                                                                                           |
|:---|:---|:---|
| code    | String | **参数解释** 出现错误时，返回的错误码。 **取值范围** 错误码和其对应的含义请[参考错误码说明](https://support.huaweicloud.com/api-evs/evs_04_0038.html)。 |
| message | String | **参数解释** 出现错误时，返回的错误消息。 **取值范围** 不涉及。                                                                           |
   
#### 请求示例
```
GET https://{endpoint}/
https://{endpoint}/
```
#### 响应示例
**状态码：300**
版本号详情列表。
```
{
  "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"
  } ]
}
```
**状态码：400**
Bad Request
```
{
  "error" : {
    "code" : "string",
    "message" : "string"
  }
}
```
#### 状态码
| 状态码 | 描述          |
|:---|:---|
| 300 | 版本号详情列表。    |
| 400 | Bad Request |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-evs/evs_04_0038.html)。
