logDrains

Retrieves a list of Integration log drains (deprecated)

Changed on

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.

get/v2/integrations/log-drains

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v2/integrations/log-drains
  • Auth: HTTP bearer

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Response

A list of log drains

branchstring

The branch regexp of log drain

clientIdstring

The oauth2 client application id that created this log drain

configurationIdstring

The client configuration this log drain was created with

createdAtnumber required

A timestamp that tells you when the log drain was created

createdFrom'integration' | 'self-served'

Whether the log drain was created by an integration or by a user

deliveryFormat'json' | 'ndjson' | 'protobuf'

The delivery log format

environmentsstring[]

The environment of log drain

headersobject

The headers to send with the request

idstring required

The unique identifier of the log drain. Always prefixed with ld_

namestring required

The name of the log drain

ownerIdstring required

The identifier of the team or user whose events will trigger the log drain

projectIdstring nullable
projectIdsstring[]

The identifier of the projects this log drain is associated with

samplingRatenumber

The sampling rate of log drain

sourcesstring[]

The sources from which logs are currently being delivered to this log drain.

urlstring required

The URL to call when logs are generated

Example response

[
  {
    "branch": "feature/*",
    "clientId": "oac_xRhY4LAB7yLhUADD69EvV7ct",
    "configurationId": "icfg_3bwCLgxL8qt5kjRLcv2Dit7F",
    "createdAt": 1558531915505,
    "createdFrom": "integration",
    "deliveryFormat": "json",
    "environments": [
      "production"
    ],
    "id": "ld_nBuA7zCID8g4QZ8g",
    "name": "My first log drain",
    "ownerId": "kr1PsOIzqEL5Xg6M4VZcZosf",
    "projectId": "AbCgVkqoxXeXCDWehVir51LHGrrcWL4mkYm14W6UBPWQeb",
    "samplingRate": 0.5,
    "sources": [
      "build",
      "edge"
    ],
    "url": "https://example.com/log-drain"
  }
]

Changes