Skip to content

Commit 872c586

Browse files
authored
Merge pull request #4977 from laujan/paul-4952-rest-custom
Paul 4952 rest custom
2 parents 2013417 + 7e51417 commit 872c586

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,8 @@ Analyzers define how your content is processed and the insights that are extract
4141
This quickstart uses prebuilt document, image, audio, and video analyzers to help you get started.
4242

4343
### Send file for analysis
44-
#### POST request
4544

46-
```bash
47-
curl -i -X POST "{endpoint}/analyzers/{analyzerId}:analyze?api-version=2025-05-01-preview" \
48-
-H "Ocp-Apim-Subscription-Key: {key}" \
49-
-H "Content-Type: application/json" \
50-
-d "{\"url\":\"{fileUrl}\"}"
51-
```
52-
Before running the cURL command, make the following changes to the HTTP request:
45+
Before running the following cURL command, make the following changes to the HTTP request:
5346
# [Document](#tab/document)
5447

5548
1. Replace `{endpoint}` and `{key}` with the corresponding values from your Azure AI Services instance in the Azure portal.
@@ -75,12 +68,21 @@ Before running the cURL command, make the following changes to the HTTP request:
7568
3. Replace `{fileUrl}` with a publicly accessible URL of the file to analyze—such as a path to an Azure Storage Blob with a shared access signature (SAS), or use the sample URL: `https://github.com/Azure-Samples/azure-ai-content-understanding-python/raw/refs/heads/main/data/FlightSimulator.mp4`.
7669
---
7770

71+
#### POST request
7872

79-
#### POST response
73+
```bash
74+
curl -i -X POST "{endpoint}/contentunderstanding/analyzers/{analyzerId}:analyze?api-version=2025-05-01-preview" \
75+
-H "Ocp-Apim-Subscription-Key: {key}" \
76+
-H "Content-Type: application/json" \
77+
-d "{\"url\":\"{fileUrl}\"}"
78+
```
8079

81-
The response returns `resultId` that you can use to track the status of this asynchronous analyze operation.
80+
#### POST response
81+
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.
8282

8383
```
84+
202 Accepted
85+
Operation-Location: {endpoint}/contentunderstanding/analyzerResults/{resultId}?api-version=2024-12-01-preview
8486
{
8587
"id": {resultId},
8688
"status": "Running",
@@ -109,7 +111,7 @@ curl -i -X GET "{endpoint}/contentunderstanding/analyzerResults/{resultId}?api-v
109111

110112
#### GET response
111113

112-
The 200 (`OK`) JSON response includes a `status` field indicating the status of the operation. If the operation isn't complete, the value of `status` is `running` or `notStarted`. In such cases, you should send the `GET` request again, either manually or through a script. Wait an interval of one second or more between calls.
114+
The 200 (`OK`) JSON response includes a `status` field indicating the status of the operation. If the operation isn't complete, the value of `status` is `Running` or `NotStarted`. In such cases, you should send the `GET` request again, either manually or through a script. Wait an interval of one second or more between calls.
113115

114116
# [Document](#tab/document)
115117

@@ -353,3 +355,4 @@ The 200 (`OK`) JSON response includes a `status` field indicating the status of
353355
Learn more about [analyzers](../concepts/analyzer-templates.md) for your use case.
354356

355357

358+

articles/ai-services/content-understanding/tutorial/create-custom-analyzer.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Create a custom analyzer with Azure AI Content Understanding
2+
title: Create a custom analyzer with Azure AI Content Understanding using REST APIs
33
titleSuffix: Azure AI services
44
description: Learn to create a custom analyzer with Azure AI Content Understanding
55
author: laujan
@@ -10,7 +10,7 @@ ms.topic: overview
1010
ms.date: 05/19/2025
1111
---
1212

13-
# Create a custom analyzer
13+
# Create a custom analyzer via REST APIs
1414

1515
Content Understanding analyzers define how to process and extract insights from your content. They ensure uniform processing and output structure across all your content to deliver reliable and predictable results. We offer [prebuilt analyzers](../concepts/prebuilt-analyzers.md) for common use cases. This guide shows how these analyzers can be customized to better fit your needs.
1616

@@ -587,3 +587,9 @@ A `200 OK` response includes a `status` field that shows the operation's progres
587587
}
588588
}
589589
```
590+
591+
## Next steps
592+
593+
* Review code samples: [**visual document search**](https://github.com/Azure-Samples/azure-ai-search-with-content-understanding-python/blob/main/notebooks/search_with_visual_document.ipynb).
594+
* Review code sample: [**analyzer templates**](https://github.com/Azure-Samples/azure-ai-content-understanding-python/tree/main/analyzer_templates).
595+
* Try processing your document content using Content Understanding in [Azure AI Foundry](https://aka.ms/cu-landing).

0 commit comments

Comments
 (0)