# Status endpoint

You can programmatically retrieve the status of the on-prem agent by calling its /status endpoint.

# Sample request

$ curl https://localhost:3000/status -i

HTTP/1.1 200
Content-Type: application/json;charset=utf-8
Content-Length: 237
Date: Mon, 07 Mar 2022 07:19:08 GMT

{
  "pid":76801,
  "state":"connected",
  "active":"true",
  "version":"2.10.0",
  "active_requests":0,
  "active_tasks":0,
  "profiles":[
    {"profile":"sql","adapter":"sqlserver"},
    {"profile":"sql2","adapter":"postgresql"},
    {"profile":"sql3","adapter":"mysql"}
  ]
}

# Response schema

Name Type Description
pid Number Process ID of the agent
state String State of the agent. Possible values:
initial, connecting, connected, disconnected, stopping
active String true if agent is enabled, false otherwise
version String Release version of the agent
active_requests Number Number of active requests from agent to other services
active_tasks Number Number of pending tasks. An async action involves one or more tasks.
profiles Array Lists the valid profiles configured on the agent


Last updated: 7/10/2024, 6:18:20 PM