API - Check a Data Ingestion job (ingest_status)

Data Ingestion

Tells you where a Data Ingestion job stands: waiting, running, done or failed, and how many of its documents were written.

Endpointhttps://api.opensolr.com/solr_manager/api/ingest_status
MethodGET or POST
Authemail and api_key of your account, as GET or POST parameters: Authentication. Never rate limited.

01 · Parameters

job_idRequired

The job_id that ingest answered.

02 · Example

curl -s "https://api.opensolr.com/solr_manager/api/ingest_status?email=YOUR_EMAIL&api_key=YOUR_API_KEY&job_id=9f2c41d0b7e84a1c8e3f5a6b7c8d9e0f"

03 · Answer

{
    "status": true,
    "job": {
        "id": "9f2c41d0b7e84a1c8e3f5a6b7c8d9e0f",
        "core_name": "my_index",
        "state": 1,
        "state_label": "completed",
        "total_docs": 2,
        "processed_docs": 2,
        "success_docs": 2,
        "failed_docs": 0,
        "result": {},
        "error": null,
        "created_at": "...",
        "started_at": "...",
        "completed_at": "..."
    }
}
0

pending: waiting its turn.

-1

processing: being written.

1

completed: done. failed_docs above 0 means some documents failed.

2

paused

3

failed: error and result say why.

4

stopped

04 · Errors

ERROR_INVALID_PARAMETERSHTTP 200

No job_id.

ERROR_JOB_NOT_FOUNDHTTP 200

No such job of yours. Jobs that are not running are removed 30 days after they were queued.

ERROR_QUEUE_UNAVAILABLE_TRY_AGAINHTTP 200

The queue did not answer. Ask again.

WRONG_API_HOSTHTTP 404

Called on opensolr.com. The answer carries the right URL.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

05 · Related

Every job of an index: ingest_queue_list_jobs. One job with its documents: ingest_queue_job_detail.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.