HTTP Status Codes
Edgecom APIs use standard HTTP status codes and a consistent error response format across all products.
HTTP Status Codes
| Code | Type | Description |
|---|---|---|
200 | OK | Request succeeded |
400 | Bad Request | Invalid parameters — e.g. end before start, or missing required field |
401 | Unauthorized | Missing or invalid API key / JWT token |
404 | Not Found | The requested resource does not exist |
429 | Too Many Requests | Rate limit exceeded — slow down and retry |
500 | Internal Server Error | Unexpected server error. Contact support if this persists |
Error Response Format
All errors across pTrack, DRMS, and dataTrack return the same JSON structure:
{
"error": {
"code": "bad_request",
"message": "end must be after start",
"details": {}
}
}| Field | Description |
|---|---|
code | Machine-readable identifier — use this for programmatic error handling |
message | Human-readable description — useful for logging and debugging |
details | Optional object with additional context, e.g. field-level validation errors |
Common 400 Errors
Most 400 Bad Request errors from pTrack involve datetime parameters:
# ❌ end is before start
?start=2026-07-02T00:00:00-05:00&end=2026-07-01T00:00:00-05:00
# ❌ Missing required parameter (end is required)
?start=2026-07-01T00:00:00-05:00
# ❌ Invalid resolution value
?resolution=15m # valid values: hourly, five_minute
# ✅ Correct
?start=2026-07-01T00:00:00-05:00&end=2026-07-02T00:00:00-05:00&resolution=hourlyRate Limiting
If you exceed the allowed request rate, the API returns 429 Too Many Requests. Implement exponential backoff when retrying:
import time, requests
def fetch_with_retry(url, headers, max_retries=4):
for attempt in range(max_retries):
r = requests.get(url, headers=headers)
if r.status_code == 429:
time.sleep(2 ** attempt) # 1s, 2s, 4s, 8s
continue
return r
raise Exception("Rate limit exceeded after retries")
Need a higher rate limit? Contact us at [email protected]
Updated 29 days ago