Skip to content

Commit 9757e78

Browse files
Add more info on auth headers and API key redaction (#3400)
1 parent a6c249e commit 9757e78

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

reference/api/settings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2643,7 +2643,7 @@ This field is incompatible with `huggingFace` and `userProvided` embedders.
26432643

26442644
##### `apiKey`
26452645

2646-
Authentication token Meilisearch should send with each request to the embedder.
2646+
Authentication token Meilisearch should send with each request to the embedder. Meilisearch redacts this value when returning embedder settings. Do not use the redacted API key when updating settings.
26472647

26482648
This field is mandatory if using a protected `rest` embedder.
26492649

reference/api/webhooks.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Use the `/webhooks` to trigger automatic workflows when Meilisearch finishes pro
2828
- `uuid`: a v4 uuid Meilisearch automatically generates when you create a new webhook
2929
- `url`: a string indication the URL Meilisearch should notify whenever it completes a task, required
3030
- `headers`: an object with HTTP headers and their values, optional, often used for authentication
31+
- `Authorization` headers: the value of authorization headers is redacted in `webhook` responses. Do not use authorization header values as returned by Meilisearch to update a webhook
3132
- `isEditable`: read-only Boolean field indicating whether you can edit the webhook. Meilisearch automatically sets this to `true` for all webhooks created via the API and to `false` for reserved webhooks
3233

3334
## The webhook payload
@@ -122,6 +123,8 @@ You can create up to 20 webhooks. Having multiple webhooks active at the same ti
122123

123124
Update the configuration for the specified webhook. To remove a field, set its value to `null`.
124125

126+
When updating the `headers` field, Meilisearch only changes the headers you have explicitly submitted. All other headers remain unaltered.
127+
125128
<Note>
126129
It is not possible to edit webhooks whose `isEditable` field is set to `false`.
127130

snippets/samples/code_samples_get_documents_1.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ client.index('movies').getDocuments({
1313
```
1414

1515
```python Python
16-
client.index('movies').get_documents({'limit':2, 'filter': 'genres=action'})
16+
client.index('movies').get_documents({
17+
'limit':2, 'filter': 'genres=action',
18+
'sort': ['rating:desc', 'release_date:asc'] # list format
19+
})
1720
```
1821

1922
```php PHP

snippets/samples/code_samples_get_documents_post_1.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ client.index('books').getDocuments({
2323
client.index('books').get_documents({
2424
'limit':3,
2525
'fields': ['title', 'genres', 'rating', 'language'],
26-
'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English'
26+
'filter': '(rating > 3 AND (genres=Adventure OR genres=Fiction)) AND language=English',
27+
'sort': 'rating:desc, title:asc' # comma-separated string format
2728
})
2829
```
2930

0 commit comments

Comments
 (0)