Skip to main content
PATCH
/
v1
/
drains
/
{id}
updateDrain
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.drains.updateDrain({
    id: "<id>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
  });

  console.log(result);
}

run();
{
  "id": "<string>",
  "ownerId": "<string>",
  "name": "<string>",
  "createdAt": 123,
  "createdFrom": "self-served",
  "updatedAt": 123,
  "projectIds": [
    "<string>"
  ],
  "schemas": {
    "log": {},
    "trace": {},
    "analytics": {},
    "speed_insights": {}
  },
  "delivery": {
    "type": "http",
    "endpoint": "<string>",
    "encoding": "json",
    "compression": "gzip",
    "headers": {},
    "secret": "<string>"
  },
  "sampling": [
    {
      "type": "head_sampling",
      "rate": 123,
      "env": "production",
      "requestPath": "<string>"
    }
  ],
  "teamId": "<string>",
  "status": "enabled",
  "disabledAt": 123,
  "disabledReason": "disabled-by-owner",
  "disabledBy": "<string>",
  "firstErrorTimestamp": 123,
  "configurationId": "<string>",
  "clientId": "<string>",
  "source": {
    "kind": "self-served"
  },
  "filter": "<string>",
  "filterV2": {
    "version": "v1"
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

id
string
required

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/json
name
string
projects
enum<string>
Available options:
some,
all
projectIds
string[] | null
filter
schemas
object
delivery
object
  • Option 1
  • Option 2
  • Option 3
sampling
object[] | null
transforms
object[] | null
status
enum<string>
Available options:
enabled,
disabled
source
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4

Response

  • Option 1
  • Option 2
id
string
required
ownerId
string
required
name
string
required
createdAt
number
required
updatedAt
number
required
source
object
required
  • Option 1
  • Option 2
createdFrom
enum<string>
Available options:
self-served,
integration
projectIds
string[]
schemas
object
delivery
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
sampling
object[]
teamId
string | null
status
enum<string>
Available options:
enabled,
disabled,
errored
disabledAt
number
disabledReason
enum<string>
Available options:
disabled-by-owner,
feature-not-available,
account-plan-downgrade,
disabled-by-admin
disabledBy
string
firstErrorTimestamp
number
configurationId
string
clientId
string
filter
string
filterV2
object
  • Option 1
  • Option 2
I