Configuring OCR through the REST API

Configuring OCR through the REST API

Overview

Optical character recognition (OCR) allows DryvIQ to extract text from images, including images in PDF files and other document types. This global setting turns OCR on and off for your DryvIQ Platform. To evaluate files against entity types and policies, you must enable OCR. For content scans, OCR will be enabled or disabled for new scans automatically in the Settings step of the content scan setup based on this setting, but you can override the default for individual scans as desired. Enabling OCR is only valid when using templates that scan a file’s contents (File Categories, Sensitive Data Detection, and Miscellaneous templates) and may increase the scan time.

Viewing the Current OCR Setting

Use the following request to view the current OCR setting.

GET {{url}}v1/entity_types/test/ocr_config

Example Response

The response identifies the “mode” as off or on. The following example shows a response for an OCR setting that is on.

{ "status": 200, "item": { "mode": "off" } }

Configuring the OCR Setting

You can set the OCR value in the body of a PATCH request or by adding the setting to the request itself. The following examples show how to turn on the OCR setting.

Setting in the Request Body

PATCH {{url}}v1/entity_types/test/ocr_config

Body

{ "mode": "on" }

Setting in the Request

PATCH {{url}}v1/entity_types/test/ocr_config?mode=on
DryvIQ Platform Version: 5.9.17
Release Date: April 3, 2026