---
type: api
title: Get roles for a VectorDB project
description: Retrieve the custom roles defined for a VectorDB project.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-serverless/operation/operation-getvectordbprojectroles
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-serverless/operation/operation-getvectordbprojectroles
products:
  - Elastic Cloud Serverless
---

# Get roles for a VectorDB project

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

## Paths

- `GET` `/api/v1/serverless/projects/vectordb/{id}/roles`

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

## Description

Retrieve the custom roles defined for a VectorDB project.

## Responses

#### `200`

The requested roles

`application/json`

Type: `ProjectRolesByProjectID`

##### Response Headers

- `ETag` (string)

#### `404`

Not Found

`application/json`

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

#### Console

```console
GET /api/v1/serverless/projects/vectordb/{id}/roles
```

#### curl

```curl
curl -X GET "https://api.elastic-cloud.com/api/v1/serverless/projects/vectordb/{id}/roles"
```

