Skip to main content
Some Ardent work takes longer than a single request: connector discovery, connector setup, resets, and environment operations. Those endpoints return an operation ID that you can poll.

Get an operation

curl -H "Authorization: Bearer $ARDENT_TOKEN" https://api.tryardent.com/v1/operations/op_123
Representative response:
{
  "id": "op_123",
  "org_id": "org_123",
  "type": "connector_engine_setup",
  "resource_id": "conn_123",
  "status": "running",
  "stage": "initializing",
  "progress": 35,
  "result": null,
  "error": null,
  "created_at": "2026-06-01T12:00:00Z",
  "updated_at": "2026-06-01T12:02:00Z"
}

Status values

StatusMeaning
pendingThe operation is queued
runningWork is in progress
completedWork finished successfully
failedWork reached a terminal failure

Polling loop

while true; do
  json="$(curl -s -H "Authorization: Bearer $ARDENT_TOKEN"     "https://api.tryardent.com/v1/operations/$OPERATION_ID")"
  status="$(node -e 'console.log(JSON.parse(process.argv[1]).status)' "$json")"

  case "$status" in
    completed) echo "$json"; break ;;
    failed) echo "$json" >&2; exit 1 ;;
    pending|running) sleep 5 ;;
    *) echo "Unknown operation status: $status" >&2; exit 1 ;;
  esac
done
Poll with a bounded timeout in production automation. If an operation fails, read error, fix the cause, and start a new supported action rather than assuming the old operation will recover.