Skip to content

Commit 8c4c5e5

Browse files
committed
fix rest qs
1 parent 812b96b commit 8c4c5e5

File tree

1 file changed

+25
-30
lines changed

1 file changed

+25
-30
lines changed

articles/ai-services/content-understanding/quickstart/use-rest-api.md

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about Content Understanding REST APIs
55
author: PatrickFarley
66
ms.author: paulhsu
77
manager: nitinme
8-
ms.date: 05/19/2025
8+
ms.date: 07/15/2025
99
ms.service: azure-ai-content-understanding
1010
ms.topic: quickstart
1111
ms.custom:
@@ -20,15 +20,11 @@ ms.custom:
2020

2121
## Prerequisites
2222

23-
To get started, you need **an active Azure subscription**. If you don't have an Azure account, [create one for free](https://azure.microsoft.com/free/).
24-
25-
* Once you have your Azure subscription, create an [Azure AI Foundry resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesAIFoundry) in the Azure portal.
26-
23+
* To get started, you need **an active Azure subscription**. If you don't have an Azure account, [create one for free](https://azure.microsoft.com/free/).
24+
* Once you have your Azure subscription, create an [Azure AI Foundry resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesAIFoundry) in the Azure portal. Be sure to create it in a [supported region](/azure/ai-services/content-understanding/language-region-support).
2725
* This resource is listed under **AI Foundry** > **AI Foundry** in the portal.
28-
2926
:::image type="content" source="../media/overview/azure-multi-service-resource.png" alt-text="Screenshot of the AI Foundry resource page in the Azure portal.":::
30-
31-
In this guide, we use the cURL command line tool. If it isn't installed, you can [download](https://everything.curl.dev/install/index.html) the appropriate version for your dev environment.
27+
* In this guide, we use the cURL command line tool. If it isn't installed, you can [download](https://everything.curl.dev/install/index.html) the appropriate version for your dev environment.
3228

3329
## Get started with a prebuilt analyzer
3430

@@ -73,34 +69,33 @@ curl -i -X POST "{endpoint}/contentunderstanding/analyzers/{analyzerId}:analyze?
7369
```
7470

7571
#### POST response
76-
The response includes a JSON body containing the `resultId`, which you use to retrieve the results of the asynchronous analysis operation. Additionally, the `Operation-Location` header provides the direct URL to access the analysis result.
72+
The response includes a `request-id`, which you use to retrieve the results of the asynchronous analysis operation. Additionally, the `Operation-Location` header provides the direct URL to access the analysis result.
7773

7874
```
79-
202 Accepted
80-
Operation-Location: {endpoint}/contentunderstanding/analyzerResults/{resultId}?api-version=2024-12-01-preview
81-
{
82-
"id": {resultId},
83-
"status": "Running",
84-
"result": {
85-
"analyzerId": {analyzerId},
86-
"apiVersion": "2025-05-01-preview",
87-
"createdAt": "YYYY-MM-DDTHH:MM:SSZ",
88-
"warnings": [],
89-
"contents": []
90-
}
91-
}
75+
HTTP/1.1 202 Accepted
76+
Transfer-Encoding: chunked
77+
Content-Type: application/json
78+
request-id: aaa-bbb-ccc-ddd
79+
x-ms-request-id: aaa-bbb-ccc-ddd
80+
Operation-Location: {endpoint}/contentunderstanding/analyzerResults/{request-id}?api-version=2025-05-01-preview
81+
api-supported-versions: 2024-12-01-preview,2025-05-01-preview,2025-10-01
82+
x-envoy-upstream-service-time: 800
83+
apim-request-id: {request-id}
84+
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
85+
x-content-type-options: nosniff
86+
x-ms-region: West US
9287
```
9388

9489
### Get analyze result
9590

96-
Use the `resultId` from the [`POST` response](#post-response) and retrieve the result of the analysis.
91+
Use the `request-id` from the [`POST` response](#post-response) and retrieve the result of the analysis.
9792

9893
1. Replace `{endpoint}` and `{key}` with the endpoint and key values from your Azure portal Azure AI Foundry instance.
99-
2. Replace `{analyzerResultId}` with the `id` from the `POST` response or use the complete URL from the `Operation-Location` response header.
94+
2. Replace `{request-id}` with the `request-id` from the `POST` response, or use the complete URL from the `Operation-Location` response header.
10095

10196
#### GET request
10297
```bash
103-
curl -i -X GET "GET {endpoint}/contentunderstanding/analyzerResults/{analyzerResultId}?api-version=2025-05-01-preview" \
98+
curl -i -X GET "{endpoint}/contentunderstanding/analyzerResults/{request-id}?api-version=2025-05-01-preview" \
10499
-H "Ocp-Apim-Subscription-Key: {key}"
105100
```
106101

@@ -112,7 +107,7 @@ The 200 (`OK`) JSON response includes a `status` field indicating the status of
112107

113108
```json
114109
{
115-
"id": {resultId},
110+
"id": "<request-id>",
116111
"status": "Succeeded",
117112
"result": {
118113
"analyzerId": "prebuilt-documentAnalyzer",
@@ -206,7 +201,7 @@ The 200 (`OK`) JSON response includes a `status` field indicating the status of
206201

207202
```json
208203
{
209-
"id": {resultId},
204+
"id": "<request-id>",
210205
"status": "Succeeded",
211206
"result": {
212207
"analyzerId": "prebuilt-imageAnalyzer",
@@ -242,7 +237,7 @@ The 200 (`OK`) JSON response includes a `status` field indicating the status of
242237

243238
```json
244239
{
245-
"id": {resultId},
240+
"id": "<request-id>",
246241
"status": "Succeeded",
247242
"result": {
248243
"analyzerId": "prebuilt-audioAnalyzer",
@@ -287,7 +282,7 @@ The 200 (`OK`) JSON response includes a `status` field indicating the status of
287282

288283
```json
289284
{
290-
"id": {resultId},
285+
"id": "<request-id>",
291286
"status": "Succeeded",
292287
"result": {
293288
"analyzerId": "prebuilt-videoAnalyzer",
@@ -345,7 +340,7 @@ The 200 (`OK`) JSON response includes a `status` field indicating the status of
345340

346341
---
347342

348-
## Next steps
343+
## Next step
349344

350345
Learn more about creating [custom analyzers](../tutorial/create-custom-analyzer.md) for your use case.
351346

0 commit comments

Comments
 (0)