> This page is for version Latest (default).
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/fleet-intel/latest/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/fleet-intel/llms.txt.

# Get compute zones

GET /v1/computezones

Get list of compute zones with optional filtering and different view modes. Use view=detail for comprehensive metrics and view=basic for essential fields (ID, Name, Type, Location, Contact, timestamps). Responses include location and the deprecated geoLocation alias for backward compatibility.

Reference: https://docs.nvidia.com/fleet-intel/api-explorer/computezones/get-v-1-computezones

## Request

### Query parameters

- `view` (enum, optional, default: detail) — View mode: 'detail' for comprehensive metrics (default) or 'basic' for essential fields
  - Allowed values: `detail`, `basic`
- `includeMetrics` (boolean, optional, default: true) — [DETAIL VIEW ONLY] Include metrics in response (default: true). Set to false for better performance when metrics are not needed.
- `computeZoneIds` (list of string, optional) — List of compute zone IDs to filter (comma-separated)
- `sortBy` (enum, optional, default: createdAt) — Field to sort by, in either view
  - Allowed values: `createdAt`, `name`
- `order` (enum, optional, default: desc) — Sort order, in either view
  - Allowed values: `asc`, `desc`
- `page` (integer, optional, default: 0) — Page number (0-indexed)
- `pageSize` (integer, optional, default: 20) — Page size

## Response

### 200

Basic view response (view=basic)

- `computezones_getV1Computezones_Response_200`
  - models.ComputeZonesResponse: models.ComputeZonesResponse
  - models.ListComputeZonesResponse: models.ListComputeZonesResponse

## Errors

### 400 Bad Request Error

Bad Request

- `details` (string, optional) — Detailed error information
- `error` (string, optional) — Error message or type
- `requestStatus` (models.KASRequestStatus, optional) — RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

### 401 Unauthorized Error

Unauthorized

- `details` (string, optional) — Detailed error information
- `error` (string, optional) — Error message or type
- `requestStatus` (models.KASRequestStatus, optional) — RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

### 403 Forbidden Error

Forbidden - UAM authorization denied

- `details` (string, optional) — Detailed error information
- `error` (string, optional) — Error message or type
- `requestStatus` (models.KASRequestStatus, optional) — RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

### 499 Client Closed Request Error

Client Closed Request - request was canceled by the client

- `details` (string, optional) — Detailed error information
- `error` (string, optional) — Error message or type
- `requestStatus` (models.KASRequestStatus, optional) — RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

### 500 Internal Server Error

Internal Server Error

- `details` (string, optional) — Detailed error information
- `error` (string, optional) — Error message or type
- `requestStatus` (models.KASRequestStatus, optional) — RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

### 503 Service Unavailable Error

Service Unavailable

- `details` (string, optional) — Detailed error information
- `error` (string, optional) — Error message or type
- `requestStatus` (models.KASRequestStatus, optional) — RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

## Types

### models.ComputeZonesResponse

- `computezones` (list of models.ComputeZoneOverview, optional)
- `hasMore` (boolean, optional)
- `page` (integer, optional)
- `pageSize` (integer, optional)
- `total` (integer, optional)

### models.ListComputeZonesResponse

- `computezones` (list of models.SimpleComputeZone, optional)
- `hasMore` (boolean, optional)
- `page` (integer, optional)
- `pageSize` (integer, optional)
- `total` (integer, optional)

### models.KASRequestStatus

RequestStatus contains KAS-specific error details This is added to reflect the field in OpenAPI docs for UI reference and not populated by our code If KAS returns an error, the request will not be forwarded to the backend

- `requestId` (string, optional) — Request ID for tracing
- `statusCode` (string, optional) — Status code from KAS
- `statusDescription` (string, optional) — Status description from KAS

### models.ComputeZoneOverview

- `id` (string, required)
- `alertOverview` (models.AlertOverview, optional)
- `contact` (models.Contact, optional)
- `cpuCoresCount` (integer, optional)
- `createdAt` (string, optional)
- `degradedNodesCount` (integer, optional)
- `gpusCount` (integer, optional)
- `healthPercentage` (double, optional)
- `healthState` (enum, optional)
  - Allowed values: `Healthy`, `Degraded`, `Unhealthy`, `Unknown`, `Unsupported`, `Pending`
