Skip to content
Task

Check Upload Status

Monitor the status of a task upload operation

The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
GEThttps://api.lobstr.io/v1/tasks/upload/{upload_task_id}

This endpoint checks the status of a task upload operation using the upload task ID returned from the Upload Tasks endpoint.

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Path Parameters

upload_task_idstringpathrequired

The upload task ID returned from Upload Tasks endpoint. Example: 427a7bfc54cf4ce483d83ba23425164b

Response Field Explanations

idstring

Upload task identifier. Example: "427a7bfc54cf4ce483d83ba23425164b"

objectstring

Always "task_upload". Example: "task_upload"

statestring

Current upload state (PENDING, PROGRESS, SUCCESS, FAILURE). Example: "SUCCESS"

meta.duplicatesinteger

Number of duplicate tasks skipped. Example: 0

meta.insertedinteger

Number of tasks successfully inserted. Example: 8

meta.invalidinteger

Number of invalid rows in the file. Example: 0

meta.validinteger

Number of valid rows processed. Example: 8

State Values

State Description
PENDING Upload task is queued and waiting to start
PROGRESS File is being processed
SUCCESS Upload completed successfully
FAILURE Upload failed due to an error

Poll this endpoint periodically until state is SUCCESS or FAILURE before running your squid.

Check meta.invalid to identify how many rows had issues. Review your CSV format if this number is high.

Don't start a squid run until the upload state is SUCCESS, or you may miss tasks.

Code Examples

curl -X GET "https://api.lobstr.io/v1/tasks/upload/427a7bfc54cf4ce483d83ba23425164b" \
  -H "Authorization: Token YOUR_API_KEY"

Response

200
{
  "id": "427a7bfc54cf4ce483d83ba23425164b",
  "object": "task_upload",
  "state": "SUCCESS",
  "meta": {
    "duplicates": 0,
    "inserted": 8,
    "invalid": 0,
    "valid": 8
  }
}
202
{
  "id": "427a7bfc54cf4ce483d83ba23425164b",
  "object": "task_upload",
  "state": "PROGRESS",
  "meta": null
}
404
{
  "error": {
    "message": "Upload task not found",
    "type": "not_found_error",
    "param": "upload_task_id"
  }
}