Retrieve a list of all Drains
https://api.vercel.com/v1/drainsconst response = await fetch('https://api.vercel.com/v1/drains?projectId=string&includeMetadata=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);{ "drains": [ { "id": "icfg_1234567890", "createdAt": "123", "updatedAt": "123", "projectIds": [], "name": "Example Name", "teamId": "example_id", "ownerId": "example_id", "status": "enabled", "firstErrorTimestamp": "123", "disabledAt": "123", "disabledBy": "string", "disabledReason": "disabled-by-owner", "schemas": { "log": "value", "trace": "value", "analytics": "value", "speed_insights": "value", "ai_gateway": "value" }, "delivery": { "type": "http", "endpoint": "string", "encoding": "json", "compression": "none", "headers": "value", "secret": "string" }, "sampling": [ { "type": "head_sampling", "rate": "123", "env": "production", "requestPath": "string" } ], "source": { "kind": "self-served" }, "filter": "string", "filterV2": { "version": "v1" } } ]}Default authentication mechanism