Span
Create Span
Endpoint to create a new Span
post/span
Request
- Base URLhttps://oneuptime.com/api
- AuthAPI key in header APIKey
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"primaryEntityId": "123e4567-e89b-12d3-a456-426614174000",
"startTime": "2026-01-01T00:00:00.000Z",
"endTime": "2026-01-01T00:00:00.000Z",
"startTimeUnixNano": "1767225600000000000",
"durationUnixNano": 42,
"endTimeUnixNano": "1767225600000000000",
"traceId": "example text",
"spanId": "example text"
}
}Response
Created successfully
Example response
{
"data": {
"projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"primaryEntityId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"primaryEntityType": "Example text value",
"startTime": "example_value",
"endTime": "example_value",
"startTimeUnixNano": "example_value",
"durationUnixNano": 1000000,
"endTimeUnixNano": "example_value",
"traceId": "Example text value",
"spanId": "Example text value",
"sessionId": "Example text value",
"parentSpanId": "Example text value",
"traceState": "Example text value",
"attributes": "example_value",
"attributeKeys": [
"item1",
"item2",
"item3"
],
"entityKeys": [
"item1",
"item2",
"item3"
],
"serviceEntityKey": "Example text value",
"hostEntityKey": "Example text value",
"k8sPodEntityKey": "Example text value",
"k8sNodeEntityKey": "Example text value",
"k8sClusterEntityKey": "Example text value",
"containerEntityKey": "Example text value",
"events": [
{
"key": "value"
},
{
"key2": "value2"
}
],
"links": {
"key": "value",
"nested": {
"data": 123
}
},
"statusCode": 42,
"statusMessage": "Example text value",
"name": "Example text value",
"kind": "Example text value",
"hasException": true,
"isRootSpan": true,
"isEntrySpan": true,
"isLlmSpan": true,
"llmSystem": "Example text value",
"llmOperation": "Example text value",
"llmRequestModel": "Example text value",
"llmResponseModel": "Example text value",
"llmAgentName": "Example text value",
"llmToolName": "Example text value",
"llmInputTokens": 42,
"llmOutputTokens": 42,
"llmTotalTokens": 42,
"llmCost": 123.45,
"llmConversationId": "Example text value",
"llmUserId": "Example text value",
"llmUserEmail": "Example text value",
"llmTeam": "Example text value",
"llmCallKind": "Example text value",
"llmIssues": [
"item1",
"item2",
"item3"
],
"llmUserMessagePreview": "Example text value"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.