Skip to content

Commit 140afa7

Browse files
committed
more edits
1 parent 024ecb6 commit 140afa7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

articles/search/search-security-api-keys.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ Query keys are typically distributed to client applications that issue queries.
4747

4848
**How API keys are used in REST calls**:
4949

50-
Set an admin key in the request header. You can't pass admin keys on the URI or in the body of the request. Admin keys are used for create-read-update-delete operation and on requests issued to the search service itself, such as LIST Indexes or GET Service Statistics.
50+
Set an admin key in the request header. You can't pass admin keys on the URI or in the body of the request. Admin keys are used for create-read-update-delete operation and on requests issued to the search service itself, such as [LIST Indexes](/rest/api/searchservice/indexes/list) or [GET Service Statistics](/rest/api/searchservice/get-service-statistics/get-service-statistics).
51+
52+
Here's an example of admin API key usage on a create index request:
5153

5254
```http
5355
### Create a new index
5456
POST {{baseUrl}}/indexes?api-version=2023-11-01 HTTP/1.1
5557
Content-Type: application/json
56-
api-key: {{apiKey}}
58+
api-key: {{adminApiKey}}
5759
5860
{
5961
"name": "my-new-index",
@@ -66,8 +68,10 @@ POST {{baseUrl}}/indexes?api-version=2023-11-01 HTTP/1.1
6668

6769
Set a query key in a request header for POST, or on the URI for GET. Query keys are used for operations that target the `index/docs` collection: [Search Documents](/rest/api/searchservice/documents/search-get), [Autocomplete](/rest/api/searchservice/documents/autocomplete-get), [Suggest](/rest/api/searchservice/documents/suggest-get), or [GET Document](/rest/api/searchservice/documents/get).
6870

71+
Here's an example of query API key usage on a Search Documents (GET) request:
72+
6973
```http
70-
GET /indexes/my-new-index/docs?search=*&api-version=2020-06-30&api-key={{apiKey}}
74+
GET /indexes/my-new-index/docs?search=*&api-version=2020-06-30&api-key={{queryApiKey}}
7175
```
7276

7377
> [!NOTE]

0 commit comments

Comments
 (0)