Upload Status
Check the status of asynchronous uploads initiated with async_upload=true.
Endpoint
GET /api/uploadposts/status?request_id=yourrequestid
Headers
| Name | Value | Description |
|---|---|---|
| Authorization | Apikey your-api-key-here | Your API key for authentication |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| request_id | String | Yes | The request identifier returned by the upload endpoints when async_upload=true. |
Behavior
- When you submit an upload request with
async_upload=true, the API returns immediately with arequest_id. - Use this
request_idwith this endpoint to retrieve aggregated progress and results. - The
statusfield may be one of:pending: The request has been accepted but no platform results recorded yet.in_progress: Some platform results recorded but not all (or total unknown).completed: All known work is finished (based on inferred total or recorded items).
Example Request
curl \
-H 'Authorization: Apikey your-api-key-here' \
"https://api.upload-post.com/api/uploadposts/status?request_id=<REQUEST_ID>"
Example Response
{
"request_id": "7b2c2f5e-1234-4a6f-9f1d-a1b2c3d4e5f6",
"status": "in_progress",
"completed": 1,
"total": 2,
"results": [
{
"platform": "x",
"success": true,
"message": "Queued",
"upload_timestamp": "2025-01-01T12:34:56Z"
}
],
"last_update": "2025-01-01T12:34:56Z"
}
Responses
- 200 OK (pending/in progress)
{"request_id":"...","status":"in_progress","completed":1,"total":3,"results":[...],"last_update":"..."}
- 200 OK (pending with no records yet)
{"request_id":"...","status":"pending","completed":0,"total":null,"results":[]}
- 400 Bad Request: missing
request_id
{"error":"request_id is required"}
-
401 Unauthorized:
{ "success": false, "message": "Invalid or expired token" } -
500 Internal Server Error:
{ "error": "Failed to get status", "details": "..." }