From 2587cd73d396602679193d5c036258128748efd2 Mon Sep 17 00:00:00 2001 From: Maxine Hartnett Date: Thu, 4 Dec 2025 11:54:48 -0700 Subject: [PATCH 1/2] Clarifying readme --- README.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ca93b48..dcff48b 100644 --- a/README.md +++ b/README.md @@ -132,28 +132,34 @@ the environment variable ``IMAP_DATA_ACCESS_URL`` or within the package ``imap_data_access.config["DATA_ACCESS_URL"]``. The default is the production server ``https://api.imap-mission.com``. -### Automated use with API Keys +### Use with API Keys The default for the CLI is to use the public endpoints. To access some unreleased data products and quicklooks, you may -need elevated permissions. To programmatically get that, you need +need elevated permissions. To get that, you need an API Key, which can be requested from the SDC team. -To use the API Key you can set the `IMAP_API_KEY` environment variable and then use -the tool as usual. +There are two ways to provide your API Key: + +1. **Environment variable**: Set the `IMAP_API_KEY` environment variable ```bash -$ IMAP_API_KEY= +$ export IMAP_API_KEY= $ imap-data-access ... ``` -or with CLI flags +2. **Command line flag**: Use the `--api-key` flag ```bash $ imap-data-access --api-key ... ``` -### Automated use with Access token +The command line flag will override the environment variable if both are set. + +> [!NOTE] +> When using an API key, requests are automatically routed to `api.imap-mission.com/api-key` endpoints for authentication. + +### Automated use with Access token (for software) An alternative to using an API key to access protected data is using an access token provided by LASP's authentication server. LASP's authentication uses [keycloak authentication](https://www.keycloak.org/documentation). From 62124298c11d8533f9fafee0cc276ed5c3245fb6 Mon Sep 17 00:00:00 2001 From: Maxine Hartnett Date: Thu, 4 Dec 2025 12:41:51 -0700 Subject: [PATCH 2/2] Move to one line --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dcff48b..fb1d03b 100644 --- a/README.md +++ b/README.md @@ -144,14 +144,13 @@ There are two ways to provide your API Key: 1. **Environment variable**: Set the `IMAP_API_KEY` environment variable ```bash -$ export IMAP_API_KEY= -$ imap-data-access ... +IMAP_API_KEY= imap-data-access ... ``` 2. **Command line flag**: Use the `--api-key` flag ```bash -$ imap-data-access --api-key ... +imap-data-access --api-key ... ``` The command line flag will override the environment variable if both are set.