IRPCScanningAndOCR.GetOCRUploadedFileStatus
Vault API / standard write session
Gets the state of an OCR job started with OCRUploadedFile and, when it has completed, its
result as a file_ref. Optionally requests the cancellation of the job.
| Service | Scanning and OCR MFiles.IRPCScanningAndOCR |
|---|---|
| gRPC method | /MFiles.IRPCScanningAndOCR/GetOCRUploadedFileStatus |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-ocruploaded-file-status |
| Request | GetOCRUploadedFileStatusRequest |
| Response | GetOCRUploadedFileStatusResponse |
| Book and level | Vault API, standard |
| Kind | write |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | no |
| Returns metadata structure version | no |
| Streaming | none (unary) |
Remarks
- Not available on current servers: the call fails with "Not implemented.".
- The job belongs to the login session that started it; other sessions get "The OCR job was not found in this session.". Once a completed, failed or canceled state has been returned, the job is released.
Request: GetOCRUploadedFileStatusRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
job_id | string | The ID of the job from OCRUploadedFile. |
cancel | bool | True to request the cancellation of the job. The returned state can still be queued or running until the job has stopped. |
Response: GetOCRUploadedFileStatusResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
state | OCRUploadedFileState | The state of the job.Values: OCRUPLOADED_FILE_STATE_UNSPECIFIED (0), OCRUPLOADED_FILE_STATE_QUEUED (1), OCRUPLOADED_FILE_STATE_RUNNING (2), OCRUPLOADED_FILE_STATE_COMPLETED (3), OCRUPLOADED_FILE_STATE_FAILED (4), OCRUPLOADED_FILE_STATE_CANCELED (5). |
pages_total | uint32 | The number of pages to process. Zero if not known yet. |
pages_completed | uint32 | The number of pages processed. |
result_file_ref | string | If the state is completed, the file_ref of the searchable PDF, as a stateless upload that can be attached like an upload ended with FileUploadEnd. Otherwise empty. |
result_file_size | int64 | If the state is completed, the size of the searchable PDF in bytes. Otherwise zero. |
error_code | int32 | If the state is failed, the M-Files error code of the job; otherwise 0. |
error_message | string | If the state is failed, the error message of the job. Otherwise empty. |