You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/document-intelligence/how-to-guides/includes/v4-0/rest-api.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ manager: nitinme
6
6
ms.service: azure-ai-document-intelligence
7
7
ms.custom: linux-related-content
8
8
ms.topic: include
9
-
ms.date: 11/19/2024
9
+
ms.date: 02/07/2025
10
10
ms.author: lajanuar
11
11
---
12
12
<!-- markdownlint-disable MD033 -->
@@ -23,7 +23,7 @@ ms.author: lajanuar
23
23
- An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services/).
24
24
- The cURL command line tool installed. Windows 10 and Windows 11 ship with a copy of cURL. At a command prompt, type the following cURL command. If the help options display, cURL is installed in your Windows environment.
25
25
26
-
```console
26
+
```bash
27
27
curl -help
28
28
```
29
29
@@ -60,18 +60,18 @@ Use the following table as a reference. Replace *\<modelId>* and *\<document-url
60
60
61
61
## POST request
62
62
63
-
Open a console window and run the following cURL command. The commands include the endpoint and key environment variables previously created in the set environment variables section. Replace those variables if your variable names differ. Remember to replace the *\<modelId>* and *\<document-url>* parameters.
63
+
Open a bash window and run the following cURL command. The commands include the endpoint and key environment variables previously created in the set environment variables section. Replace those variables if your variable names differ. Remember to replace the *\<modelId>* and *\<document-url>* parameters.
To enable add-on capabilities, use the `features` query parameter in the POST request. There are four add-on capabilities available with the `2023-07-31` (GA) and later releases: *ocr.highResolution*, *ocr.formula*, *ocr.font*, and *queryFields.premium*. To learn more about each of the capabilities, see [Custom models](../../../concept/accuracy-confidence.md).
70
70
71
71
You can only call the *highResolution*, *formula*, and *font* capabilities for the Read and Layout model, and the *queryFields* capability for the General Documents model. The following example shows how to call the *highResolution*, *formula*, and *font* capabilities for the Layout model.
@@ -82,7 +82,7 @@ You receive a `202 (Success)` response that includes an `Operation-location` hea
82
82
83
83
### Get analyze result (GET Request)
84
84
85
-
After you call the [`Analyze document`](/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-2024-02-29-preview&preserve-view=true&tabs=HTTP) API, call the [`Get analyze` result}(/rest/api/aiservices/document-models/get-analyze-result?view=rest-aiservices-2024-02-29-preview&preserve-view=true&tabs=HTTP) API to get the status of the operation and the extracted data.
85
+
After you call the [`Analyze document`](/rest/api/aiservices/document-models/analyze-batch-documents?view=rest-aiservices-v4.0%20(2024-11-30)&preserve-view=true&tabs=HTTP) API, call the [`Get analyze` result](/rest/api/aiservices/document-models/get-analyze-result?view=rest-aiservices-v4.0%20(2024-11-30)&preserve-view=true&tabs=HTTP) API to get the status of the operation and the extracted data.
86
86
87
87
<!-- markdownlint-disable MD024 -->
88
88
@@ -92,16 +92,16 @@ The cURL command line tool doesn't format API responses that contain JSON conten
92
92
93
93
Use the NodeJS *json tool* as a JSON formatter for cURL. If you don't have [Node.js](https://nodejs.org/) installed, download and install the latest version.
94
94
95
-
1. Open a console window and install the json tool by using the following command:
95
+
1. Open a bash window and install the json tool by using the following command:
96
96
97
-
```console
97
+
```bash
98
98
npm install -g jsontool
99
99
```
100
100
101
101
1. Pretty print the JSON output by including the pipe character `| json` with your GET requests.
102
102
103
-
```console
104
-
curl -i -X GET "<endpoint>documentintelligence/documentModels/prebuilt-read/analyzeResults/0e49604a-2d8e-4b15-b6b8-bb456e5d3e0a?api-version=2024-02-29-preview"-H "Ocp-Apim-Subscription-Key: <subscription key>" | json
103
+
```bash
104
+
curl -i -X GET "<endpoint>documentintelligence/documentModels/prebuilt-read/analyzeResults/0e49604a-2d8e-4b15-b6b8-bb456e5d3e0a?api-version=2024-11-30"-H "Ocp-Apim-Subscription-Key: <subscription key>"| json
105
105
```
106
106
107
107
#### [macOS](#tab/macOS)
@@ -110,8 +110,8 @@ The *json_pp* command tool ships with macOS and can be used as a JSON formatter
110
110
111
111
- Pretty print the JSON output by including `| json_pp` with your GET requests.
112
112
113
-
```console
114
-
curl -i -X GET "{endpoint}documentintelligence/documentModels/prebuilt-read/analyzeResults/0e49604a-2d8e-4b15-b6b8-bb456e5d3e0a?api-version=2024-02-29-preview"-H "Ocp-Apim-Subscription-Key: <subscription key>" | json_pp
113
+
```bash
114
+
curl -i -X GET "{endpoint}/documentintelligence/documentModels/{modelId}/analyzeResults/{resultId}?api-version=2024-11-30"-H "Ocp-Apim-Subscription-Key: <subscription key>"| json_pp
115
115
```
116
116
117
117
#### [Linux](#tab/linux)
@@ -120,8 +120,8 @@ The *json_pp* command line tool is preinstalled in most Linux distributions. If
120
120
121
121
- Pretty print the JSON output by including `| json_pp` with your `GET` requests.
122
122
123
-
```console
124
-
curl -i -X GET "<endpoint>documentintelligence/documentModels/prebuilt-read/analyzeResults/0e49604a-2d8e-4b15-b6b8-bb456e5d3e0a?api-version=2024-02-29-preview"-H "Ocp-Apim-Subscription-Key: <subscription key>" | json_pp
123
+
```bash
124
+
curl -i -X GET "{endpoint}/documentintelligence/documentModels/{modelId}/analyzeResults/{resultId}?api-version=2024-11-30"-H "Ocp-Apim-Subscription-Key: <subscription key>"| json_pp
125
125
```
126
126
127
127
---
@@ -134,8 +134,8 @@ Before you run the following command, make these changes:
134
134
- Replace *\<DI_KEY* with the variable for your environment variable if it differs from the name in the code.
135
135
- Replace *\<json-tool> with your JSON formatting tool.
0 commit comments