# IRPCScanningAndOCR.OCROperation_Status

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Scanning and OCR](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_Status/

Badges: `Vault API / standard` `write` `session` `idempotent` `returns metadata structure version`

Gets the progress of an OCR job, and optionally cancels it.

- **Service:** [Scanning and OCR](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/index.md) `MFiles.IRPCScanningAndOCR`
- **gRPC method:** `/MFiles.IRPCScanningAndOCR/OCROperation_Status`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/ocroperation_-status`
- **Request:** [`OCROperation_StatusRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_Status/index.md#request)
- **Response:** [`OCROperation_StatusResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_Status/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Poll until `done` is true, then end the job.
- If the job failed, the call fails with the job's error and the job is released.
- An unknown or already ended job fails with "The parameter is incorrect.".

<a id="request"></a>

## Request: OCROperation_StatusRequest

> 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 |
|---|---|---|
| `background_op_id` | `uint32` | The ID of the job. |
| `cancel` | `bool` | True to cancel the job. |

<a id="response"></a>

## Response: OCROperation_StatusResponse

> 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 |
|---|---|---|
| `items` | `uint32` | The number of pages to process; 0 until known. |
| `items_completed` | `uint32` | The number of pages processed. |
| `done` | `bool` | True when the job has stopped. |

<a id="related"></a>

## Related methods

- [OCROperation_BeginAfterUpload](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_BeginAfterUpload/index.md): Starts an OCR job on a file that the caller uploaded with UploadTempFile.
- [OCROperation_Begin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_Begin/index.md): Starts an OCR job on a file of a document that the caller has checked out.
- [OCROperation_End](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_End/index.md): Ends an OCR job started with OCROperation_Begin and replaces the document's file with the resulting PDF.
- [OCROperation_EndWithDownload](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScanningAndOCR/OCROperation_EndWithDownload/index.md): Ends an OCR job and returns its results: the recognized texts and a download of the PDF.
