Get agents

GET /api/fleet/agents

[Required authorization] Route required privileges: fleet-agents-read.

Query parameters

  • page number
  • perPage number

    Default value is 20.

  • kuery string
  • showAgentless boolean

    Default value is true.

  • showInactive boolean

    Default value is false.

  • withMetrics boolean

    Default value is false.

  • showUpgradeable boolean

    Default value is false.

  • getStatusSummary boolean

    Default value is false.

  • sortField string
  • sortOrder string

    Values are asc or desc.

  • searchAfter string
  • openPit boolean
  • pitId string
  • pitKeepAlive string

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • items array[object] Required
      Hide items attributes Show items attributes object
      • access_api_key string
      • access_api_key_id string
      • active boolean Required
      • agent object

        Additional properties are allowed.

        Hide agent attributes Show agent attributes object
        • id string Required
        • version string Required
      • audit_unenrolled_reason string
      • components array[object]
        Hide components attributes Show components attributes object
        • id string Required
        • message string Required
        • status string Required

          Values are STARTING, CONFIGURING, HEALTHY, DEGRADED, FAILED, STOPPING, or STOPPED.

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

            Additional properties are allowed.

          • status string Required

            Values are STARTING, CONFIGURING, HEALTHY, DEGRADED, FAILED, STOPPING, or STOPPED.

          • type string Required

            Values are input or output.

      • default_api_key string
      • default_api_key_history array[object]
        Hide default_api_key_history attributes Show default_api_key_history attributes object Deprecated
        • id string Required
        • retired_at string Required
      • default_api_key_id string
      • enrolled_at string Required
      • id string Required
      • last_checkin string
      • last_checkin_message string
      • last_checkin_status string

        Values are error, online, degraded, updating, or starting.

      • local_metadata object Required

        Additional properties are allowed.

      • metrics object

        Additional properties are NOT allowed.

        Hide metrics attributes Show metrics attributes object
        • cpu_avg number
        • memory_size_byte_avg number
      • namespaces array[string]
      • outputs object
        Hide outputs attribute Show outputs attribute object
        • * object Additional properties

          Additional properties are NOT allowed.

          Hide * attributes Show * attributes object
          • api_key_id string
          • to_retire_api_key_ids array[object]
            Hide to_retire_api_key_ids attributes Show to_retire_api_key_ids attributes object
            • id string Required
            • retired_at string Required
          • type string
      • packages array[string] Required
      • policy_id string
      • policy_revision number | null
      • sort array
      • status string

        Values are offline, error, online, inactive, enrolling, unenrolling, unenrolled, updating, degraded, uninstalled, or orphaned.

      • tags array[string]
      • type string Required

        Values are PERMANENT, EPHEMERAL, or TEMPORARY.

      • unenrolled_at string
      • unenrollment_started_at string
      • unhealthy_reason array[string] | null

        Values are input, output, or other.

      • upgrade_attempts array[string] | null
      • upgrade_details object | null

        Additional properties are NOT allowed.

        Hide upgrade_details attributes Show upgrade_details attributes object | null
        • action_id string Required
        • metadata object

          Additional properties are NOT allowed.

          Hide metadata attributes Show metadata attributes object
          • download_percent number
          • download_rate number
          • error_msg string
          • failed_state string

            Values are UPG_REQUESTED, UPG_SCHEDULED, UPG_DOWNLOADING, UPG_EXTRACTING, UPG_REPLACING, UPG_RESTARTING, UPG_FAILED, UPG_WATCHING, or UPG_ROLLBACK.

          • retry_error_msg string
          • retry_until string
          • scheduled_at string
        • state string Required

          Values are UPG_REQUESTED, UPG_SCHEDULED, UPG_DOWNLOADING, UPG_EXTRACTING, UPG_REPLACING, UPG_RESTARTING, UPG_FAILED, UPG_WATCHING, or UPG_ROLLBACK.

        • target_version string Required
      • upgrade_started_at string | null
      • upgraded_at string | null
      • user_provided_metadata object

        Additional properties are allowed.

    • nextSearchAfter string
    • page number Required
    • perPage number Required
    • pit string
    • statusSummary object
      Hide statusSummary attribute Show statusSummary attribute object
      • * number Additional properties
    • total number Required
  • 400 application/json
    Hide response attributes Show response attributes object
    • error string
    • errorType string
    • message string Required
    • statusCode number
GET /api/fleet/agents
curl \
 --request GET 'https://<KIBANA_URL>/api/fleet/agents' \
 --header "Authorization: $API_KEY"