Creates a Configurable Log Drain (deprecated)
POST
https://api.vercel.com/v1/log-drainsCreates a configurable log drain. This endpoint must be called with a team AccessToken (integration OAuth2 clients are not allowed)
https://api.vercel.com/v1/log-drains
const response = await fetch('https://api.vercel.com/v1/log-drains?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "deliveryFormat": "json", "url": "https://example.com", "headers": "value", "projectIds": [], "sources": [], "environments": [], "secret": "string", "samplingRate": "123", "name": "Example Name" }),});
const data = await response.json();console.log(data);Response
"value"AuthorizationbearerToken
Default authentication mechanism
application/json
The sampling rate for this log drain. It should be a percentage rate between 0 and 100. With max 2 decimal points