---
type: api
title: Get shareable references
description: Collect references and space contexts for saved objects.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-post-spaces-get-shareable-references
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-post-spaces-get-shareable-references
products:
  - Kibana
---

# Get shareable references

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

## Paths

- `POST` `/api/spaces/_get_shareable_references`

## Description

Collect references and space contexts for saved objects.

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

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `objects` (object[] · max items: 1000) — required
  - `id` (string) — required
  - `type` (string) — required

## Response

Indicates a successful call.

`application/json`

## Code examples

#### Console

```console
POST kbn:/api/spaces/_get_shareable_references
{
  "objects": [
    {
      "type": "dashboard",
      "id": "my-dashboard-id"
    }
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/spaces/_get_shareable_references" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "objects": [
      {
        "type": "dashboard",
        "id": "my-dashboard-id"
      }
    ]
  }'
```

## Response examples

#### Get shareable references response

A response that includes the collected references and the spaces where the objects exist.

```json
{
  "objects": [
    {
      "type": "dashboard",
      "id": "my-dashboard-id",
      "spaces": [
        "default",
        "marketing"
      ],
      "inboundReferences": []
    }
  ]
}
```

