Help Center/ ModelArts/ API Reference/ Resource Management/ Obtaining Nodes in a Resource Pool
Updated on 2025-11-19 GMT+08:00

Obtaining Nodes in a Resource Pool

Function

This API is used to obtain the node list of a specified resource pool. This API is used when you need to obtain the details about a resource pool, such as the node distribution, status, or resource usage. Before using this API, ensure that the resource pool has been created and is available, and you have the required permission. After the query, the system returns the detailed information about the nodes in the resource pool, including the node ID, status, and resource usage, helping you manage and optimize resources. If the resource pool does not exist, you do not have the permission to access the resource pool, or the request parameters are invalid, the API will return an error message.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v2/{project_id}/pools/{pool_name}/nodes

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

pool_name

Yes

String

Definition: Resource pool ID. The value is obtained from the metadata.name field in the resource pool details.

*Constraints: The value can contain 36 to 63 characters. It must start with a lowercase letter and cannot end with a hyphen (-). Digits and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

continue

No

String

Definition: Offset parameter of the pagination query

Constraints: Optional

Range: The value is obtained from the metadata.continue field in the response to the last pagination query. An empty value indicates no offset.

Default Value: N/A

limit

No

Integer

Definition: Number of resources returned in a single pagination query

Constraints: N/A

Range: 0 to 500

Default Value: 500

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

apiVersion

String

Definition: API version of the resource.

Range:

  • v2: The current resource version is v2.

kind

String

Definition: Resource type.

Range:

  • NodeList: nodes

metadata

NodeListMetadata object

Definition: Metadata of a node list.

items

Array of Node objects

Definition: Node resource list.

Table 4 NodeListMetadata

Parameter

Type

Description

continue

String

Definition: Offset parameter of the pagination query.

Range: The value is obtained from the metadata.continue field in the response to the last pagination query. An empty value indicates no offset.

remainingItemCount

Long

Definition: Number of remaining resources in a pagination query.

Default Value: N/A

Table 5 Node

Parameter

Type

Description

apiVersion

String

Definition: API version of the resource.

Range:

  • v2: The current resource version is v2.

kind

String

Definition: Resource type.

Range:

  • Node: node

metadata

Object

Definition: Metadata of a node resource.

spec

NodeSpec object

Definition: Specifications of a node resource.

status

NodeStatus object

Definition: Status of a node resource.

Table 6 NodeSpec

Parameter

Type

Description

flavor

String

Definition: ID of node resource specifications.

Range: N/A

extendParams

Object

Definition: Custom configuration information of a node.

os

Os object

Definition: OS of a node.

Table 7 Os

Parameter

Type

Description

name

String

Definition: OS name.

Range: N/A

imageId

String

Definition: OS image ID.

Range: N/A

imageType

String

Definition: OS image type.

Range:

  • private: private image

Table 8 NodeStatus

Parameter

Type

Description

phase

String

Definition: Status of a node.

Range:

  • Available: The node is available.

  • Creating: The node is being created.

  • Deleting: The node is being deleted.

  • Abnormal: The node is abnormal.

  • Checking: The node is performing a self-check.

az

String

Definition: AZ where a node is located.

Range: N/A

privateIp

String

Definition: IP address of a node.

Range: N/A

resources

NodeResource object

Definition: Resources of a node.

availableResources

NodeResource object

Definition: Available resources of a node.

Table 9 NodeResource

Parameter

Type

Description

cpu

String

Definition: Number of CPU cores on a node.

Range: N/A

memory

String

Definition: Memory size of a node, in GiB.

Range: N/A

nvidia.com/gpu

String

Definition: Number of GPUs on a node.

Range: N/A

huawei.com/ascend-snt3

String

Definition: Number of snt3 NPUs on a node.

Range: N/A

huawei.com/ascend-snt9

String

Definition: Number of snt9 NPUs on a node.

Range: N/A

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

Obtain nodes in a resource pool.

GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodes

{ }

Example Responses

Status code: 200

OK

{
  "kind" : "NodeList",
  "apiVersion" : "v2",
  "metadata" : { },
  "items" : [ {
    "kind" : "Node",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "os-node-created-zlncn",
      "creationTimestamp" : "2022-09-16T05:32:44Z"
    },
    "spec" : {
      "flavor" : "modelarts.vm.cpu.4ud"
    },
    "status" : {
      "phase" : "Available",
      "az" : "cn-north-7c",
      "privateIp" : "192.168.0.1",
      "resources" : {
        "cpu" : "3920m",
        "memory" : "6270Mi"
      },
      "availableResources" : {
        "cpu" : "2970m",
        "memory" : "4558Mi"
      }
    }
  }, {
    "kind" : "Node",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "os-node-created-4s522",
      "creationTimestamp" : "2022-09-16T03:20:53Z"
    },
    "spec" : {
      "flavor" : "modelarts.vm.cpu.4ud"
    },
    "status" : {
      "phase" : "Available",
      "az" : "cn-north-7c",
      "privateIp" : "192.168.0.2",
      "resources" : {
        "cpu" : "3920m",
        "memory" : "6270Mi"
      },
      "availableResources" : {
        "cpu" : "2970m",
        "memory" : "4558Mi"
      }
    }
  }, {
    "kind" : "Node",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "os-node-created-v7hfj",
      "creationTimestamp" : "2022-09-16T09:16:37Z"
    },
    "spec" : {
      "flavor" : "modelarts.vm.cpu.4ud"
    },
    "status" : {
      "phase" : "Available",
      "az" : "cn-north-7c",
      "privateIp" : "192.168.0.3",
      "resources" : {
        "cpu" : "3920m",
        "memory" : "6270Mi"
      },
      "availableResources" : {
        "cpu" : "3720m",
        "memory" : "5670Mi"
      }
    }
  } ]
}

Status code: 404

Not found.

{
  "error_code" : "ModelArts.50015001",
  "error_msg" : "pool not found"
}

Status Codes

Status Code

Description

200

OK

404

Not found.

Error Codes

See Error Codes.