---
title: retrieves-a-list-of-integration-log-drains-deprecated
description: Learn about retrieves-a-list-of-integration-log-drains-deprecated on Vercel.
url: "https://vercel.com/docs/rest-api/logdrains/retrieves-a-list-of-integration-log-drains-deprecated"
last_updated: 2026-11-28
related:
  - /docs/rest-api
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Retrieves a list of Integration log drains (deprecated)

```http
GET /v2/integrations/log-drains
```

Retrieves a list of all Integration log drains that are defined for the authenticated user or team. When using an OAuth2 token, the list is limited to log drains created by the authenticated integration.

## Authentication

**bearerToken**: HTTP bearer

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `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/v2/integrations/log-drains?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/v2/integrations/log-drains?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/v2/integrations/log-drains?teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
[
  {
    "branch": "feature/*",
    "clientId": "oac_xRhY4LAB7yLhUADD69EvV7ct",
    "configurationId": "icfg_3bwCLgxL8qt5kjRLcv2Dit7F",
    "createdAt": "1558531915505",
    "createdFrom": "integration",
    "deliveryFormat": "json",
    "environments": [],
    "headers": "{\"Authorization\": \"Bearer 123\"}",
    "id": "ld_nBuA7zCID8g4QZ8g",
    "name": "My first log drain",
    "ownerId": "kr1PsOIzqEL5Xg6M4VZcZosf",
    "projectId": "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb",
    "projectIds": [],
    "samplingRate": "0.5",
    "source": {
      "defaultFor": "eve-tracing",
      "kind": "self-served"
    },
    "sources": [],
    "url": "https://example.com/log-drain"
  }
]
```

## Responses

### 200: A list of log drains

Content-Type: `application/json`

```json
{
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "createdAt",
      "id",
      "name",
      "ownerId",
      "source",
      "url"
    ],
    "properties": {
      "branch": {
        "type": "string",
        "description": "The branch regexp of log drain"
      },
      "clientId": {
        "type": "string",
        "description": "The oauth2 client application id that created this log drain"
      },
      "configurationId": {
        "type": "string",
        "description": "The client configuration this log drain was created with"
      },
      "createdAt": {
        "type": "number",
        "description": "A timestamp that tells you when the log drain was created"
      },
      "createdFrom": {
        "type": "string",
        "description": "Whether the log drain was created by an integration or by a user",
        "enum": [
          "integration",
          "self-served"
        ]
      },
      "deliveryFormat": {
        "type": "string",
        "description": "The delivery log format",
        "enum": [
          "json",
          "ndjson",
          "protobuf"
        ]
      },
      "environments": {
        "type": "array",
        "description": "The environment of log drain",
        "items": {
          "type": "string",
          "description": "The environment of log drain",
          "enum": [
            "preview",
            "production"
          ]
        }
      },
      "headers": {
        "type": "object",
        "description": "The headers to send with the request",
        "additionalProperties": {
          "type": "string"
        }
      },
      "id": {
        "type": "string",
        "description": "The unique identifier of the log drain. Always prefixed with `ld_`"
      },
      "name": {
        "type": "string",
        "description": "The name of the log drain"
      },
      "ownerId": {
        "type": "string",
        "description": "The identifier of the team or user whose events will trigger the log drain"
      },
      "projectId": {
        "type": "string",
        "nullable": true
      },
      "projectIds": {
        "type": "array",
        "description": "The identifier of the projects this log drain is associated with",
        "items": {
          "type": "string"
        }
      },
      "samplingRate": {
        "type": "number",
        "description": "The sampling rate of log drain"
      },
      "source": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "kind"
            ]
          },
          {
            "type": "object",
            "required": [
              "integrationConfigurationId",
              "integrationId",
              "kind"
            ]
          }
        ]
      },
      "sources": {
        "type": "array",
        "description": "The sources from which logs are currently being delivered to this log drain.",
        "items": {
          "type": "string",
          "description": "The sources from which logs are currently being delivered to this log drain.",
          "enum": [
            "build",
            "edge",
            "external",
            "firewall",
            "lambda",
            "redirect",
            "static"
          ]
        }
      },
      "url": {
        "type": "string",
        "description": "The URL to call when logs are generated"
      }
    }
  }
}
```

### 400: No description

### 401: The request is not authorized.

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

### 404: No description

### 410: No description

---

## Related

- [logDrains endpoints](/docs/rest-api#logdrains)

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

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

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
