HttpTrafficRecord. This process is usually triggered by an internal event after a monitored request completes.bash
POST /http-traffic-record/:trafficSourceId
Authorization header of the request. The token must be obtained through the user authentication route.bash
Authorization: Bearer <your-token-here>
trafficSourceId | string | Yes | The Traffic Source ID. |domainUrl | string | Yes | The domain URL. Must be a valid URL. |
| pathnameUrl | string | Yes | The URL path. Must begin with /. |
| trafficSourceId | string | Yes | The Traffic Source ID. Must be a valid UUID. |
| status | number | Yes | The HTTP status code of the response. Must be an integer. |
| protocol | string | Yes | The protocol used. Allowed values: HTTP, HTTPS. |
| method | string | Yes | The HTTP method of the request. Allowed values: GET, POST, PUT, DELETE, PATCH. |
| trafficUserId | string | No | The associated traffic user ID. If provided, must be a valid UUID. |
| elapsedTime | number | Yes | The elapsed time for the transaction in milliseconds. Must be a non-negative number. |
| requestHeaders | object | Yes | An object containing the request headers. |
| requestBody | object | No | An object containing the request body. Can be null. |
| queryParams | object | Yes | An object containing the request query parameters. |
| responseHeaders | object | Yes | An object containing the response headers. |
| responseBody | object | No | An object containing the response body. Can be null. |json
{"domainUrl": "https://api.example.com","pathnameUrl": "/users","trafficSourceId": "a1b2c3d4-e5f6-7890-1234-567890abcdef","status": 201,"protocol": "HTTPS","method": "POST","trafficUserId": "f0e9d8c7-b6a5-4321-fedc-ba9876543210","elapsedTime": 150,"requestHeaders": {"Content-Type": "application/json","Authorization": "Bearer..."},"requestBody": {"name": "Jane Doe","email": "jane.doe@example.com"},"queryParams": {},"responseHeaders": {"Content-Type": "application/json"},"responseBody": {"id": 2,"name": "Jane Doe","email": "jane.doe@example.com","createdAt": "2024-06-12T16:00:00.000Z"}}
201 CreatedHttpTrafficRecord object that was created.json
{"id": "b2c3d4e5-f6a7-8901-2345-67890abcdef1","status": 201,"method": "POST","level": "INFO","elapsedTime": 150,"createdAt": "2024-06-12T16:00:00.000Z","domain": "api.example.com","pathname": "/users","request": {"headers": {"Content-Type": "application/json","Authorization": "Bearer..."},"body": {"name": "Jane Doe","e-mail": "jane.doe@example.com"},"queryParams": {}},"response": {"headers": {"Content-Type": "application/json"},"body": {"id": 2,"name": "Jane Doe","email": "jane.doe@example.com","createdAt": "2024-06-12T16:00:00.000Z"}}}
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
TrafficSource with the provided trafficSourceId was not found.500 Internal Server Error