---
type: api
title: Get a metadata list
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-getendpointmetadatalist
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-getendpointmetadatalist
products:
  - Kibana
---

# Get a metadata list

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/endpoint/metadata`
- `GET` `/s/{space_id}/api/endpoint/metadata`

## Description

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

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Query string parameters

- `page` (integer · min: 1 · default: 1) — optional
- `pageSize` (integer · min: 1 · max: 100 · default: 10) — optional
- `kuery` (string) — optional
  Example: `united.endpoint.host.os.name : 'Windows'`
- `hostStatuses` (enum[]) — required
  Values: `healthy`, `offline`, `updating`, `inactive`, `unenrolled`
- `sortField` (enum) — optional
  Values: `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`
- `sortDirection` (enum) — optional
  Values: `asc`, `desc`

## Response

OK

`application/json`

Type: `object`

## Code examples

#### Console

```console
GET kbn:/api/endpoint/metadata?hostStatuses=healthy&hostStatuses=updating
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/endpoint/metadata?hostStatuses=healthy&hostStatuses=updating" \
  -H "Authorization: ApiKey ${API_KEY}"
```

