import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.drains.getDrains({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();{
"drains": [
{
"id": "<string>",
"ownerId": "<string>",
"name": "<string>",
"createdAt": 123,
"updatedAt": 123,
"schemas": {
"log": {},
"trace": {},
"analytics": {},
"speed_insights": {}
},
"delivery": {
"type": "http",
"endpoint": "<string>",
"encoding": "json",
"headers": {},
"compression": "gzip",
"secret": "<string>"
},
"source": {
"kind": "self-served"
},
"projectIds": [
"<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,
"filter": "<string>",
"filterV2": {
"version": "v1"
}
}
]
}Allows to retrieve the list of Drains of the authenticated team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.drains.getDrains({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();{
"drains": [
{
"id": "<string>",
"ownerId": "<string>",
"name": "<string>",
"createdAt": 123,
"updatedAt": 123,
"schemas": {
"log": {},
"trace": {},
"analytics": {},
"speed_insights": {}
},
"delivery": {
"type": "http",
"endpoint": "<string>",
"encoding": "json",
"headers": {},
"compression": "gzip",
"secret": "<string>"
},
"source": {
"kind": "self-served"
},
"projectIds": [
"<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,
"filter": "<string>",
"filterV2": {
"version": "v1"
}
}
]
}Default authentication mechanism
The Team identifier to perform the request on behalf of.
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
"my-team-url-slug"
Show child attributes
Show child attributes
http json, ndjson gzip, none enabled, disabled, errored disabled-by-owner, feature-not-available, account-plan-downgrade, disabled-by-admin