API Reference
Welcome to the Tamandua Sentinel EDR API Reference. This documentation provides comprehensive coverage of all REST API endpoints available for integrating with the Tamandua platform.
Base URL
All API requests should be made to:
https://api.tamandua.io/api/v1
For self-hosted deployments, replace with your server address:
https://your-server.example.com/api/v1
Authentication
The Tamandua API supports multiple authentication methods:
| Method | Use Case | Header Format |
|---|---|---|
| API Key | Server-to-server integrations | Authorization: Bearer tam_live_xxxxx |
| JWT Token | Agent authentication | Authorization: Bearer <jwt_token> |
| Session Cookie | Web dashboard (internal) | Automatic via browser |
tam_live_- Production API keystam_dev_- Development API keystam_test_- Test environment keys
See Authentication for detailed setup instructions.
Request Format
Headers
All requests must include:
Content-Type: application/json
Authorization: Bearer <your_api_key>
For session-authenticated requests from the web dashboard, include the CSRF token:
X-CSRF-Token: <csrf_token>
Request Body
Request bodies should be JSON-encoded:
{
"field": "value",
"nested": {
"key": "value"
}
}
Response Format
Success Response
All successful responses follow this structure:
{
"data": { ... },
"meta": {
"page": 1,
"per_page": 50,
"total": 1234,
"total_pages": 25
}
}
For single-resource responses:
{
"data": {
"id": "uuid",
"field": "value"
}
}
Error Response
Error responses include an error message and optional details:
{
"error": "Error message",
"details": {
"field": ["validation error"]
}
}
Rate Limits
API requests are rate-limited to protect system stability:
| Scope | Limit | Window |
|---|---|---|
| Per API Key | 1,000 requests | 1 minute |
| Per API Key | 10,000 requests | 1 hour |
| Per Organization | 5,000 requests | 1 minute |
| Burst | 100 requests | 1 second |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1620000000
When rate limited, the API returns:
HTTP/1.1 429 Too Many Requests
Retry-After: 60
{
"error": "Rate limit exceeded",
"retry_after": 60
}
Pagination
List endpoints support pagination with the following parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
per_page | integer | 50 | Items per page (max: 200) |
limit | integer | 100 | Alternative to per_page |
offset | integer | 0 | Number of items to skip |
Example request:
curl -X GET "https://api.tamandua.io/api/v1/alerts?page=2&per_page=25" \
-H "Authorization: Bearer tam_live_xxxxx"
Example response with pagination metadata:
{
"data": [...],
"meta": {
"page": 2,
"per_page": 25,
"total": 150,
"total_pages": 6
}
}
Sorting
List endpoints support sorting:
| Parameter | Type | Description |
|---|---|---|
sort_by | string | Field to sort by |
sort_order | string | asc or desc (default: desc) |
Example:
curl -X GET "https://api.tamandua.io/api/v1/alerts?sort_by=severity&sort_order=desc" \
-H "Authorization: Bearer tam_live_xxxxx"
Filtering
Most list endpoints support filtering via query parameters:
# Filter alerts by severity and status
curl -X GET "https://api.tamandua.io/api/v1/alerts?severity=critical&status=open" \
-H "Authorization: Bearer tam_live_xxxxx"
For complex filtering, use the search endpoints with POST:
curl -X POST "https://api.tamandua.io/api/v1/alerts/search" \
-H "Authorization: Bearer tam_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"severity": ["critical", "high"],
"status": "open",
"date_from": "2024-01-01T00:00:00Z",
"mitre_techniques": ["T1059"]
}'
Error Codes
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content (successful deletion) |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing authentication |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource does not exist |
| 409 | Conflict - Resource already exists |
| 422 | Unprocessable Entity - Validation failed |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
| 502 | Bad Gateway - Upstream service error |
| 503 | Service Unavailable |
| 504 | Gateway Timeout |
Error Types
Common error types returned in the error field:
| Error | Description |
|---|---|
invalid_token | Authentication token is invalid |
token_expired | Authentication token has expired |
insufficient_permissions | User lacks required permissions |
validation_failed | Request validation failed |
not_found | Requested resource not found |
rate_limit_exceeded | Too many requests |
API Versioning
The current API version is v1. The version is included in the URL path:
/api/v1/agents
/api/v1/alerts
We maintain backward compatibility within major versions. Breaking changes will be introduced in new major versions (e.g., /api/v2/).
Timestamps
All timestamps are returned in ISO 8601 format with UTC timezone:
2024-01-15T14:30:00Z
When sending timestamps, use the same format or Unix timestamps:
{
"date_from": "2024-01-01T00:00:00Z",
"date_to": "2024-01-31T23:59:59Z"
}
Available Endpoints
Core Resources
| Resource | Description |
|---|---|
| Authentication | API keys, JWT tokens, OAuth |
| Agents | Endpoint agent management |
| Alerts | Security alert management |
| Events | Telemetry event queries |
| Response | Incident response actions |
| Webhooks | Webhook configuration |
Additional APIs
- Rules API - YARA and Sigma rule management
- IOC API - Indicator of Compromise management
- Threat Intelligence - Feed integration and enrichment
- MITRE ATT&CK - Coverage and heatmap data
- Investigations - Case management
- Playbooks - Automated response workflows
SDK and Client Libraries
Official SDKs are available for:
- Python:
pip install tamandua-sdk - JavaScript/TypeScript:
npm install @tamandua/sdk - Go:
go get github.com/tamandua-edr/go-sdk
Support
- Documentation: https://docs.tamandua.io
- API Status: https://status.tamandua.io
- Support Email: support@tamandua.io
- GitHub Issues: https://github.com/treant-lab/tamandua-community/issues