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/search/search-get-started-rest.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,45 +17,45 @@ ms.custom:
17
17
18
18
# Quickstart: Create a search index in Azure AI Search using REST
19
19
20
-
Learn how to use the [Azure AI Search REST APIs](/rest/api/searchservice) to create, load, and query a search index in Azure AI Search.
20
+
Learn how to use the [Search REST APIs](/rest/api/searchservice) to create, load, and query a search index in Azure AI Search.
21
21
22
-
The article uses the Postman app. [Download and import a Postman collection](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/Quickstart) or create requests manually using the instruction in this article.
22
+
The article uses the Postman app. [Download and import a Postman collection](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/Quickstart) or create requests manually using the instructions in this article.
23
23
24
24
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
25
25
26
26
## Prerequisites
27
27
28
-
+[Postman app](https://www.postman.com/downloads/), used for sending requests to Azure AI Search.
28
+
+[Postman app](https://www.postman.com/downloads/), used for sending REST requests to Azure AI Search.
29
29
30
-
+[Create](search-create-service-portal.md) or [find an existing Azure AI Search service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices) under your current subscription. You can use a free service for this quickstart.
30
+
+[Create](search-create-service-portal.md) or [find an existing Azure AI Search resource](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices) under your current subscription. You can use a free service for this quickstart.
31
31
32
32
## Copy a key and URL
33
33
34
34
REST calls require the service endpoint and an API key on every request. You can get these values from the Azure portal.
35
35
36
-
1. Sign in to the [Azure portal](https://portal.azure.com),navigate to your search service**Overview** page, and copy the URL. An example endpoint might look like `https://mydemo.search.windows.net`.
36
+
1. Sign in to the [Azure portal](https://portal.azure.com),navigate to the**Overview** page, and copy the URL. An example endpoint might look like `https://mydemo.search.windows.net`.
37
37
38
-
1. Under **Settings** > **Keys**, copy an admin key. Admin keys are used to add, modify, and delete objects. There are two interchangeable admin keys, provided for business continuity in case you need to roll one over. Copy either one.
38
+
1. Under **Settings** > **Keys**, copy an admin key. Admin keys are used to add, modify, and delete objects. There are two interchangeable admin keys. Copy either one.
39
39
40
40
:::image type="content" source="media/search-get-started-rest/get-url-key.png" alt-text="Screenshot of the URL and API keys in the Azure portal.":::
41
41
42
42
A valid API key establishes trust, on a per request basis, between the application sending the request and the search service handling it.
43
43
44
44
## Set collection variables
45
45
46
-
Postman provides collection variables, enclosed in brackets, to reuse the same string in every request. We use collection variables for customer-specific values, such as `{{service-name}}` in the URI or an `{{admin-key}}` in the request header.
46
+
Postman provides collection variables, enclosed in brackets in a request, to reuse the same string on every request. We use collection variables for customer-specific values, such as `{{service-name}}` in the URI or an `{{admin-key}}` in the request header.
A request header composition for Azure AI Search calls must have two elements: `Content-Type` set to `application/json`, and an `api-key`used to authenticate the request. In this quickstart, the `api-key` is specified as variable.
54
+
A request header for Azure AI Search calls must have `Content-Type` set to `application/json`, and an `api-key`set to an API key of your search service. In this quickstart, the `api-key` in the request header is specified as variable.
55
55
56
56
1. Open the Postman app and import the [sample collection](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/Quickstart) or create a new one.
57
57
58
-
1. Select the collection's access menu, select **Edit**, and provide the search service name and API key.
58
+
1. Select the collection's access menu, select **Edit**, and provide the search service name and an admin API key.
59
59
60
60
:::image type="content" source="media/search-get-started-rest/postman-collection-variables.png" lightbox="media/search-get-started-rest/postman-collection-variables.png" alt-text="Screenshot of the Postman collection variable page." border="true":::
61
61
@@ -69,7 +69,7 @@ Use the [Create Index (REST)](/rest/api/searchservice/create-index) to specify a
69
69
70
70
1. Under **Headers**, set `Content-Type` to `application/json` and set `api-key` to `{{admin-key}}`.
71
71
72
-
1. Under **Body** paste in index definition (copyable JSON is provided in the next section). Make sure the request body selection is **Raw** and the type is to **JSON**
72
+
1. Under **Body** paste in index definition (copyable JSON is provided in the next section). Make sure the request body selection is **raw** and the type is to **JSON**
73
73
74
74
1. Select **Send**.
75
75
@@ -224,9 +224,9 @@ If you get a 207, at least one document failed to upload. If you get a 404, you
224
224
225
225
Now that an index and document set are loaded, you can issue queries against them using [Search Documents REST API](/rest/api/searchservice/search-documents).
226
226
227
-
You can use GET to specify query parameters on the URI, or POST to specify query parameters in JSON. POST is preferred if you expect to set multiple query parameters.
227
+
Use GET or POST to query an index. On a GET call, specify query parameters on the URI. On POST, specify query parameters in JSON. POST is preferred for setting multiple query parameters.
228
228
229
-
The URL is extended to include a query expression, specified using the search operator.
229
+
The URL is extended to include a query expression, specified using the `/docs/search` operator.
230
230
231
231
1. Set the verb to **GET**.
232
232
@@ -240,7 +240,7 @@ The URL is extended to include a query expression, specified using the search op
240
240
241
241
1. Set the verb to **POST**.
242
242
243
-
1. Copy in this URL `https://{{service-name}}.search.windows.net/indexes/hotels-quickstart/docs?api-version=2023-11-01`. On a POST request, the API version is preceded by a `?` character.
243
+
1. Copy in this URL `https://{{service-name}}.search.windows.net/indexes/hotels-quickstart/docs/search?api-version=2023-11-01`. On a POST request, the API version is preceded by a `?` character.
244
244
245
245
1. Copy in this JSON query and then select **Send**.
246
246
@@ -255,7 +255,7 @@ The URL is extended to include a query expression, specified using the search op
255
255
256
256
The request and response should look similar to the following screenshot. For more query examples, including filters and sorting, see [Query examples](search-query-simple-examples.md).
257
257
258
-
:::image type="content" source="media/search-get-started-rest/postman-query-post.png" alt-text="Screenshot of a POST request and response in Postman.":::
258
+
:::image type="content" source="media/search-get-started-rest/postman-query-post.png" lightbox="media/search-get-started-rest/postman-query-post.png" alt-text="Screenshot of a POST request and response in Postman.":::
259
259
260
260
## Get index properties
261
261
@@ -279,7 +279,7 @@ On a free service, remember the limitation of three indexes, indexers, and data
279
279
280
280
## Next steps
281
281
282
-
Now that you know how to perform basic tasks, try advanced features, such as indexers or [enrichment pipelines](cognitive-search-tutorial-blob.md) that add content transformations to indexing. Move forward with the following article:
282
+
Now that you know how to perform basic tasks, try advanced features, such as indexers or [enrichment pipelines](cognitive-search-tutorial-blob.md) that add content transformations to indexing. We recommend the following article:
283
283
284
284
> [!div class="nextstepaction"]
285
285
> [Tutorial: Use REST and AI to generate searchable content from Azure blobs](cognitive-search-tutorial-blob.md)
0 commit comments