---
title: retrieve-a-list-of-all-drains
product: vercel
url: /docs/rest-api/drains/retrieve-a-list-of-all-drains
canonical_url: "https://vercel.com/docs/rest-api/drains/retrieve-a-list-of-all-drains"
last_updated: 2026-08-28
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about retrieve-a-list-of-all-drains on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Retrieve a list of all Drains

```http
GET /v1/drains
```

Allows to retrieve the list of Drains of the authenticated team.

## Authentication

**bearerToken**: HTTP bearer

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `projectId` | string | No |  |
| `includeMetadata` | boolean. default: false | No |  |
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/drains?projectId=string&includeMetadata=true&teamId=string&slug=string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/drains?projectId=string&includeMetadata=true&teamId=string&slug=string', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X GET 'https://api.vercel.com/v1/drains?projectId=string&includeMetadata=true&teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "drains": [
    {
      "id": "icfg_1234567890",
      "createdAt": "123",
      "updatedAt": "123",
      "projectIds": [],
      "name": "Example Name",
      "teamId": "example_id",
      "ownerId": "example_id",
      "status": "disabled",
      "firstErrorTimestamp": "123",
      "disabledAt": "123",
      "disabledBy": "string",
      "disabledReason": "account-plan-downgrade",
      "schemas": {
        "log": "value",
        "trace": "value",
        "analytics": "value",
        "speed_insights": "value",
        "ai_gateway": "value",
        "audit_log": "value",
        "connect": "value"
      },
      "delivery": {
        "type": "http",
        "endpoint": "string",
        "encoding": "json",
        "compression": "gzip",
        "headers": "value",
        "secret": "string"
      },
      "sampling": [
        {
          "type": "head_sampling",
          "rate": "123",
          "env": "preview",
          "requestPath": "string"
        }
      ],
      "source": {
        "kind": "self-served"
      },
      "filterV2": {
        "version": "v2",
        "filter": {}
      }
    }
  ]
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "drains"
  ],
  "properties": {
    "drains": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "createdAt",
              "delivery",
              "id",
              "name",
              "ownerId",
              "schemas",
              "source",
              "updatedAt"
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "createdAt",
              "delivery",
              "id",
              "name",
              "ownerId",
              "schemas",
              "source",
              "updatedAt"
            ]
          }
        }
      ]
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

---

## Related

- [drains endpoints](/docs/rest-api#drains)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
