curl https://api.u1.archetypeai.app/v0.5/batch/jobs/queue \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
response = requests.get(
"https://api.u1.archetypeai.app/v0.5/batch/jobs/queue",
headers={"Authorization": f"Bearer {api_key}"}
)
data = response.json()
for queue in data["queues"]:
print(f"{queue['pipeline_type']}: {queue['depth']} jobs queued")
const response = await fetch('https://api.u1.archetypeai.app/v0.5/batch/jobs/queue', {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.queues.forEach(queue => {
console.log(`${queue.pipeline_type}: ${queue.depth} jobs queued`);
});
{
"queues": [
{
"pipeline_type": "batch",
"depth": 12
},
{
"pipeline_type": "training",
"depth": 3
}
]
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Jobs
Get Queue Depths
Retrieve global queue depths grouped by pipeline type
GET
/
batch
/
jobs
/
queue
curl https://api.u1.archetypeai.app/v0.5/batch/jobs/queue \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
response = requests.get(
"https://api.u1.archetypeai.app/v0.5/batch/jobs/queue",
headers={"Authorization": f"Bearer {api_key}"}
)
data = response.json()
for queue in data["queues"]:
print(f"{queue['pipeline_type']}: {queue['depth']} jobs queued")
const response = await fetch('https://api.u1.archetypeai.app/v0.5/batch/jobs/queue', {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.queues.forEach(queue => {
console.log(`${queue.pipeline_type}: ${queue.depth} jobs queued`);
});
{
"queues": [
{
"pipeline_type": "batch",
"depth": 12
},
{
"pipeline_type": "training",
"depth": 3
}
]
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Requires version 1.1.0 or later of the Archetype platform.
Overview
This endpoint returns the current queue depths for all pipeline types. Use this to monitor how many jobs are waiting to be processed.Response
array
Array of queue depth entries, each containing:
pipeline_type— Pipeline type (batchortraining)depth— Number of jobs currently in the queue for this pipeline type
curl https://api.u1.archetypeai.app/v0.5/batch/jobs/queue \
-H "Authorization: Bearer $ATAI_API_KEY"
import requests
import os
api_key = os.environ.get("ATAI_API_KEY")
response = requests.get(
"https://api.u1.archetypeai.app/v0.5/batch/jobs/queue",
headers={"Authorization": f"Bearer {api_key}"}
)
data = response.json()
for queue in data["queues"]:
print(f"{queue['pipeline_type']}: {queue['depth']} jobs queued")
const response = await fetch('https://api.u1.archetypeai.app/v0.5/batch/jobs/queue', {
headers: {
'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
}
});
const data = await response.json();
data.queues.forEach(queue => {
console.log(`${queue.pipeline_type}: ${queue.depth} jobs queued`);
});
{
"queues": [
{
"pipeline_type": "batch",
"depth": 12
},
{
"pipeline_type": "training",
"depth": 3
}
]
}
{
"detail": "Invalid access with key: api_key_not_found"
}
Was this page helpful?