Ingestion API
For programmatic data ingestion, use the REST API to push metrics and data directly into the platform.
Endpoint
POST /v1/ingest/metrics
Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Request Body
{
"table": "my_metrics",
"rows": [
{
"date": "2025-01-15",
"metric_name": "revenue",
"value": 15234.50,
"region": "south"
}
]
}
Example with cURL
curl -X POST https://lake.iaradata.com/api/v1/ingest/metrics \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-id-12345" \
-d '{
"table": "my_metrics",
"rows": [
{"date": "2025-01-15", "metric_name": "revenue", "value": 15234.50}
]
}'
Response
{
"status": "ok",
"table": "my_metrics",
"rowsIngested": 1
}
PII & Privacy
The ingestion API automatically detects and masks PII data:
| PII Type | Detection | Masking |
|---|---|---|
| Email addresses | Pattern matching | j***@example.com |
| Credit card numbers | Luhn algorithm | ****-****-****-1234 |
| CPF/CNPJ | Brazilian document patterns | ***.***.***-12 |
| Phone numbers | International format detection | (**) *****-1234 |
warning
Idempotency: Always include an Idempotency-Key header on POST requests. If the same key is sent twice, the second request returns the cached result instead of duplicating data.
Rate Limits
API rate limits depend on your plan:
| Plan | Requests/minute |
|---|---|
| Free | 30 |
| Starter | 60 |
| Growth | 120 |
| Business | 300 |
Rate limit headers are included in every response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1706812800