Authentication
Authenticate Trasys Public API requests using an X-API-Key header generated in the dashboard, plus the 401 and 403 errors returned for invalid API keys.
All requests to the Trasys Public API require an API key to be passed in the X-API-Key HTTP header.
Generating an API Key
- Log in to the Trasys Dashboard.
- Navigate to Settings > API Keys.
- Click Create API Key.
- Give your key a descriptive name and select the appropriate permissions (or use a read-only role if applicable).
- Copy the generated key. It will only be shown to you once.
Making Authenticated Requests
Include your API key in the X-API-Key header with every request.
Example using cURL:
curl -H "X-API-Key: sk_prod_your_api_key_here" \
"http://localhost:3000/v1/logs"Example using JavaScript/Fetch:
fetch('http://localhost:3000/v1/logs', {
method: 'GET',
headers: {
'X-API-Key': 'sk_prod_your_api_key_here'
}
})
.then(response => response.json())
.then(data => console.log(data));Error Responses
If you fail to provide an API key, or provide an invalid one, you will receive a standard HTTP status code indicating the error:
401 Unauthorized: API key is missing or invalid.403 Forbidden: API key is valid but does not have permission to access the requested resource.
Public API Overview
Read-only REST API for querying your Trasys project's traces, logs, incidents, alerts, and sessions programmatically using your existing SDK API key today.
Pagination & Filtering
Standard limit/page pagination, time_range and from/to filters, and sort_by/sort_order parameters shared across most Trasys Public API list endpoints.

