Skip to content

Commit 55ca16c

Browse files
authored
DOC: Add documentation for how to use the API Key (#273)
1 parent 2568dcd commit 55ca16c

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,29 @@ the environment variable ``IMAP_DATA_ACCESS_URL`` or within the
132132
package ``imap_data_access.config["DATA_ACCESS_URL"]``. The default
133133
is the development server ``https://api.dev.imap-mission.com``.
134134

135+
### Automated use with API Keys
136+
137+
The default for the CLI is to use the public endpoints.
138+
To access some unreleased data products and quicklooks, you may
139+
need elevated permissions. To programmatically get that, you need
140+
an API Key, which can be requested from the SDC team.
141+
142+
To use the API Key you can set environment variables and then use
143+
the tool as usual. Note that the api endpoints are prefixed with `/api-key`
144+
to request unreleased data. This will also require an update to the
145+
data access url. So the following should be used when programatically
146+
accessing the data.
147+
148+
```bash
149+
IMAP_API_KEY=<your-api-key> IMAP_DATA_ACCESS_URL=https://api.dev.imap-mission.com/api-key imap-data-access ...
150+
```
151+
152+
or with CLI flags
153+
154+
```bash
155+
imap-data-access --api-key <your-api-key> --url https://api.dev.imap-mission.com/api-key ...
156+
```
157+
135158
## Troubleshooting
136159

137160
### Network issues

0 commit comments

Comments
 (0)