---
type: api
title: Export value list items
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-exportlistitems
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-exportlistitems
products:
  - Kibana
---

# Export value list items

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

## Paths

- `POST` `/api/lists/items/_export`
- `POST` `/s/{space_id}/api/lists/items/_export`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

## Description

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

Export list item values from the specified value list.

## Query String Parameters

- `list_id` (string · min: 1)
  Value list's `id` to export.

## Responses

#### `200`

Successful response

`application/ndjson`

Type: `string`

#### `400`

Invalid input data response

`application/json`

One of:
- **PlatformErrorResponse**
  - `error` (string)
  - `message` (string)
  - `statusCode` (integer)
- **SiemErrorResponse**
  - `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 /api/lists/items/_export?list_id={list_id}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/lists/items/_export?list_id={list_id}"
```

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

