You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-9Lines changed: 14 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,28 +132,33 @@ the environment variable ``IMAP_DATA_ACCESS_URL`` or within the
132
132
package ``imap_data_access.config["DATA_ACCESS_URL"]``. The default
133
133
is the production server ``https://api.imap-mission.com``.
134
134
135
-
### Automated use with API Keys
135
+
### Use with API Keys
136
136
137
137
The default for the CLI is to use the public endpoints.
138
138
To access some unreleased data products and quicklooks, you may
139
-
need elevated permissions. To programmatically get that, you need
139
+
need elevated permissions. To get that, you need
140
140
an API Key, which can be requested from the SDC team.
141
141
142
-
To use the API Key you can set the `IMAP_API_KEY` environment variable and then use
143
-
the tool as usual.
142
+
There are two ways to provide your API Key:
143
+
144
+
1.**Environment variable**: Set the `IMAP_API_KEY` environment variable
144
145
145
146
```bash
146
-
$ IMAP_API_KEY=<your-api-key>
147
-
$ imap-data-access ...
147
+
IMAP_API_KEY=<your-api-key> imap-data-access ...
148
148
```
149
149
150
-
or with CLI flags
150
+
2.**Command line flag**: Use the `--api-key` flag
151
151
152
152
```bash
153
-
$ imap-data-access --api-key <your-api-key> ...
153
+
imap-data-access --api-key <your-api-key> ...
154
154
```
155
155
156
-
### Automated use with Access token
156
+
The command line flag will override the environment variable if both are set.
157
+
158
+
> [!NOTE]
159
+
> When using an API key, requests are automatically routed to `api.imap-mission.com/api-key` endpoints for authentication.
160
+
161
+
### Automated use with Access token (for software)
157
162
158
163
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).
0 commit comments