Data Platform API User Guide
All requests must include your API key in the X-API-Key header.
X-API-Key: sk_live_your_api_key_here Content-Type: application/json
Important: Your API key must be kept secret. Never share it in public code or Git repositories.
/api/v1/infoRetrieves information about client permissions and limits
{
"success": true,
"client": {
"companyName": "Entreprise ABC",
"email": "contact@entreprise.com",
"rateLimit": {
"requests_per_minute": 60,
"requests_per_day": 5000
}
},
"permissions": [
{
"sheet": "daily_summary",
"type": "sheet",
"actions": ["READ", "EXPORT"],
"columns": ["*"]
}
]
}curl -X GET "https://your-domain.com/api/v1/info" \ -H "X-API-Key: sk_live_your_api_key_here"
/api/v1/sheetsReturns the list of sheets accessible according to your permissions
{
"success": true,
"sheets": [
{
"name": "daily_summary",
"displayName": "Daily Summary",
"rowCount": 8400,
"columns": ["Cape C2 Index", "API2 daily index", ...],
"lastUpdated": "2024-01-15T10:30:00Z",
"permissions": {
"actions": ["READ", "EXPORT"],
"columns": ["*"]
}
}
],
"total": 1
}curl -X GET "https://your-domain.com/api/v1/sheets" \ -H "X-API-Key: sk_live_your_api_key_here"
/api/v1/sheets/{sheetName}/dataRetrieves sheet data with pagination
| Name | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 100 | Items per page (max: 1000) |
sort | string | - | Sort order (e.g., date:desc) |
columns | string | - | Columns to return (comma-separated) |
start_date | string | - | Start date filter (YYYY-MM-DD) |
end_date | string | - | End date filter (YYYY-MM-DD) |
{
"success": true,
"sheet": "daily_summary",
"data": [
{
"date": "2024-01-15",
"Cape C2 Index": 15234.5,
"API2 daily index": 125.30,
...
}
],
"pagination": {
"page": 1,
"limit": 100,
"total": 8400,
"totalPages": 84,
"hasNext": true,
"hasPrevious": false
}
}curl -X GET "https://your-domain.com/api/v1/sheets/{sheetName}/data" \
-H "X-API-Key: sk_live_your_api_key_here"/api/v1/sheets/{sheetName}/export/csvExports data in CSV format (max 10000 rows)
Downloadable CSV file
curl -X GET "https://your-domain.com/api/v1/sheets/{sheetName}/export/csv" \
-H "X-API-Key: sk_live_your_api_key_here"/api/v1/sheets/{sheetName}/export/jsonExports data in JSON format (max 10000 rows)
{
"success": true,
"sheet": "daily_summary",
"exportDate": "2024-01-15T10:30:00Z",
"rowCount": 8400,
"data": [...]
}curl -X GET "https://your-domain.com/api/v1/sheets/{sheetName}/export/json" \
-H "X-API-Key: sk_live_your_api_key_here"const apiKey = 'sk_live_your_api_key_here';
async function fetchSheets() {
const response = await fetch(
'https://your-domain.com/api/v1/sheets',
{
headers: {
'X-API-Key': apiKey
}
}
);
const data = await response.json();
console.log(data);
}
fetchSheets();import requests
api_key = 'sk_live_your_api_key_here'
headers = {
'X-API-Key': api_key
}
# Fetch the list of sheets
response = requests.get(
'https://your-domain.com/api/v1/sheets',
headers=headers
)
data = response.json()
print(data)| Code | Meaning |
|---|---|
| 200 | Success - Request processed successfully |
| 401 | Unauthorized - Missing or invalid API Key |
| 403 | Forbidden - Insufficient permissions for this resource |
| 404 | Not Found - The requested resource does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - An internal error occurred |