Complete reference for the DataSentry API and integration options
The DataSentry API provides programmatic access to all DataSentry features, allowing you to integrate cost optimization, monitoring, and warehouse management directly into your workflows.
All API requests should be made to https://api.datasentry.siteand must include a valid API key in the Authorization header.
To authenticate with the DataSentry API, include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
You can generate API keys from the Settings section of your DataSentry dashboard.
The DataSentry API has the following rate limits:
Retrieve a list of connected warehouses.
{
"data": [
{
"id": "warehouse_123",
"name": "Production Warehouse",
"type": "snowflake",
"status": "active",
"connectionStatus": "connected",
"cost": 1234.56,
"currency": "USD",
"lastUpdated": "2023-12-01T10:00:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 1
}
}Retrieve details for a specific warehouse.
{
"data": {
"id": "warehouse_123",
"name": "Production Warehouse",
"type": "snowflake",
"status": "active",
"connectionStatus": "connected",
"config": {
"account": "xy12345.us-east-1",
"warehouse": "COMPUTE_WH",
"region": "us-east-1"
},
"cost": 1234.56,
"currency": "USD",
"usage": {
"computeCredits": 45.67,
"cloudServicesCredits": 12.34,
"bytesBilled": 1073741824
},
"lastUpdated": "2023-12-01T10:00:00Z"
}
}Suspend a warehouse to save costs.
{
"reason": "manual_suspension",
"scheduledResume": "2023-12-01T14:00:00Z"
}{
"success": true,
"message": "Warehouse suspended successfully",
"timestamp": "2023-12-01T10:00:00Z"
}Retrieve a list of alerts for your warehouses.
{
"data": [
{
"id": "alert_456",
"type": "cost",
"severity": "high",
"title": "Cost anomaly detected",
"description": "Warehouse costs increased by 150% compared to previous week",
"status": "open",
"warehouseId": "warehouse_123",
"timestamp": "2023-12-01T09:30:00Z",
"costImpact": 500.00
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 1
}
}Retrieve cost data for your warehouses.
{
"data": [
{
"date": "2023-12-01",
"totalCost": 123.45,
"currency": "USD",
"breakdown": {
"compute": 89.01,
"storage": 23.45,
"network": 10.99
},
"warehouses": [
{
"id": "warehouse_123",
"name": "Production Warehouse",
"cost": 123.45
}
]
}
],
"summary": {
"total": 123.45,
"currency": "USD",
"period": "2023-12-01 to 2023-12-01"
}
}The DataSentry API uses standard HTTP status codes to indicate the success or failure of requests.
| Code | Meaning |
|---|---|
| 200 | OK - Request successful |
| 201 | Created - Request successful, resource created |
| 400 | Bad Request - Invalid request parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Server error |
Official JavaScript/Node.js SDK for DataSentry API integration.
npm install @datasentry/datasentry-sdk
Official Python SDK for DataSentry API integration.
pip install datasentry-sdk
Official Go SDK for DataSentry API integration.
go get github.com/datasentry/datasentry-go
If you have questions about the API or need assistance with integration, please visit oursupport page or contact us atsupp.datasentry.site.