Data API
Ideal for applications that can emit metrics and logs directly or for custom monitoring
Last updated
{
"organization_id": "cust_12345",
"key": "api_requests",
"timestamp": "2024-08-15T10:30:45Z",
"values": {
"status_code": 200,
"response_time": 0.145
},
"idempotency_key": "req_abc123"
}[
{
"organization_id": "cust_12345",
"key": "api_requests",
"timestamp": "2024-08-15T10:30:45Z",
"values": {
"status_code": 200,
"response_time": 0.145
},
"idempotency_key": "req_abc123"
},
{
"organization_id": "cust_12345",
"key": "api_requests",
"timestamp": "2024-08-15T10:31:45Z",
"values": {
"status_code": 200,
"response_time": 0.45
},
"idempotency_key": "req_def456"
}
]curl -X POST https://your-slaos-domain.com/v1/ingest/61dcde60-f40a-4a55-a303-911f2c2c4def/n3K9y3NiaOXVnw6deLQ5AQ \
-H 'Content-Type: application/json' \
-d '{
"organization_id": "cust_12345",
"key": "api_requests",
"timestamp": "'"$(date -u +"%Y-%m-%dT%H:%M:%SZ")"'",
"values": {
"status_code": 200,
"response_time": 0.145
},
"local_identifier": "req_abc123"
}'import httpx
import json
from datetime import datetime
url = "https://your-slaos-domain.com/v1/ingest/your-ingestion-id/your-ingestion-key"
payload = {
"organization_id": "cust_12345",
"key": "api_requests",
"timestamp": datetime.utcnow().isoformat() + "Z",
"values": {
"status_code": 200,
"response_time": 0.145
},
"local_identifier": "req_abc123"
}
headers = {"Content-Type": "application/json"}
with httpx.Client() as client:
response = client.post(url, json=payload, headers=headers)
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")import fetch from 'node-fetch';
const url = 'https://your-slaos-domain.com/v1/ingest/your-ingestion-id/your-ingestion-key';
const payload = {
organization_id: 'cust_12345',
key: 'api_requests',
timestamp: new Date().toISOString(),
values: {
status_code: 200,
response_time: 0.145
},
local_identifier: 'req_abc123'
};
const headers = { 'Content-Type': 'application/json' };
fetch(url, {
method: 'POST',
body: JSON.stringify(payload),
headers: headers
})
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));