Get agent by ID

GET /api/fleet/agents/{agentId}

Spaces method and path for this operation:

get /s/{space_id}/api/fleet/agents/{agentId}

Refer to Spaces for more information.

Path parameters

  • agentId string Required

Query parameters

  • withMetrics boolean

    Return agent metrics, false by default

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • item object Required
      Hide item attributes Show item attributes object
      • access_api_key string
      • access_api_key_id string
      • active boolean Required
      • components array[object]
        Hide components attributes Show components attributes object
        • id string
        • message string
        • status string

          Values are starting, configuring, healthy, degraded, failed, stopping, or stopped.

        • type string
        • units array[object]
          Hide units attributes Show units attributes object
          • id string
          • message string
          • payload object
          • status string

            Values are starting, configuring, healthy, degraded, failed, stopping, or stopped.

          • type string

            Values are input or output.

      • default_api_key string
      • default_api_key_id string
      • enrolled_at string Required
      • id string Required
      • last_checkin string
      • local_metadata object
      • metrics object
        Hide metrics attributes Show metrics attributes object
        • cpu_avg number

          Average agent CPU usage during the last 5 minutes, number between 0-1

        • memory_size_byte_avg number

          Average agent memory consumption during the last 5 minutes

      • policy_id string
      • policy_revision number
      • status string Required

        Values are offline, error, online, inactive, or warning.

      • type string Required

        Values are PERMANENT, EPHEMERAL, or TEMPORARY.

      • unenrolled_at string
      • unenrollment_started_at string
      • user_provided_metadata object
  • 400 application/json

    Generic Error

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode number
GET /api/fleet/agents/{agentId}
curl \ --request GET 'https://localhost:5601/api/fleet/agents/{agentId}' \ --header "Authorization: $API_KEY"