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

Obtaining Nodes in a Node Pool

Function

This API is used to obtain details about all nodes in a specified node pool. This API is used when you need to obtain the details about a node pool, such as the node status, resource usage, or resource management. Before using this API, ensure that the node pool exists and you have the permission to access the node pool. After the API is called, the system returns the node list of the node pool, including the node ID, name, status, IP address, and resource usage. If the node pool does not exist, the user does not have the permission to access the node pool, or the node pool is unavailable, 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}/nodepools/{nodepool_name}/nodes

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Constraints: N/A

Range: N/A

Default Value: N/A

pool_name

Yes

String

Definition: Resource pool name.

Constraints: N/A

Range: N/A

Default Value: N/A

nodepool_name

Yes

String

Definition: Node pool name.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

continue

No

String

Definition: Position of the previous page during pagination query.

Constraints: N/A

Range: N/A

Default Value: N/A

limit

No

String

Definition: Number of records returned in a single pagination query.

Constraints: N/A

Range: N/A

Default Value: N/A

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: 400

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 node pool.

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

{
  "kind" : "NodeList",
  "apiVersion" : "v2",
  "metadata" : { },
  "items" : [ {
    "kind" : "Node",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "node-dly-4",
      "creationTimestamp" : "2024-01-29T09:28:26Z",
      "labels" : {
        "os.modelarts.node/cluster" : "dly-lite",
        "os.modelarts.node/nodepool" : "nodepool-1"
      }
    },
    "spec" : {
      "flavor" : "modelarts.vm.2u4g.dcc",
      "hostNetwork" : {
        "vpc" : "277e9abc-0e6b-431a-9232-cfd25d5fc566",
        "subnet" : "03796378-c356-4c14-826b-e4913aa9c8b9",
        "securityGroups" : [ "0a15b48d-06f1-41e4-b782-ade90087bf59" ]
      }
    },
    "status" : {
      "phase" : "Available",
      "az" : "cn-north-7c",
      "privateIp" : "192.168.1.132",
      "resources" : {
        "cpu" : "1930m",
        "memory" : "1912Mi"
      }
    }
  } ]
}

Example Responses

Status code: 200

OK.

{
  "kind" : "NodeList",
  "apiVersion" : "v2",
  "metadata" : { },
  "items" : [ {
    "kind" : "Node",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "node-dly-4",
      "creationTimestamp" : "2024-01-29T09:28:26Z"
    },
    "spec" : {
      "flavor" : "modelarts.vm.2u4g.dcc"
    },
    "status" : {
      "phase" : "Available",
      "az" : "cn-north-7c",
      "privateIp" : "192.168.1.132",
      "resources" : {
        "cpu" : "1930m",
        "memory" : "1912Mi"
      }
    }
  } ]
}

Status code: 400

Bad request

{
  "error_code" : "ModelArts.50004000",
  "error_msg" : "Bad request. invalid nodepool name"
}

Status Codes

Status Code

Description

200

OK.

400

Bad request

Error Codes

See Error Codes.