Skip to main content
GET
https://agentgate.mynewapi.com
/
api
/
v1
/
queue
/
health
Get Queue Health
curl --request GET \
  --url https://agentgate.mynewapi.com/api/v1/queue/health \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "status": "<string>",
    "stats": {
      "running": 123,
      "waiting": 123,
      "maxConcurrent": 123,
      "maxQueueSize": 123,
      "accepting": true
    },
    "utilization": 123,
    "timestamp": "<string>",
    "indicators": {
      "accepting": true,
      "canStartImmediately": true,
      "queueDepth": 123,
      "runningCount": 123
    }
  }
}

Get Queue Health

Returns comprehensive queue health information including statistics, utilization, and health indicators.

Request

curl https://agentgate.mynewapi.com/api/v1/queue/health \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

success
boolean
required
Indicates if the request was successful
data
object
required
Queue health data

Example Response

{
  "success": true,
  "data": {
    "status": "healthy",
    "stats": {
      "running": 2,
      "waiting": 5,
      "maxConcurrent": 10,
      "maxQueueSize": 100,
      "accepting": true
    },
    "utilization": 0.05,
    "timestamp": "2024-01-15T10:30:00.000Z",
    "indicators": {
      "accepting": true,
      "canStartImmediately": true,
      "queueDepth": 5,
      "runningCount": 2
    }
  },
  "requestId": "req_abc123"
}

Health Status

StatusDescriptionHTTP Code
healthyNormal operation200
degradedQueue is more than 80% full200
unhealthyQueue is full and not accepting503
When the queue is unhealthy, the endpoint returns HTTP 503 but still includes the health data in the response body.