> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# Get the cluster's Node Pools.

GET http://localhost:8080/api/v1/clusters/{clusterId}/node-pools

Retrieve all the node pools with details from the cluster by Universally Unique Identifier (UUID). Deprecated, please use /api/v1/node-pools instead.

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/organizations/node-pools/legacy-get-nodepools

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Path parameters

- `clusterId` (string, required) — Unique identifier of the cluster

## Response

### 200

Node pools returned successfully.

- `list of LegacyNodePool`

## Errors

### 403 Forbidden Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)

### 404 Not Found Error

The specified resource was not found

- `code` (integer, required)
- `message` (string, required)

## Types

### LegacyNodePool

- `name` (string, optional) — Node Pool Name
- `labelKey` (string, optional) — Label key for associated nodes to the Node Pool (with value as in labelValue)
- `labelValue` (string, optional) — Label value for associated nodes to the Node Pool (with key as in labelKey)
- `placementStrategy` (LegacyPlacementStrategy, optional)
- `id` (double, optional) — Node Pool unique id
- `clusterId` (string, optional) — Node Pool cluster id
- `createdAt` (datetime, optional) — Node Pool creation time
- `updatedAt` (datetime, optional) — Node Pool update time
- `deletedAt` (datetime, optional) — Node Pool delete time
- `status` (enum, optional) — Node Pool status
  - Allowed values: `Creating`, `Updating`, `Deleting`, `Empty`, `Unschedulable`, `Ready`, `Deleted`
- `statusMessage` (string, optional) — Node Pool status details
- `nodes` (string, optional) — List of Nodes that are assigned to this nodepool - as json string
- `createdBy` (string, optional) — Node Pool creator
- `updatedBy` (string, optional) — Node Pool updater
- `isDefault` (boolean, optional) — Is the Node Pool the default Node Pool for all nodes not assigned to any other Node Pool
- `overProvisioningRatio` (integer, optional, nullable, deprecated)

### LegacyPlacementStrategy

- `cpu` (enum, optional) — scheduling strategy for cpu
  - Allowed values: `spread`, `binpack`
- `gpu` (enum, optional) — scheduling strategy for gpu
  - Allowed values: `spread`, `binpack`

## Examples

**Response**

```json
[
  {
    "name": "node-pool-a",
    "labelKey": "node-type",
    "labelValue": "type-x",
    "placementStrategy": {
      "cpu": "spread",
      "gpu": "spread"
    },
    "id": 5,
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "createdAt": "2021-12-14T16:04:15.099Z",
    "updatedAt": "2021-12-14T16:04:15.099Z",
    "deletedAt": "2021-12-14T16:04:15.099Z",
    "status": "Creating",
    "statusMessage": "all nodes are down",
    "nodes": [
      "node-a",
      "node-b"
    ],
    "createdBy": "user@example.com",
    "updatedBy": "user@example.com",
    "isDefault": false,
    "overProvisioningRatio": 1
  }
]
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/clusters/clusterId/node-pools"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/clusters/clusterId/node-pools';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/clusters/clusterId/node-pools"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/clusters/clusterId/node-pools")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/clusters/clusterId/node-pools")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/clusters/clusterId/node-pools', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/clusters/clusterId/node-pools");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/clusters/clusterId/node-pools")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```