Skip to content

Commit fda72a5

Browse files
v0.28: API endpoint verbs update
1 parent c475ae5 commit fda72a5

11 files changed

+46
-46
lines changed

.code-samples.meilisearch.yaml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ get_settings_1: |-
136136
-X GET 'http://localhost:7700/indexes/movies/settings'
137137
update_settings_1: |-
138138
curl \
139-
-X POST 'http://localhost:7700/indexes/movies/settings' \
139+
-X PATCH 'http://localhost:7700/indexes/movies/settings' \
140140
-H 'Content-Type: application/json' \
141141
--data-binary '{
142142
"rankingRules": [
@@ -193,7 +193,7 @@ get_synonyms_1: |-
193193
-X GET 'http://localhost:7700/indexes/movies/settings/synonyms'
194194
update_synonyms_1: |-
195195
curl \
196-
-X POST 'http://localhost:7700/indexes/movies/settings/synonyms' \
196+
-X PUT 'http://localhost:7700/indexes/movies/settings/synonyms' \
197197
-H 'Content-Type: application/json' \
198198
--data-binary '{
199199
"wolverine": [
@@ -214,7 +214,7 @@ get_stop_words_1: |-
214214
-X GET 'http://localhost:7700/indexes/movies/settings/stop-words'
215215
update_stop_words_1: |-
216216
curl \
217-
-X POST 'http://localhost:7700/indexes/movies/settings/stop-words' \
217+
-X PUT 'http://localhost:7700/indexes/movies/settings/stop-words' \
218218
-H 'Content-Type: application/json' \
219219
--data-binary '[
220220
"the",
@@ -229,7 +229,7 @@ get_ranking_rules_1: |-
229229
-X GET 'http://localhost:7700/indexes/movies/settings/ranking-rules'
230230
update_ranking_rules_1: |-
231231
curl \
232-
-X POST 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
232+
-X PUT 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
233233
-H 'Content-Type: application/json' \
234234
--data-binary '[
235235
"words",
@@ -249,7 +249,7 @@ get_distinct_attribute_1: |-
249249
-X GET 'http://localhost:7700/indexes/shoes/settings/distinct-attribute'
250250
update_distinct_attribute_1: |-
251251
curl \
252-
-X POST 'http://localhost:7700/indexes/shoes/settings/distinct-attribute' \
252+
-X PUT 'http://localhost:7700/indexes/shoes/settings/distinct-attribute' \
253253
-H 'Content-Type: application/json' \
254254
--data-binary '"skuid"'
255255
reset_distinct_attribute_1: |-
@@ -260,7 +260,7 @@ get_filterable_attributes_1: |-
260260
-X GET 'http://localhost:7700/indexes/movies/settings/filterable-attributes'
261261
update_filterable_attributes_1: |-
262262
curl \
263-
-X POST 'http://localhost:7700/indexes/movies/settings/filterable-attributes' \
263+
-X PUT 'http://localhost:7700/indexes/movies/settings/filterable-attributes' \
264264
-H 'Content-Type: application/json' \
265265
--data-binary '[
266266
"genres",
@@ -274,7 +274,7 @@ get_searchable_attributes_1: |-
274274
-X GET 'http://localhost:7700/indexes/movies/settings/searchable-attributes'
275275
update_searchable_attributes_1: |-
276276
curl \
277-
-X POST 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
277+
-X PUT 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
278278
-H 'Content-Type: application/json' \
279279
--data-binary '[
280280
"title",
@@ -289,7 +289,7 @@ get_displayed_attributes_1: |-
289289
-X GET 'http://localhost:7700/indexes/movies/settings/displayed-attributes'
290290
update_displayed_attributes_1: |-
291291
curl \
292-
-X POST 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
292+
-X PUT 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
293293
-H 'Content-Type: application/json' \
294294
--data-binary '[
295295
"title",
@@ -314,12 +314,12 @@ get_version_1: |-
314314
-X GET 'http://localhost:7700/version'
315315
distinct_attribute_guide_1: |-
316316
curl \
317-
-X POST 'http://localhost:7700/indexes/jackets/settings' \
317+
-X PUT 'http://localhost:7700/indexes/jackets/settings' \
318318
-H 'Content-Type: application/json' \
319319
--data-binary '{ "distinctAttribute": "product_id" }'
320320
field_properties_guide_searchable_1: |-
321321
curl \
322-
-X POST 'http://localhost:7700/indexes/movies/settings' \
322+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
323323
-H 'Content-Type: application/json' \
324324
--data-binary '{
325325
"searchableAttributes": [
@@ -330,7 +330,7 @@ field_properties_guide_searchable_1: |-
330330
}'
331331
field_properties_guide_displayed_1: |-
332332
curl \
333-
-X POST 'http://localhost:7700/indexes/movies/settings' \
333+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
334334
-H 'Content-Type: application/json' \
335335
--data-binary '{
336336
"displayedAttributes": [
@@ -442,7 +442,7 @@ search_parameter_guide_matches_1: |-
442442
}'
443443
settings_guide_synonyms_1: |-
444444
curl \
445-
-X POST 'http://localhost:7700/indexes/tops/settings' \
445+
-X PUT 'http://localhost:7700/indexes/tops/settings' \
446446
-H 'Content-Type: application/json' \
447447
--data-binary '{
448448
"synonyms": {
@@ -452,7 +452,7 @@ settings_guide_synonyms_1: |-
452452
}'
453453
settings_guide_stop_words_1: |-
454454
curl \
455-
-X POST 'http://localhost:7700/indexes/movies/settings' \
455+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
456456
-H 'Content-Type: application/json' \
457457
--data-binary '{
458458
"stopWords": [
@@ -463,7 +463,7 @@ settings_guide_stop_words_1: |-
463463
}'
464464
settings_guide_ranking_rules_1: |-
465465
curl \
466-
-X POST 'http://localhost:7700/indexes/movies/settings' \
466+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
467467
-H 'Content-Type: application/json' \
468468
--data-binary '{
469469
"rankingRules": [
@@ -479,12 +479,12 @@ settings_guide_ranking_rules_1: |-
479479
}'
480480
settings_guide_distinct_1: |-
481481
curl \
482-
-X POST 'http://localhost:7700/indexes/jackets/settings' \
482+
-X PUT 'http://localhost:7700/indexes/jackets/settings' \
483483
-H 'Content-Type: application/json' \
484484
--data-binary '{ "distinctAttribute": "product_id" }
485485
settings_guide_searchable_1: |-
486486
curl \
487-
-X POST 'http://localhost:7700/indexes/movies/settings' \
487+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
488488
-H 'Content-Type: application/json' \
489489
--data-binary '{
490490
"searchableAttributes": [
@@ -495,7 +495,7 @@ settings_guide_searchable_1: |-
495495
}'
496496
settings_guide_displayed_1: |-
497497
curl \
498-
-X POST 'http://localhost:7700/indexes/movies/settings' \
498+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
499499
-H 'Content-Type: application/json' \
500500
--data-binary '{
501501
"displayedAttributes": [
@@ -507,7 +507,7 @@ settings_guide_displayed_1: |-
507507
}'
508508
settings_guide_sortable_1: |-
509509
curl \
510-
-X POST 'http://localhost:7700/indexes/books/settings' \
510+
-X PUT 'http://localhost:7700/indexes/books/settings' \
511511
-H 'Content-Type: application/json' \
512512
--data-binary '{
513513
"sortableAttributes": [
@@ -544,7 +544,7 @@ getting_started_add_meteorites: |-
544544
--data-binary @meteorites.json
545545
getting_started_update_ranking_rules: |-
546546
curl \
547-
-X POST 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
547+
-X PUT 'http://localhost:7700/indexes/movies/settings/ranking-rules' \
548548
-H 'Content-Type: application/json' \
549549
--data-binary '[
550550
"exactness",
@@ -558,7 +558,7 @@ getting_started_update_ranking_rules: |-
558558
]'
559559
getting_started_update_displayed_attributes: |-
560560
curl \
561-
-X POST 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
561+
-X PUT 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
562562
-H 'Content-Type: application/json' \
563563
--data-binary '[
564564
"title",
@@ -567,17 +567,17 @@ getting_started_update_displayed_attributes: |-
567567
]'
568568
getting_started_update_searchable_attributes: |-
569569
curl \
570-
-X POST 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
570+
-X PUT 'http://localhost:7700/indexes/movies/settings/searchable-attributes' \
571571
-H 'Content-Type: application/json' \
572572
--data-binary '["title"]'
573573
getting_started_update_stop_words: |-
574574
curl \
575-
-X POST 'http://localhost:7700/indexes/movies/settings/stop-words' \
575+
-X PUT 'http://localhost:7700/indexes/movies/settings/stop-words' \
576576
-H 'Content-Type: application/json' \
577577
--data-binary '["the"]'
578578
getting_started_synonyms: |-
579579
curl \
580-
-X POST 'http://localhost:7700/indexes/movies/settings/synonyms' \
580+
-X PUT 'http://localhost:7700/indexes/movies/settings/synonyms' \
581581
-H 'Content-Type: application/json' \
582582
--data-binary '{
583583
"winnie": ["piglet"],
@@ -608,7 +608,7 @@ getting_started_sorting: |-
608608
}'
609609
getting_started_configure_settings: |-
610610
curl \
611-
-X POST 'http://localhost:7700/indexes/meteorites/settings' \
611+
-X PUT 'http://localhost:7700/indexes/meteorites/settings' \
612612
-H 'Content-Type: application/json' \
613613
--data-binary '{
614614
"filterableAttributes": [
@@ -626,7 +626,7 @@ getting_started_communicating_with_a_protected_instance: |-
626626
-H 'Authorization: Bearer API_KEY'
627627
faceted_search_update_settings_1: |-
628628
curl \
629-
-X POST 'http://localhost:7700/indexes/movies/settings' \
629+
-X PUT 'http://localhost:7700/indexes/movies/settings' \
630630
-H 'Content-Type: application/json' \
631631
--data-binary '{
632632
"filterableAttributes": [
@@ -686,15 +686,15 @@ authorization_header_1: |-
686686
-H 'Authorization: Bearer MASTER_KEY'
687687
sorting_guide_update_sortable_attributes_1: |-
688688
curl \
689-
-X POST 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
689+
-X PUT 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
690690
-H 'Content-Type: application/json' \
691691
--data-binary '[
692692
"author",
693693
"price"
694694
]'
695695
sorting_guide_update_ranking_rules_1: |-
696696
curl \
697-
-X POST 'http://localhost:7700/indexes/books/settings/ranking-rules' \
697+
-X PUT 'http://localhost:7700/indexes/books/settings/ranking-rules' \
698698
-H 'Content-Type: application/json' \
699699
--data-binary '[
700700
"words",
@@ -725,7 +725,7 @@ get_sortable_attributes_1: |-
725725
-X GET 'http://localhost:7700/indexes/books/settings/sortable-attributes'
726726
update_sortable_attributes_1: |-
727727
curl \
728-
-X POST 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
728+
-X PUT 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
729729
-H 'Content-Type: application/json' \
730730
--data-binary '[
731731
"price",
@@ -759,7 +759,7 @@ geosearch_guide_filter_usage_2: |-
759759
--data-binary '{ "filter": "_geoRadius(45.472735, 9.184019, 2000) AND type = pizza" }'
760760
geosearch_guide_sort_settings_1: |-
761761
curl \
762-
-X POST 'http://localhost:7700/indexes/restaurants/settings/sortable-attributes' \
762+
-X PUT 'http://localhost:7700/indexes/restaurants/settings/sortable-attributes' \
763763
-H 'Content-type:application/json' \
764764
--data-binary '["_geo"]'
765765
geosearch_guide_sort_usage_1: |-
@@ -844,7 +844,7 @@ get_typo_tolerance_1: |-
844844
-X GET 'http://localhost:7700/indexes/books/settings/typo-tolerance'
845845
update_typo_tolerance_1: |-
846846
curl \
847-
-X POST 'http://localhost:7700/indexes/books/settings/typo-tolerance' \
847+
-X PATCH 'http://localhost:7700/indexes/books/settings/typo-tolerance' \
848848
-H 'Content-Type: application/json' \
849849
--data-binary '{
850850
"minWordSizeForTypos": {
@@ -858,17 +858,17 @@ reset_typo_tolerance_1: |-
858858
-X DELETE 'http://localhost:7700/indexes/books/settings/typo-tolerance'
859859
typo_tolerance_guide_1: |-
860860
curl \
861-
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
861+
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
862862
-H 'Content-Type: application/json' \
863863
--data-binary '{ "enabled": false }'
864864
typo_tolerance_guide_2: |-
865865
curl \
866-
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
866+
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
867867
-H 'Content-Type: application/json' \
868868
--data-binary '{ "disableOnAttributes": ["title"] }'
869869
typo_tolerance_guide_3: |-
870870
curl \
871-
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
871+
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
872872
-H 'Content-Type: application/json' \
873873
--data-binary '{
874874
"disableOnWords": [
@@ -877,7 +877,7 @@ typo_tolerance_guide_3: |-
877877
}'
878878
typo_tolerance_guide_4: |-
879879
curl \
880-
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
880+
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
881881
-H 'Content-Type: application/json' \
882882
--data-binary '{
883883
"minWordSizeForTypos": {
@@ -887,7 +887,7 @@ typo_tolerance_guide_4: |-
887887
}'
888888
settings_guide_typo_tolerance_1: |-
889889
curl \
890-
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
890+
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
891891
-H 'Content-Type: application/json' \
892892
--data-binary '{
893893
"minWordSizeForTypos": {
@@ -953,7 +953,7 @@ updating_guide_add_documents_old: |-
953953
-H 'X-Meili-API-Key: API_KEY'
954954
getting_started_typo_tolerance: |-
955955
curl \
956-
-X POST 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
956+
-X PATCH 'http://localhost:7700/indexes/movies/settings/typo-tolerance' \
957957
-H 'Content-Type: application/json' \
958958
--data-binary '{
959959
"minWordSizeForTypos": { "oneTypo": 4 }

reference/api/displayed_attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ List the settings.
3838

3939
## Update displayed attributes
4040

41-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/displayed-attributes" />
41+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/displayed-attributes" />
4242

4343
Update the [displayed attributes](/learn/configuration/settings.md#displayed-attributes) of an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
4444

reference/api/distinct_attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Get the [distinct attribute](/learn/configuration/settings.md#distinct-attribute
3030

3131
## Update distinct attribute
3232

33-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/distinct-attribute" />
33+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/distinct-attribute" />
3434

3535
Update the [distinct attribute](/learn/configuration/settings.md#distinct-attribute) field of an index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
3636

reference/api/filterable_attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ List the settings.
3434

3535
## Update filterable attributes
3636

37-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/filterable-attributes" />
37+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/filterable-attributes" />
3838

3939
Update an index's [filterable attributes list](/learn/advanced/filtering_and_faceted_search.md). This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
4040

reference/api/ranking_rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ List the settings.
4444

4545
## Update ranking rules
4646

47-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/ranking-rules" />
47+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/ranking-rules" />
4848

4949
Update the [ranking rules](/learn/core_concepts/relevancy.md#ranking-rules) of an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
5050

reference/api/searchable_attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ List the settings.
3737

3838
## Update searchable attributes
3939

40-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/searchable-attributes" />
40+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/searchable-attributes" />
4141

4242
Update the [searchable attributes](/learn/configuration/displayed_searchable_attributes.md#searchable-fields) of an index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
4343

reference/api/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ List the settings.
103103

104104
## Update settings
105105

106-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings" />
106+
<RouteHighlighter method="PATCH" route="/indexes/{index_uid}/settings" />
107107

108108
Update the settings of an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
109109

reference/api/sortable_attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ List the settings.
3333

3434
## Update sortable attributes
3535

36-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/sortable-attributes" />
36+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/sortable-attributes" />
3737

3838
Update an index's sortable attributes list. This will re-index all documents in the index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
3939

reference/api/stop_words.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Get the stop-words list of an index. The index [`uid`](/learn/core_concepts/inde
3838

3939
## Update stop-words
4040

41-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/stop-words" />
41+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/stop-words" />
4242

4343
Update the list of stop-words of an index. This will re-index all documents in the index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
4444

reference/api/synonyms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Get the list of [synonyms](/learn/configuration/synonyms.md) of an index. The in
4242

4343
## Update synonyms
4444

45-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/synonyms"/>
45+
<RouteHighlighter method="PUT" route="/indexes/{index_uid}/settings/synonyms"/>
4646

4747
Update the list of [synonyms](/learn/configuration/synonyms.md) of an index. Synonyms are [normalized](/learn/configuration/synonyms.md#normalization). The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
4848

reference/api/typo_tolerance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ An array of attributes for which the typo tolerance feature is disabled.
6161

6262
## Update typo tolerance
6363

64-
<RouteHighlighter method="POST" route="/indexes/{index_uid}/settings/typo-tolerance"/>
64+
<RouteHighlighter method="PATCH" route="/indexes/{index_uid}/settings/typo-tolerance"/>
6565

6666
Partially update the typo tolerance settings for an index. The index [`uid`](/learn/core_concepts/indexes.md#index-uid) is required.
6767

0 commit comments

Comments
 (0)