Response Format
All EDS API responses follow a consistent structure to make error handling and data parsing predictable for client developers.
Success Response
When a request is successful, the response will have success: true and the requested data in the data field.
JSON
{
"success": true,
"data": {
"id": "clx123abc",
"name": "project-files"
},
"error": null
}Error Response
When a request fails, the response will have success: false, the data field will be null, and the error field will contain a descriptive message.
JSON
{
"success": false,
"data": null,
"error": "Missing or invalid 'filename'"
}Schema Definition
TypeScript
interface APIResponse<T> {
success: boolean;
data: T | null;
error: string | null;
}HTTP Status Codes
EDS uses standard HTTP status codes in addition to the success boolean in the body.
| Status Code | Description |
|---|---|
200 OK | Request succeeded. |
201 Created | Resource created successfully. |
400 Bad Request | Invalid parameters or missing fields. |
401 Unauthorized | Invalid or missing API key. |
404 Not Found | The requested resource does not exist. |
500 Internal Server Error | Unexpected server-side error. |
507 Insufficient Storage | No nodes have enough available space for the upload. |