GET /api/endpoint/metadata

Spaces method and path for this operation:

get /s/{space_id}/api/endpoint/metadata

Refer to Spaces for more information.

Get a list of all endpoint host metadata.

Query parameters

  • page integer

    The page number to return.

    Minimum value is 1. Default value is 1.

  • pageSize integer

    The number of endpoints to return per page.

    Minimum value is 1, maximum value is 100. Default value is 10.

  • kuery string

    A KQL string to filter the endpoint metadata results.

  • hostStatuses array[string] Required

    A set of host statuses to filter the results by (for example, healthy, updating).

    Not more than 20 elements. Values are healthy, offline, updating, inactive, or unenrolled.

  • sortField string

    The field used to sort the results.

    Values are enrolled_at, metadata.host.hostname, host_status, metadata.Endpoint.policy.applied.name, metadata.Endpoint.policy.applied.status, metadata.host.os.name, metadata.host.ip, metadata.agent.version, or last_checkin.

  • sortDirection string

    The sort order, either asc or desc.

    Values are asc or desc.

Responses

  • 200 application/json

    Indicates a successful call.

GET /api/endpoint/metadata
curl \
 --request GET 'https://localhost:5601/api/endpoint/metadata?hostStatuses=healthy&hostStatuses=updating' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "data": [
    {
      "host_status": "healthy",
      "last_checkin": "2023-07-04T15:47:57.432Z",
      "metadata": {
        "agent": {
          "id": "285297c6-3bff-4b83-9a07-f3e749801123",
          "type": "endpoint",
          "version": "8.10.0"
        },
        "Endpoint": {
          "policy": {
            "applied": {
              "id": "d5371dcd-93b7-4627-af88-4084f7d6aa3e",
              "name": "test",
              "status": "success"
            }
          },
          "status": "enrolled"
        },
        "host": {
          "hostname": "WinDev2104Eval",
          "os": {
            "name": "Windows",
            "platform": "windows",
            "version": "20H2"
          }
        }
      }
    }
  ],
  "page": 0,
  "pageSize": 10,
  "sortDirection": "desc",
  "sortField": "enrolled_at",
  "total": 1
}