Skip to content
Docs

Find a Drain by id

GEThttps://api.vercel.com/v1/drains/{id}
Get the information for a specific Drain by passing the drain id in the URL.
https://api.vercel.com/v1/drains/{id}
const response = await fetch('https://api.vercel.com/v1/drains/id?includeDeliveryStats=true&teamId=string&slug=string', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
Response
{
"createdAt": "123",
"delivery": {
"compression": "gzip",
"encoding": "json",
"endpoint": "string",
"headers": "value",
"secret": "string",
"type": "http"
},
"disabledAt": "123",
"disabledBy": "string",
"disabledReason": "account-plan-downgrade",
"firstErrorTimestamp": "123",
"id": "icfg_1234567890",
"name": "Example Name",
"ownerId": "example_id",
"projectIds": [],
"sampling": [
{
"env": "preview",
"rate": "123",
"requestPath": "string",
"type": "head_sampling"
}
],
"schemas": {
"ai_gateway": "value",
"analytics": "value",
"audit_log": "value",
"connect": "value",
"log": "value",
"speed_insights": "value",
"trace": "value"
},
"source": {
"defaultFor": "eve-tracing",
"kind": "self-served"
},
"status": "disabled",
"teamId": "example_id",
"updatedAt": "123",
"deliveryStats": {
"attempts": "123",
"failures": "123",
"state": "failing",
"totalFailedDeliveries": "123",
"totalRetriedDeliveries": "123",
"totalSuccessfulDeliveries": "123",
"window": "24h"
},
"filterV2": {
"filter": {
"deployment": {
"environments": []
},
"log": {
"legacy_excludeCachedStaticAssetLogs": "false",
"sources": []
},
"project": {
"ids": []
},
"type": "basic"
},
"version": "v2"
}
}
AuthorizationbearerToken

Default authentication mechanism

idstringRequired
includeDeliveryStatsbooleanOptional
Include deliveryStats with the delivery health of the drain over the last 24 hours. Ignored for teams without drain delivery metrics.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
createdAtnumberRequired
deliveryobjectRequired5 variants
disabledAtnumberOptional
disabledBystringOptional
disabledReasonstringOptional
firstErrorTimestampnumberOptional
idstringRequired
namestringRequired
ownerIdstringRequired
projectIdsarrayOptional
samplingarrayOptional
schemasobjectRequired
sourceobjectRequired2 variants
statusstringOptional
teamIdstringOptional
updatedAtnumberRequired
deliveryStatsobjectOptional
Delivery health of a drain over the last 24 hours, counted on finished deliveries (a delivery saved by an automatic retry counts once, as delivered): failing when more than 5 deliveries failed and they are at least 1% of all finished deliveries, healthy otherwise, and unknown when no delivery finished in the window.
filterV2objectOptional
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
503The delivery stats could not be loaded. Retry, or omit `includeDeliveryStats`.