---
title: retrieves-a-list-of-integration-log-drains-deprecated
product: vercel
url: /docs/rest-api/logdrains/retrieves-a-list-of-integration-log-drains-deprecated
canonical_url: "https://vercel.com/docs/rest-api/logdrains/retrieves-a-list-of-integration-log-drains-deprecated"
last_updated: 2026-09-09
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about retrieves-a-list-of-integration-log-drains-deprecated on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

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

## 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": {
      "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"
      },
      "id": {
        "type": "string",
        "description": "The unique identifier of the log drain. Always prefixed with `ld_`"
      },
      "deliveryFormat": {
        "type": "string",
        "description": "The delivery log format",
        "enum": [
          "json",
          "ndjson",
          "protobuf"
        ]
      },
      "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"
        }
      },
      "url": {
        "type": "string",
        "description": "The URL to call when logs are generated"
      },
      "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"
          ]
        }
      },
      "createdFrom": {
        "type": "string",
        "description": "Whether the log drain was created by an integration or by a user",
        "enum": [
          "integration",
          "self-served"
        ]
      },
      "headers": {
        "type": "object",
        "description": "The headers to send with the request",
        "additionalProperties": {
          "type": "string"
        }
      },
      "environments": {
        "type": "array",
        "description": "The environment of log drain",
        "items": {
          "type": "string",
          "description": "The environment of log drain",
          "enum": [
            "preview",
            "production"
          ]
        }
      },
      "branch": {
        "type": "string",
        "description": "The branch regexp of log drain"
      },
      "samplingRate": {
        "type": "number",
        "description": "The sampling rate of log drain"
      },
      "source": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "kind"
            ]
          },
          {
            "type": "object",
            "required": [
              "integrationConfigurationId",
              "integrationId",
              "kind"
            ]
          }
        ]
      }
    }
  }
}
```

### 400: No description

### 401: The request is not authorized.

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

### 410: No description

---

## Related

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

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

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

---

[View full sitemap](/docs/sitemap)
