---
type: api
title: Get Elasticsearch project link candidates
description: The response contains the list of projects which can be linked to the specified Elasticsearch project in a cross-project search configuration.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-serverless/operation/operation-getelasticsearchprojectlinkcandidates
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/cloud-serverless/operation/operation-getelasticsearchprojectlinkcandidates
products:
  - Elastic Cloud Serverless
---

# Get Elasticsearch project link candidates

- Server: `https://api.elastic-cloud.com`

## Paths

- `GET` `/api/v1/serverless/projects/elasticsearch/{id}/link-candidates`

#### Path parameters

- `id` (string · pattern: ^[a-z0-9]{32}$) — required
  The ID of the project

## Description

The response contains the list of projects which can be linked to the specified Elasticsearch project in a cross-project search configuration.

## Authentication

- Api key: `Authorization: <value>`
  API keys are used to authenticate requests to the Elastic Cloud Serverless REST API.
  Generate your secret API key in https://cloud.elastic.co/account/keys
  You must provide the API key for all API requests in the Authorization header as follows:
  
  ```
  "Authorization: ApiKey $API_KEY"
  ```
  
  For example, if you interact with the API using the curl command:
  
  ```
  curl -H "Authorization: ApiKey essu_..." https://api.elastic-cloud.com/api/v1/serverless/projects/elasticsearch
  ```

## Query string parameters

- `types` (enum[]) — optional
  One or more types of projects to return as link candidates.
  Values: `elasticsearch`, `observability`, `security`, `vectordb`
- `csp` (string) — optional
  The Cloud Service Provider to filter the link candidate projects by.
- `region` (string) — optional
  The region to filter the link candidate projects by.
- `name` (string) — optional
  The project name to filter the link candidates by.
- `alias` (string) — optional
  The project alias to filter the link candidates by.
- `tags` (map string to string · min properties: 1 · max properties: 64) — optional
  If specified, the result will be filtered to only those projects that have the specified tags and corresponding values.
  Example: `{"tags[environment]":"production","tags[team]":"team-a"}`
  Map values (string · min length: 1 · max length: 128 · pattern: ^[a-z0-9][a-z0-9_-]*$)

## Responses

#### `200`

The requested link candidate projects

`application/json`

- `items` (object[])
  The linked candidates.
  - `id` (string · pattern: ^[a-z0-9]{32}$)
    ID of the project.
  - `name` (string · min length: 1 · max length: 255)
    Descriptive name for a project.
  - `alias` (string · min length: 1 · max length: 50 · pattern: ^[a-zA-Z]{1}(?:[a-zA-Z0-9-]*[a-zA-Z0-9]{1})?$)
    A custom domain label compatible with RFC-1035 standards. Derived from the project name by default.
  - `type` (enum)
    The type of the linked project
    Values: `elasticsearch`, `observability`, `security`, `vectordb`
  - `csp` (string)
  - `region` (string)
    Unique human-readable identifier for a region in Elastic Cloud.
  - `tags` (map string to string · min properties: 1 · max properties: 64)
    Tags associated with a project in the form of key-value pairs. Tags are limited to a minimum of 1 and a maximum of 64 per project. Each tag key must begin with a lowercase letter (a-z), contain only lowercase letters, digits, underscores, and hyphens (a-z0-9_-), and have a maximum length of 32 characters.
    Map values (string · min length: 1 · max length: 128 · pattern: ^[a-z0-9][a-z0-9_-]*$)
  - `linked` (boolean)
    Indicates whether the project is already linked to the requesting project.
#### `404`

Not Found

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
## Code examples

#### curl

```curl
curl -X GET "https://api.elastic-cloud.com/api/v1/serverless/projects/elasticsearch/${ID}/link-candidates" \
  -H "Authorization: ApiKey ${API_KEY}"
```

