Updated on 2026-03-18 GMT+08:00

Querying Available Resources

Function

This API is used to query available resources.

Debugging

You can debug this API in API Explorer.

URI

GET /v1/{project_id}/baremetalservers/available_resource

Table 1 lists the parameters.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

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

availability_zone

Yes

Specifies the AZ.

Request

None

Response

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

available_resource

Array of objects

Specifies available resources. For details, see Table 3.

Table 3 available_resource parameters

Parameter

Type

Description

availability_zone

String

Specifies the AZ.

flavors

Array of objects

Specifies the flavors. For details, see Table 4.

Table 4 flavors parameters

Parameter

Type

Description

flavor_id

String

Specifies the flavor ID.

count

Integer

Specifies the quantity.

status

String

Specifies the status.

Example Request

GET https://{endpoint}/v1/{project_id}/baremetalservers/available_resource

Example Response

{
	"available_resource": [{
		"availability_zone": "cn-southwest-242a",
		"flavors": [{
			"flavor_id": "s3.small.1",
			"count": 1,
			"status": ""
		}]
	}]
}

Returned Values

See Status Codes.

Error Codes

See Error Codes.