Skip to content

update masterKey/apiKey to MASTER_KEY/API_KEY #1712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ get_all_tasks_by_index_1: |-
get_one_key_1: |-
curl \
-X GET 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
-H 'Authorization: Bearer masterKey'
-H 'Authorization: Bearer MASTER_KEY'
get_all_keys_1: |-
curl \
-X GET 'http://localhost:7700/keys' \
-H 'Authorization: Bearer masterKey'
-H 'Authorization: Bearer MASTER_KEY'
create_a_key_1: |-
curl \
-X POST 'http://localhost:7700/keys' \
-H 'Authorization: Bearer masterKey' \
-H 'Authorization: Bearer MASTER_KEY' \
-H 'Content-Type: application/json' \
--data-binary '{
"description": "Add documents: Products API key",
Expand All @@ -115,7 +115,7 @@ create_a_key_1: |-
update_a_key_1: |-
curl \
-X PATCH 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
-H 'Authorization: Bearer masterKey' \
-H 'Authorization: Bearer MASTER_KEY' \
-H 'Content-Type: application/json' \
--data-binary '{
"description": "Manage documents: Products/Reviews API key",
Expand All @@ -132,7 +132,7 @@ update_a_key_1: |-
delete_a_key_1: |-
curl \
-X DELETE 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
-H 'Authorization: Bearer masterKey'
-H 'Authorization: Bearer MASTER_KEY'
get_settings_1: |-
curl \
-X GET 'http://localhost:7700/indexes/movies/settings'
Expand Down Expand Up @@ -583,7 +583,7 @@ getting_started_configure_settings: |-
}'
getting_started_communicating_with_a_protected_instance: |-
curl -X POST 'http://127.0.0.1:7700/indexes/movies/search' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
faceted_search_update_settings_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/settings' \
Expand Down Expand Up @@ -620,7 +620,7 @@ phrase_search_1: |-
--data-binary '{ "q": "\"african american\" horror" }'
authorization_header_1: |-
curl -X GET 'http://127.0.0.1:7700/keys' \
-H 'Authorization: Bearer masterKey'
-H 'Authorization: Bearer MASTER_KEY'
sorting_guide_update_sortable_attributes_1: |-
curl \
-X POST 'http://localhost:7700/indexes/books/settings/sortable-attributes' \
Expand Down Expand Up @@ -721,11 +721,11 @@ geosearch_guide_sort_usage_2: |-
--data-binary '{ "sort": ["_geoPoint(48.8561446,2.2978204):asc", "rating:desc"] }'
security_guide_search_key_1: |-
curl -X POST 'http://127.0.0.1:7700/indexes/patient_medical_records/search' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
security_guide_update_key_1: |-
curl \
-X PATCH 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
-H 'Authorization: Bearer masterKey' \
-H 'Authorization: Bearer MASTER_KEY' \
-H 'Content-Type: application/json' \
--data-binary '{
"indexes": ["doctors"]
Expand All @@ -734,7 +734,7 @@ security_guide_create_key_1: |-
curl \
-X POST 'http://localhost:7700/keys' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer masterKey' \
-H 'Authorization: Bearer MASTER_KEY' \
--data-binary '{
"description": "Search patient records key",
"actions": [
Expand All @@ -746,11 +746,11 @@ security_guide_create_key_1: |-
security_guide_list_keys_1: |-
curl \
-X GET 'http://localhost:7700/keys' \
-H 'Authorization: Bearer masterKey'
-H 'Authorization: Bearer MASTER_KEY'
security_guide_delete_key_1: |-
curl \
-X DELETE 'http://localhost:7700/keys/d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4' \
-H 'Authorization: Bearer masterKey'
-H 'Authorization: Bearer MASTER_KEY'
primary_field_guide_create_index_primary_key: |-
curl \
-X POST 'http://localhost:7700/indexes' \
Expand Down Expand Up @@ -780,7 +780,7 @@ primary_field_guide_update_document_primary_key: |-
tenant_token_guide_search_no_sdk_1: |-
curl \
-X POST 'http://127.0.0.1:7700/indexes/patient_medical_records/search' \
-H 'Authorization: Bearer yourTenantToken'
-H 'Authorization: Bearer TENANT_TOKEN'
get_typo_tolerance_1: |-
curl \
-X GET 'http://localhost:7700/indexes/books/settings/typo-tolerance'
Expand Down Expand Up @@ -850,57 +850,57 @@ settings_guide_typo_tolerance_1: |-
updating_guide_check_version_new_authorization_header: |-
curl \
-X GET 'http://127.0.0.1:7700/version' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
updating_guide_check_version_old_authorization_header: |-
curl \
-X GET 'http://127.0.0.1:7700/version' \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
updating_guide_get_displayed_attributes_new: |-
# whenever you see {index_uid}, replace it with your index's unique id
curl \
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
updating_guide_get_displayed_attributes_old: |-
# whenever you see {index_uid}, replace it with your index's unique id
curl \
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
updating_guide_reset_displayed_attributes_new: |-
curl \
-X DELETE 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
updating_guide_reset_displayed_attributes_old: |-
curl \
-X DELETE 'http://127.0.0.1:7700/indexes/{index_uid}/settings/displayed-attributes' \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
updating_guide_create_dump: |-
curl \
-X POST 'http://127.0.0.1:7700/dumps' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
updating_guide_get_dump_status: |-
# replace {dump_uid} with the uid returned by the previous command
curl \
-X GET 'http://127.0.0.1:7700/dumps/{dump_uid}/status' \
-H 'Authorization: Bearer apiKey'
-H 'Authorization: Bearer API_KEY'
updating_guide_get_settings_old: |-
# the -o option saves the output as a local file
curl \
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/settings' -o mysettings.json \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
updating_guide_retrieve_documents_old: |-
# the -o option saves the output as a local file
curl \
-X GET 'http://127.0.0.1:7700/indexes/{index_uid}/documents?limit=n' \ -o mydocuments.json \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
updating_guide_update_settings_old: |-
# update your settings
curl \
-X POST 'http://127.0.0.1:7700/indexes/{index_uid}/settings' \
-H 'Content-Type: application/json' -d @mysettings.json \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
updating_guide_add_documents_old: |-
# then, add your documents
curl \
-X POST 'http://127.0.0.1:7700/indexes/{index_uid}/documents' \
-H 'Content-Type: application/json' -d @mydocuments.json \
-H 'X-Meili-API-Key: apiKey'
-H 'X-Meili-API-Key: API_KEY'
4 changes: 2 additions & 2 deletions learn/advanced/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you have already **installed the latest version and manually indexed your dat
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:

```bash
./meilisearch --master-key="your_master_key"
./meilisearch --master-key="MASTER_KEY"
```

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).
Expand Down Expand Up @@ -243,7 +243,7 @@ Now that you’ve got your dump, [install the latest version of Meilisearch](/le

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

::: warning
Expand Down
6 changes: 3 additions & 3 deletions learn/cookbooks/search_bar_for_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can install and run Meilisearch on your machine using `curl`.

```bash
curl -L https://install.meilisearch.com | sh
./meilisearch --master-key=myMasterKey
./meilisearch --master-key=MASTER_KEY
```

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

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`.
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`.
`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).
`inputSelector` is the `id` attribute of the HTML search input tag.

Expand Down
6 changes: 3 additions & 3 deletions learn/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ The Meilisearch API is unprotected by default, making all routes publicly access
::: tab CLI

```bash
./meilisearch --master-key="masterKey"
./meilisearch --master-key="MASTER_KEY"
```

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

```bash
export MEILI_MASTER_KEY="masterKey"
export MEILI_MASTER_KEY="MASTER_KEY"
./meilisearch
```

Windows:

```bash
set MEILI_MASTER_KEY="masterKey"
set MEILI_MASTER_KEY="MASTER_KEY"
./meilisearch
```

Expand Down
6 changes: 3 additions & 3 deletions learn/security/master_api_keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Setting up a master key can be done with either command-line options or environm
::: tab CLI

```sh
./meilisearch --master-key="your_master_key"
./meilisearch --master-key="MASTER_KEY"
```

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

```sh
export MEILI_MASTER_KEY="your_master_key"
export MEILI_MASTER_KEY="MASTER_KEY"
./meilisearch
```

Windows:

```sh
set MEILI_MASTER_KEY="your_master_key"
set MEILI_MASTER_KEY="MASTER_KEY"
./meilisearch
```

Expand Down
2 changes: 1 addition & 1 deletion reference/api/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The `/keys` route allows you to create, manage, and delete API keys. To use thes

```bash
curl \
-H 'Authorization: Bearer replaceThisWithYourMasterKey'
-H 'Authorization: Bearer MASTER_KEY'
```

Expand Down