Agent Status | Medplum

Invoke the $status operation

[base]/Agent/[id]/$status

For example:

medplum get 'Agent/[id]/$status'

Valid Response

Valid status codes include:

Example response when the Agent is known and connected:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "status",
      "valueCode": "connected"
    },
    {
      "name": "version",
      "valueString": "3.1.4"
    },
    {
      "name": "lastUpdated",
      "valueInstant": "2024-04-19T00:00:00Z"
    }
  ]
}

In cases where status has not been reported yet, status and version may be unknown, and lastUpdated may not be present.

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "status",
      "valueCode": "unknown"
    },
    {
      "name": "version",
      "valueString": "unknown"
    }
  ]
}

Invalid Response

Example outcome when an ID was not supplied to the operation:

{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "invalid",
      "details": {
        "text": "Must specify agent ID or identifier"
      }
    }
  ]
}