---
title: "Get a metadata list"
method: GET
path: "/api/endpoint/metadata"
tags: ["Security Endpoint Management API"]
---

# Get a metadata list

`GET /api/endpoint/metadata`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/endpoint/metadata</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get a list of all endpoint host metadata.

## Query parameters

- `page` integer — Page number
- `pageSize` integer — Number of items per page
- `kuery` string — A KQL string.
- `hostStatuses` string[], required — A set of agent health statuses to filter by.
- `sortField` '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' | 'last_checkin' — Determines which field is used to sort the results.
- `sortDirection` 'asc' | 'desc' — Determines the sort order.

## Response `200`

Indicates a successful call.

- SecurityEndpointManagementAPIMetadataListResponse

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
