Obtaining the Specification Lists

Function

This API is used to obtain the node specification lists.

URI

GET /v1/{project_id}/specifications

Table 1 describes the URI parameters.

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used for resource isolation. For details about how to obtain the project ID, see Obtaining a Project ID.

Response

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Mandatory

Type

Description

is_success

Yes

Boolean

Whether the request is successful

specifications

Yes

List

Returned list of node specifications. For details, see Table 3.

Table 3 specifications parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Model name

display_zh

Yes

String

Chinese name of the specification

display_en

Yes

String

English name of the specification

specification

Yes

String

Specification information

Example

  • Example of a successful response
    {  
        "is_success": true,  
        "specifications": [
    {
        "id": "b2bdd588-996a-4021-83a3-15f8bcafc814",
     
    "display_en": "2 vCPUs |8 GiB",
        "specification": "c2.m8.g0"
    }
    ]
    }
  • Example of a failed response
    {  
        "is_success": false,  
        "error_code": "res.2301",  
        "error_msg": "Failed to resolve the token from the request."  
    }

Status Code

For details about status codes, see Status Codes.