---
type: api
title: Export value list items
description: Export list item values from the specified value list.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-exportlistitems
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-exportlistitems
products:
  - Kibana
---

# Export value list items

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

## Paths

- `POST` `/api/lists/items/_export`

## Description

Export list item values from the specified value list.

## 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

- `list_id` (string · format: nonempty · min length: 1) — required
  Value list's `id` to export.
  Example: `21b01cfb-058d-44b9-838c-282be16c91cd`

## Responses

#### `200`

Successful response

`application/ndjson`

Type: `string · format: binary`

#### `400`

Invalid input data response

`application/json`

One of:
- **{ error, statusCode }**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **{ status_code }**
  - `message` (string)
  - `status_code` (integer)
#### `401`

Unsuccessful authentication response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `403`

Not enough privileges response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
#### `404`

List not found response

`application/json`

- `message` (string)
- `status_code` (integer)
#### `500`

Internal server error response

`application/json`

- `message` (string)
- `status_code` (integer)
## Code examples

#### Console

```console
POST kbn:/api/lists/items/_export?list_id=21b01cfb-058d-44b9-838c-282be16c91cd
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/lists/items/_export?list_id=21b01cfb-058d-44b9-838c-282be16c91cd" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Ip lines

```json
127.0.0.1
127.0.0.2
127.0.0.3
```

#### Bad

```json
{
  "error": "Bad Request\u0022,\u0022message\u0022:\u0022[request query]: list_id: Required",
  "statusCode": 400
}
```

#### Unauthorized

```json
{
  "error": "Unauthorized",
  "message": "[security_exception\\n\\tRoot causes:\\n\\t\\tsecurity_exception: unable to authenticate user [elastic] for REST request [/_security/_authenticate]]: unable to authenticate user [elastic] for REST request [/_security/_authenticate]",
  "statusCode": 401
}
```

#### Forbidden

```json
{
  "error": "Forbidden",
  "message": "API [POST /api/lists/items/_export?list_id=ips.txt] is unauthorized for user, this action is granted by the Kibana privileges [lists-read]",
  "statusCode": 403
}
```

#### Not found

```json
{
  "message": "list id: \u0022unknown_list\u0022 not found",
  "status_code": 404
}
```

#### Server error

```json
{
  "message": "Internal Server Error",
  "status_code": 500
}
```

