Skip to content

Commit ef7a0f7

Browse files
Merge #1712
1712: update masterKey/apiKey to MASTER_KEY/API_KEY r=maryamsulemani97 a=maryamsulemani97 Replaces #1663 closes #1589 Co-authored-by: Maryam Sulemani <[email protected]>
2 parents 8345ea4 + 85f09d7 commit ef7a0f7

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

.code-samples.meilisearch.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ get_all_tasks_by_index_1: |-
9292
get_one_key_1: |-
9393
curl \
9494
-X GET 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
95-
-H 'Authorization: Bearer masterKey'
95+
-H 'Authorization: Bearer MASTER_KEY'
9696
get_all_keys_1: |-
9797
curl \
9898
-X GET 'http://localhost:7700/keys' \
99-
-H 'Authorization: Bearer masterKey'
99+
-H 'Authorization: Bearer MASTER_KEY'
100100
create_a_key_1: |-
101101
curl \
102102
-X POST 'http://localhost:7700/keys' \
103-
-H 'Authorization: Bearer masterKey' \
103+
-H 'Authorization: Bearer MASTER_KEY' \
104104
-H 'Content-Type: application/json' \
105105
--data-binary '{
106106
"description": "Add documents: Products API key",
@@ -115,7 +115,7 @@ create_a_key_1: |-
115115
update_a_key_1: |-
116116
curl \
117117
-X PATCH 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
118-
-H 'Authorization: Bearer masterKey' \
118+
-H 'Authorization: Bearer MASTER_KEY' \
119119
-H 'Content-Type: application/json' \
120120
--data-binary '{
121121
"description": "Manage documents: Products/Reviews API key",
@@ -132,7 +132,7 @@ update_a_key_1: |-
132132
delete_a_key_1: |-
133133
curl \
134134
-X DELETE 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
135-
-H 'Authorization: Bearer masterKey'
135+
-H 'Authorization: Bearer MASTER_KEY'
136136
get_settings_1: |-
137137
curl \
138138
-X GET 'http://localhost:7700/indexes/movies/settings'
@@ -583,7 +583,7 @@ getting_started_configure_settings: |-
583583
}'
584584
getting_started_communicating_with_a_protected_instance: |-
585585
curl -X POST 'http://127.0.0.1:7700/indexes/movies/search' \
586-
-H 'Authorization: Bearer apiKey'
586+
-H 'Authorization: Bearer API_KEY'
587587
faceted_search_update_settings_1: |-
588588
curl \
589589
-X POST 'http://localhost:7700/indexes/movies/settings' \
@@ -620,7 +620,7 @@ phrase_search_1: |-
620620
--data-binary '{ "q": "\"african american\" horror" }'
621621
authorization_header_1: |-
622622
curl -X GET 'http://127.0.0.1:7700/keys' \
623-
-H 'Authorization: Bearer masterKey'
623+
-H 'Authorization: Bearer MASTER_KEY'
624624
sorting_guide_update_sortable_attributes_1: |-
625625
curl \
626626
-X POST 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
@@ -721,11 +721,11 @@ geosearch_guide_sort_usage_2: |-
721721
--data-binary '{ "sort": ["_geoPoint(48.8561446,2.2978204):asc", "rating:desc"] }'
722722
security_guide_search_key_1: |-
723723
curl -X POST 'http://127.0.0.1:7700/indexes/patient_medical_records/search' \
724-
-H 'Authorization: Bearer apiKey'
724+
-H 'Authorization: Bearer API_KEY'
725725
security_guide_update_key_1: |-
726726
curl \
727727
-X PATCH 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
728-
-H 'Authorization: Bearer masterKey' \
728+
-H 'Authorization: Bearer MASTER_KEY' \
729729
-H 'Content-Type: application/json' \
730730
--data-binary '{
731731
"indexes": ["doctors"]
@@ -734,7 +734,7 @@ security_guide_create_key_1: |-
734734
curl \
735735
-X POST 'http://localhost:7700/keys' \
736736
-H 'Content-Type: application/json' \
737-
-H 'Authorization: Bearer masterKey' \
737+
-H 'Authorization: Bearer MASTER_KEY' \
738738
--data-binary '{
739739
"description": "Search patient records key",
740740
"actions": [
@@ -746,11 +746,11 @@ security_guide_create_key_1: |-
746746
security_guide_list_keys_1: |-
747747
curl \
748748
-X GET 'http://localhost:7700/keys' \
749-
-H 'Authorization: Bearer masterKey'
749+
-H 'Authorization: Bearer MASTER_KEY'
750750
security_guide_delete_key_1: |-
751751
curl \
752752
-X DELETE 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
753-
-H 'Authorization: Bearer masterKey'
753+
-H 'Authorization: Bearer MASTER_KEY'
754754
primary_field_guide_create_index_primary_key: |-
755755
curl \
756756
-X POST 'http://localhost:7700/indexes' \
@@ -780,7 +780,7 @@ primary_field_guide_update_document_primary_key: |-
780780
tenant_token_guide_search_no_sdk_1: |-
781781
curl \
782782
-X POST 'http://127.0.0.1:7700/indexes/patient_medical_records/search' \
783-
-H 'Authorization: Bearer yourTenantToken'
783+
-H 'Authorization: Bearer TENANT_TOKEN'
784784
get_typo_tolerance_1: |-
785785
curl \
786786
-X GET 'http://localhost:7700/indexes/books/settings/typo-tolerance'
@@ -850,57 +850,57 @@ settings_guide_typo_tolerance_1: |-
850850
updating_guide_check_version_new_authorization_header: |-
851851
curl \
852852
-X GET 'http://127.0.0.1:7700/version' \
853-
-H 'Authorization: Bearer apiKey'
853+
-H 'Authorization: Bearer API_KEY'
854854
updating_guide_check_version_old_authorization_header: |-
855855
curl \
856856
-X GET 'http://127.0.0.1:7700/version' \
857-
-H 'X-Meili-API-Key: apiKey'
857+
-H 'X-Meili-API-Key: API_KEY'
858858
updating_guide_get_displayed_attributes_new: |-
859859
# whenever you see {index_uid}, replace it with your index's unique id
860860
curl \
861861
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
862-
-H 'Authorization: Bearer apiKey'
862+
-H 'Authorization: Bearer API_KEY'
863863
updating_guide_get_displayed_attributes_old: |-
864864
# whenever you see {index_uid}, replace it with your index's unique id
865865
curl \
866866
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
867-
-H 'X-Meili-API-Key: apiKey'
867+
-H 'X-Meili-API-Key: API_KEY'
868868
updating_guide_reset_displayed_attributes_new: |-
869869
curl \
870870
-X DELETE 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
871-
-H 'Authorization: Bearer apiKey'
871+
-H 'Authorization: Bearer API_KEY'
872872
updating_guide_reset_displayed_attributes_old: |-
873873
curl \
874874
-X DELETE 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
875-
-H 'X-Meili-API-Key: apiKey'
875+
-H 'X-Meili-API-Key: API_KEY'
876876
updating_guide_create_dump: |-
877877
curl \
878878
-X POST 'http://127.0.0.1:7700/dumps' \
879-
-H 'Authorization: Bearer apiKey'
879+
-H 'Authorization: Bearer API_KEY'
880880
updating_guide_get_dump_status: |-
881881
# replace {dump_uid} with the uid returned by the previous command
882882
curl \
883883
-X GET 'http://127.0.0.1:7700/dumps/{dump_uid}/status' \
884-
-H 'Authorization: Bearer apiKey'
884+
-H 'Authorization: Bearer API_KEY'
885885
updating_guide_get_settings_old: |-
886886
# the -o option saves the output as a local file
887887
curl \
888888
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/settings' -o mysettings.json \
889-
-H 'X-Meili-API-Key: apiKey'
889+
-H 'X-Meili-API-Key: API_KEY'
890890
updating_guide_retrieve_documents_old: |-
891891
# the -o option saves the output as a local file
892892
curl \
893893
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/documents?limit=n' \ -o mydocuments.json \
894-
-H 'X-Meili-API-Key: apiKey'
894+
-H 'X-Meili-API-Key: API_KEY'
895895
updating_guide_update_settings_old: |-
896896
# update your settings
897897
curl \
898898
-X POST 'http://127.0.0.1:7700/indexes/{index_uid}/settings' \
899899
-H 'Content-Type: application/json' -d @mysettings.json \
900-
-H 'X-Meili-API-Key: apiKey'
900+
-H 'X-Meili-API-Key: API_KEY'
901901
updating_guide_add_documents_old: |-
902902
# then, add your documents
903903
curl \
904904
-X POST 'http://127.0.0.1:7700/indexes/{index_uid}/documents' \
905905
-H 'Content-Type: application/json' -d @mydocuments.json \
906-
-H 'X-Meili-API-Key: apiKey'
906+
-H 'X-Meili-API-Key: API_KEY'

learn/advanced/updating.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you have already **installed the latest version and manually indexed your dat
1313
Before we begin, you need to **verify the version of Meilisearch that's compatible with your database**, i.e. the version that indexed the data. You can do so by launching a Meilisearch instance:
1414

1515
```bash
16-
./meilisearch --master-key="your_master_key"
16+
./meilisearch --master-key="MASTER_KEY"
1717
```
1818

1919
If Meilisearch launches successfully, use the [get version endpoint](/reference/api/version.md), note your `pkgVersion`, and [proceed to the next step](#proceed-according-to-your-database-version).
@@ -243,7 +243,7 @@ Now that you’ve got your dump, [install the latest version of Meilisearch](/le
243243

244244
```bash
245245
# launch the latest version of Meilisearch with the master key and import the specified dump file
246-
./meilisearch --import-dump /dumps/your_dump_file.dump --master-key="your_master_key"
246+
./meilisearch --import-dump /dumps/your_dump_file.dump --master-key="MASTER_KEY"
247247
```
248248

249249
::: warning

learn/cookbooks/search_bar_for_docs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can install and run Meilisearch on your machine using `curl`.
2020

2121
```bash
2222
curl -L https://install.meilisearch.com | sh
23-
./meilisearch --master-key=myMasterKey
23+
./meilisearch --master-key=MASTER_KEY
2424
```
2525

2626
There are [other ways to install Meilisearch](/learn/getting_started/quick_start.md#setup-and-installation).
@@ -100,7 +100,7 @@ You can run the scraper with Docker. With our local Meilisearch instance set up
100100
docker run -t --rm \
101101
--network=host \
102102
-e MEILISEARCH_HOST_URL='http://localhost:7700' \
103-
-e MEILISEARCH_API_KEY='myMasterKey' \
103+
-e MEILISEARCH_API_KEY='MASTER_KEY' \
104104
-v <absolute-path-to-your-config-file>:/docs-scraper/config.json \
105105
getmeili/docs-scraper:latest pipenv run ./docs_scraper config.json
106106
```
@@ -213,7 +213,7 @@ _[Docxtemplater](https://docxtemplater.com/) search bar demo_
213213
</html>
214214
```
215215

216-
The `hostUrl` and the `apiKey` fields are the credentials of the Meilisearch instance. Following on from this tutorial, they are respectively `http://localhost:7700` and `myMasterKey`.
216+
The `hostUrl` and the `apiKey` fields are the credentials of the Meilisearch instance. Following on from this tutorial, they are respectively `http://localhost:7700` and `MASTER_KEY`.
217217
`indexUid` is the index identifier in your Meilisearch instance in which your website content is stored. It has been defined in the [config file](#configuration-file).
218218
`inputSelector` is the `id` attribute of the HTML search input tag.
219219

learn/getting_started/quick_start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ The Meilisearch API is unprotected by default, making all routes publicly access
468468
::: tab CLI
469469

470470
```bash
471-
./meilisearch --master-key="masterKey"
471+
./meilisearch --master-key="MASTER_KEY"
472472
```
473473

474474
:::
@@ -478,14 +478,14 @@ The Meilisearch API is unprotected by default, making all routes publicly access
478478
Linux/MacOS:
479479

480480
```bash
481-
export MEILI_MASTER_KEY="masterKey"
481+
export MEILI_MASTER_KEY="MASTER_KEY"
482482
./meilisearch
483483
```
484484

485485
Windows:
486486

487487
```bash
488-
set MEILI_MASTER_KEY="masterKey"
488+
set MEILI_MASTER_KEY="MASTER_KEY"
489489
./meilisearch
490490
```
491491

learn/security/master_api_keys.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Setting up a master key can be done with either command-line options or environm
1414
::: tab CLI
1515

1616
```sh
17-
./meilisearch --master-key="your_master_key"
17+
./meilisearch --master-key="MASTER_KEY"
1818
```
1919

2020
:::
@@ -24,14 +24,14 @@ Setting up a master key can be done with either command-line options or environm
2424
Linux/MacOS:
2525

2626
```sh
27-
export MEILI_MASTER_KEY="your_master_key"
27+
export MEILI_MASTER_KEY="MASTER_KEY"
2828
./meilisearch
2929
```
3030

3131
Windows:
3232

3333
```sh
34-
set MEILI_MASTER_KEY="your_master_key"
34+
set MEILI_MASTER_KEY="MASTER_KEY"
3535
./meilisearch
3636
```
3737

reference/api/keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `/keys` route allows you to create, manage, and delete API keys. To use thes
44

55
```bash
66
curl \
7-
-H 'Authorization: Bearer replaceThisWithYourMasterKey'
7+
-H 'Authorization: Bearer MASTER_KEY'
88
99
```
1010

0 commit comments

Comments
 (0)