Updated on 2024-03-26 GMT+08:00

Querying EVS Disk Types

Function

This API is used to query EVS disk types and display the query results in a list.

URI

  • URI format

    GET /v2/{project_id}/types

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    The project ID.

    For details about how to obtain the project ID, see Obtaining a Project ID.

Request

  • Example request
    GET https://{endpoint}/v2/{project_id}/types

Response

  • Response parameters

    Parameter

    Type

    Description

    volume_types

    list

    The list of queried disk types. For details, see Parameters in the volume_types field.

    error

    Object

    The error message returned if an error occurs. For details, see Parameters in the error field.

  • Parameters in the volume_types field

    Parameter

    Type

    Description

    extra_specs

    Object

    The disk type specifications. For details, see Parameters in the extra_specs field.

    name

    String

    The disk type name.

    id

    String

    The disk type ID.

    description

    String

    The disk type description.

    qos_specs_id

    String

    The reserved field.

    is_public

    Boolean

    The reserved field.

  • Parameters in the extra_specs field

    Parameter

    Type

    Description

    volume_backend_name

    String

    The reserved field.

    availability-zone

    String

    The reserved field.

    HW:availability_zone

    String

    The reserved field.

  • Parameters in the error field

    Parameter

    Type

    Description

    message

    String

    The error message returned if an error occurs.

    code

    String

    The error code returned if an error occurs.

    For details about the error code, see Error Codes.

  • Example response
    {
        "volume_types": [
            {
                "extra_specs": {
                    "volume_backend_name": "SAS", 
                    "availability-zone": "az-dc-1"
                }, 
                "name": "SAS", 
                "qos_specs_id": null, 
                "id": "6c81c680-df58-4512-81e7-ecf66d160638", 
                "is_public": true, 
                "description": null
            }, 
            {
                "extra_specs": {
                    "volume_backend_name": "SAS", 
                    "availability-zone": "az-dc-1"
                }, 
                "name": "SAS", 
                "qos_specs_id": "585f29d6-7147-42e7-bfb8-ca214f640f6f", 
                "is_public": true, 
                "id": "ea6e3c13-aac5-46e0-b280-745ed272e662", 
                "description": null
            }, 
            {
                "extra_specs": {
                    "volume_backend_name": "SSD", 
                    "availability-zone": "az-dc-1"
                }, 
                "name": "SSD", 
                "qos_specs_id": "39b0c29a-308b-4f86-b478-5d3d02a43837", 
                "is_public": true, 
                "id": "6f2dee9e-82f0-4be3-ad89-bae605a3d24f", 
                "description": null
            }
        ]
    }

    or

    {
        "error": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

    In the preceding example, error indicates a general error, for example, badrequest or itemNotFound. An example is provided as follows:

    {
        "badrequest": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

Status Codes

  • Normal

    200

Error Codes

For details, see Error Codes.