API - Check text extraction jobs (file_extract_status)

Data Ingestion

Tells you where your text extraction jobs stand, up to 20 in one call, and gives the text of the ones that are done.

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

01 · Parameters

index_nameRequired

The index the files are for.

job_idsRequired

Up to 20 job_ids from file_extract: an array, a JSON array or a comma separated list.

pagesOptional

1: a PDF comes back as its pages.

textOptional

0: the state alone.

02 · Example

curl -s "https://api.opensolr.com/solr_manager/api/file_extract_status?email=YOUR_EMAIL&api_key=YOUR_API_KEY&index_name=my_index&job_ids=2fd4e1c67a2d28fced849ee1bb76e7391b93eb12-od&pages=1"

03 · Answer

{
    "status": true,
    "results": {
        "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12-od": {
            "state": "done",
            "pages": [
                {
                    "page": 1,
                    "text": "...",
                    "is_ocr": false,
                    "lang": "en"
                }
            ],
            "mime": "application/pdf"
        }
    }
}

state is queued, processing, done, failed (with error) or not_found.

04 · Errors

ERROR_NO_JOB_IDSHTTP 200

No valid job_id.

ERROR_MAX_20_JOB_IDSHTTP 200

More than 20.

ERROR_EXTRACTION_QUEUE_UNAVAILABLEHTTP 200

The queue did not answer. Ask again.

ERROR_NOT_CORE_OWNERHTTP 200

The index is not yours.

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.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

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