---
title: retrieves-a-list-of-integration-log-drains-deprecated
product: vercel
url: /docs/rest-api/logdrains/retrieves-a-list-of-integration-log-drains-deprecated
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. |


## 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": [
            "external",
            "build",
            "edge",
            "lambda",
            "static",
            "firewall",
            "redirect"
          ]
        }
      },
      "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": [
            "production",
            "preview"
          ]
        }
      },
      "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"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "self-served"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "integrationConfigurationId",
              "integrationId",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "integration"
                ]
              },
              "resourceId": {
                "type": "string"
              },
              "externalResourceId": {
                "type": "string"
              },
              "integrationId": {
                "type": "string"
              },
              "integrationConfigurationId": {
                "type": "string"
              }
            }
          }
        ]
      }
    }
  }
}
```

### 400: No description

### 401: The request is not authorized.

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

---

## 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)
