Skip to content
Docs

Get a project trace by request ID

GEThttps://api.vercel.com/v1/projects/traces
Returns the OTEL trace for a given Vercel CLI request.
https://api.vercel.com/v1/projects/traces
const response = await fetch('https://api.vercel.com/v1/projects/traces?projectId=string&requestId=string&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
{
"trace": {
"resources": [
{
"attributes": "value",
"name": "Example Name"
}
],
"rootSpanId": "example_id",
"spans": [
{
"attributes": "value",
"duration": [],
"endTime": [],
"events": [
{
"attributes": "value",
"name": "Example Name",
"timestamp": []
}
],
"kind": "123",
"library": {
"name": "Example Name",
"version": "string"
},
"links": [
"value"
],
"name": "Example Name",
"parentSpanId": "example_id",
"resource": "string",
"spanId": "example_id",
"startTime": [],
"status": {
"code": "123",
"message": "string"
},
"traceFlags": "123",
"traceState": "string"
}
],
"traceId": "example_id"
}
}
AuthorizationbearerToken

Default authentication mechanism

projectIdstringRequired
The project ID
requestIdstringRequired
The Vercel CLI request ID associated with the trace
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
traceobjectRequired
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