- `healthyNodesCount` (integer, optional)
- `location` (models.Location, optional)
- `metrics` (list of models.Metric, optional)
- `name` (string, optional)
- `nodeGroupsCount` (integer, optional)
- `nodesCount` (integer, optional)
- `tags` (list of string, optional)
- `type` (enum, optional)
  - Allowed values: `datacenter`, `cloud provider`
- `unhealthyNodesCount` (integer, optional)
- `unknownNodesCount` (integer, optional)
- `updatedAt` (string, optional)
- `geoLocation` (models.GeoLocation, optional, deprecated) — Deprecated: use location.

### models.SimpleComputeZone

- `id` (string, required)
- `contact` (models.Contact, optional)
- `createdAt` (string, optional)
- `location` (models.Location, optional)
- `name` (string, optional)
- `type` (enum, optional)
  - Allowed values: `datacenter`, `cloud provider`
- `updatedAt` (string, optional)
- `geoLocation` (models.GeoLocation, optional, deprecated) — Deprecated: use location.

### models.AlertOverview

- `criticalCount` (integer, optional)
- `infoCount` (integer, optional)
- `lastCriticalAlert` (string, optional)
- `lastWarningAlert` (string, optional)
- `totalCount` (integer, optional)
- `unknownCount` (integer, optional)
- `warningCount` (integer, optional)

### models.Contact

- `email` (string, optional)
- `pic` (string, optional)

### models.Location

- `city` (string, optional)
- `country` (string, optional)
- `latitude` (double, optional)
- `longitude` (double, optional)
- `region` (string, optional)

### models.Metric

- `aggregation` (enum, optional)
  - Allowed values: `average`, `sum`, `min`, `max`, `none`
- `description` (string, optional)
- `lastUpdated` (string, optional)
- `name` (string, optional)
- `unit` (enum, optional)
  - Allowed values: `MHz`, `count`, `°C`, `°F`, `celsius`, `watts`, `boolean`, `MB`, `ratio`, `MB/s`, `ber`, `nanoseconds`, `ms`, `seconds`, `s`, `bytes`, `bytes/s`, `millijoules`, `load`, `cores`, `percent`, `rpm`, `volts`
- `value` (double, optional)

### models.GeoLocation

Deprecated: use Location.

- `city` (string, optional)
- `country` (string, optional)
- `latitude` (double, optional)
- `longitude` (double, optional)
- `region` (string, optional)

## Examples

**Response**

```json
{
  "computezones": [
    {
      "alertOverview": {
        "criticalCount": 2,
        "infoCount": 15,
        "lastCriticalAlert": "2024-01-15T14:15:00Z",
        "lastWarningAlert": "2024-01-15T14:28:00Z",
        "totalCount": 24,
        "unknownCount": 15,
        "warningCount": 7
      },
      "contact": {
        "email": "admin@example.com",
        "pic": "John Doe"
      },
      "cpuCoresCount": 160,
      "createdAt": "2024-01-10T08:45:00Z",
      "degradedNodesCount": 2,
      "geoLocation": {
        "city": "Baltimore",
        "country": "United States",
        "latitude": 39.0458,
        "longitude": -76.6413,
        "region": "us-east-1"
      },
      "gpusCount": 80,
      "healthPercentage": 95,
      "healthState": "Healthy",
      "healthyNodesCount": 38,
      "id": "cz-us-east-1",
      "location": {
        "city": "Baltimore",
        "country": "United States",
        "latitude": 39.0458,
        "longitude": -76.6413,
        "region": "us-east-1"
      },
      "metrics": [
        {
          "aggregation": "average",
          "description": "System memory metrics",
          "lastUpdated": "2024-01-15T14:30:00Z",
          "name": "memory",
          "unit": "ratio",
          "value": 72.3
        }
      ],
      "name": "US East 1 ComputeZone",
      "nodeGroupsCount": 20,
      "nodesCount": 40,
      "tags": [
        "ml-training",
        "gpu-intensive",
        "high-memory"
      ],
      "type": "datacenter",
      "unhealthyNodesCount": 0,
      "unknownNodesCount": 0,
      "updatedAt": "2024-01-15T14:30:00Z"
    }
  ],
  "hasMore": false,
  "page": 0,
  "pageSize": 10,
  "total": 0
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/v1/computezones"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/computezones';
const options = {method: 'GET'};

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 := "https://api.example.com/v1/computezones"

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

	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("https://api.example.com/v1/computezones")

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

request = Net::HTTP::Get.new(url)

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("https://api.example.com/v1/computezones")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/computezones');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/computezones");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/computezones")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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()
```