> For the complete documentation index, see [llms.txt](https://on-premises.docs.hyper3d.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://on-premises.docs.hyper3d.ai/task/query-queue-status.md).

# Query Queue Status

### Request

{% hint style="info" %}
**Note**: All requests to this endpoint must include a valid token in the Authorization header for authentication.
{% endhint %}

#### Authentication

This API uses a bearer key for authentication. You need to include a valid token in the Authorization header for all requests. Refer to the [Login](/authentication/login.md) section for how to get an API key for your account.

```http
Authorization: Bearer YOUR_API_KEY
```

#### Endpoint

<mark style="color:green;">`GET`</mark> `/api/v2/queue_status_check`

#### Parameters

No parameters are required for this request.

### Response

The response is a JSON object containing metrics for each queue. Each queue's metrics include:

* `consumers`: The number of consumers listening to the queue.
* `job_awaiting`: The number of jobs waiting to be processed.
* `job_running`: The number of jobs currently being processed.

#### Example Response

```json
{
    "rodin.mesh": {
        "consumers": 1,
        "job_awaiting": 0,
        "job_running": 0
    },
    "rodin.pack": {
        "consumers": 1,
        "job_awaiting": 0,
        "job_running": 0
    },
    "rodin.remesh": {
        "consumers": 1,
        "job_awaiting": 0,
        "job_running": 0
    },
    "rodin.texture": {
        "consumers": 1,
        "job_awaiting": 0,
        "job_running": 0
    }
}
```

### Examples

{% tabs %}
{% tab title="Python" %}

```python
import requests

RODIN_API_KEY = 'your api key'
headers = {
    'Authorization': f'Bearer {RODIN_API_KEY}'
}
response = requests.get('https://hyperhuman.deemos.com/api/v2/queue_status_check', headers=headers)
print(response.json())
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"time"
)

const BaseURI = "https://hyperhuman.deemos.com/api"

var client = &http.Client{Timeout: 10 * time.Second}

type QueueDescriptor struct {
	Consumers   int `json:"consumers"`
	JobAwaiting int `json:"job_awaiting"`
	JobRunning  int `json:"job_running"`
}

type RodinQueueStats struct {
	Mesh    QueueDescriptor `json:"rodin.mesh"`
	Pack    QueueDescriptor `json:"rodin.pack"`
	Remesh  QueueDescriptor `json:"rodin.remesh"`
	Texture QueueDescriptor `json:"rodin.texture"`
}

func QueryRodinQueueStats(token string) (*RodinQueueStats, error) {
	// Create the request
	req, err := http.NewRequest("GET", fmt.Sprintf("%s/v2/queue_status_check", BaseURI), bytes.NewBuffer([]byte{}))
	if err != nil {
		return nil, err
	}

	// Set headers
	req.Header.Set("Authorization", "Bearer "+token)
	req.Header.Set("Content-Type", "application/json")

	// Send the request
	resp, err := client.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	// Decode the response JSON
	var result RodinQueueStats
	err = json.NewDecoder(resp.Body).Decode(&result)
	if err != nil {
		return nil, err
	}

	return &result, nil
}

func main() {
	token := "eyJhbGciOiJIUzI1NiJ9.your.token"

	stats, err := QueryRodinQueueStats(token)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(stats)
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://on-premises.docs.hyper3d.ai/task/query-queue-status.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
