Retrieve OCR text

Required capabilities: filesAcl:READ

Provides ocr annotations for a given file. Currently only files that have been parsed with diagram/detect will yield non-empty results.

In beta. Available only when the cdf-version header with the beta suffix value is provided.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
One of:

File id and page range to get ocr result for.

startPage
integer >= 1
Default: 1

The first page in the range to get ocr results from.

limit
integer [ 1 .. 100 ]
Default: 100

The maximum number of pages to get results for. With a limit of 10 and start page of 1, results for pages 1-10 are returned if they are available.

fileId
required
integer <int64> (DiagramFileId)

The ID of a file in CDF. The file must have mime_type application/pdf, image/jpeg, image/png or image/tiff.

Responses
200

Success

400

The response for a failed request.

post/context/diagram/ocr
Request samples
application/json
{
  • "startPage": 1,
  • "limit": 10,
  • "fileInstanceId": {
    • "space": "space",
    • "externalId": "externalId"
    }
}
Response samples
application/json
[
  • {
    • "height": 0,
    • "width": 0,
    • "annotations": [
      ],
    • "page": 0,
    • "updatedTimestamp": 0
    }
]