> This page is for version latest (default).
> For other versions, use one of these documentation indexes:
> - latest (default): https://docs.nvidia.com/alchemi/vasp/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/alchemi/vasp/llms.txt.

# Get instance status

GET http://localhost:8000/v1/status/instance

Reports the health and configuration of the specific backend instance that responds.

Reference: https://docs.nvidia.com/alchemi/vasp/alchemi-qc-api/health/get-instance-status

## Response

### 200

Instance status.

- `num_cpu_cores` (integer, required) — Number of CPU cores available to the backend.
- `max_cpus_per_core` (integer, required, nullable) — Maximum number of CPU threads per physical core, or null if no limit.
- `max_tasks_per_gpu` (integer, required) — Maximum number of tasks that can run concurrently on each GPU.
- `retention_capacity` (integer, required, nullable) — Output file retention policy, or null if all outputs are retained.
- `launch_delay` (double, required) — Minimum delay between launching tasks, used to limit launch race conditions.
- `gpu_names` (list of string, required) — Name of the GPU for each executor.
- `executor_status` (list of ExecutorStatus, required) — Status for the executor on each GPU.
- `num_input_files` (integer, required) — Number of input files managed by this instance.
- `input_file_size` (double, required) — Disk space occupied by input files managed by this instance, in MB.
- `total_workers` (integer, required) — Maximum number of tasks that can run concurrently across all GPUs.
- `tasks_completed` (integer, required) — Number of tasks completed by this instance.
- `tasks_in_progress` (integer, required) — Number of tasks currently in progress.
- `degraded` (boolean, required) — Whether the backend is in a degraded state.
- `hostname` (string, optional) — The hostname of the backend that responded to the request.

## Types

### ExecutorStatus

Status of a single per-GPU executor.

- `started` (boolean, required) — Whether the executor has been started.
- `num_workers` (integer, required) — Number of worker processes in the executor.
- `active_tasks` (integer, required) — Number of tasks currently being executed.
- `available_memory` (double, required) — Memory available for use, in MB.
- `total_memory` (double, required) — Total memory available on the device, in MB.

## Examples

**Response**

```json
{
  "num_cpu_cores": 1,
  "max_cpus_per_core": 1,
  "max_tasks_per_gpu": 1,
  "retention_capacity": 1,
  "launch_delay": 1.1,
  "gpu_names": [
    "string"
  ],
  "executor_status": [
    {
      "started": true,
      "num_workers": 1,
      "active_tasks": 1,
      "available_memory": 1.1,
      "total_memory": 1.1
    }
  ],
  "num_input_files": 1,
  "input_file_size": 1.1,
  "total_workers": 1,
  "tasks_completed": 1,
  "tasks_in_progress": 1,
  "degraded": true,
  "hostname": "string"
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8000/v1/status/instance"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'http://localhost:8000/v1/status/instance';
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 := "http://localhost:8000/v1/status/instance"

	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("http://localhost:8000/v1/status/instance")

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

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("http://localhost:8000/v1/status/instance")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8000/v1/status/instance');

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

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8000/v1/status/instance");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/v1/status/instance")! 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()
```