Skip to content

Commit 58288bc

Browse files
authored
doc: add api keys section to user guide (#502)
* Add API keys guidance to user guide * update user guide API keys section * change headings * apply suggestions * remove scenario 1 and 2 text in heading
1 parent 812b2c8 commit 58288bc

File tree

5 files changed

+64
-6
lines changed

5 files changed

+64
-6
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# API keys
2+
3+
Some repository features in OnDemand Loop require access to restricted content. API keys let the application request this content — such as draft datasets or unpublished depositions — from services like Dataverse and Zenodo on your behalf.
4+
5+
Without a repository API key, OnDemand Loop can browse and download only the public versions of datasets that have already been published. Drafts or private uploads remain inaccessible, and attempts to load them from the interface will fail.
6+
7+
---
8+
9+
### Getting your Dataverse API token
10+
11+
1. Sign in to your Dataverse installation.
12+
2. Click your user name in the top-right corner and select **API Token** from the menu.
13+
3. If you do not already have a token, click **Create Token**. Otherwise, copy the existing token value.
14+
4. If you already have a token, check the expiration date. If it has expired, click **Recreate Token** to obtain a new one.
15+
5. Keep the token secure — treat it like a password. You can regenerate or delete it at any time from the same page.
16+
17+
---
18+
19+
### Getting your Zenodo API key
20+
21+
1. Sign in to Zenodo.
22+
2. Open the **Applications** page from the user menu.
23+
3. In the **Personal access tokens** section, click **New token**.
24+
4. Enter a descriptive name (for example, `OnDemand Loop`) and select the scopes required by your workflow. For accessing drafts and uploading files through OnDemand Loop, enable at least the `deposit:actions` and `deposit:write` scopes.
25+
5. Click **Create** and copy the generated token. This value is shown only once; store it securely.
26+
27+
!!! warning
28+
29+
Zenodo lets you create multiple tokens with different permissions. Remove any tokens you no longer use to reduce risk if a key is ever exposed.
30+
31+
---
32+
33+
### Setting API keys in OnDemand Loop
34+
35+
Once you have the token or key, add it to the corresponding repository connector:
36+
37+
#### The repository exists in Settings
38+
39+
1. In OnDemand Loop, open the **Repositories** drop-down in the navigation bar and choose **Settings**.
40+
2. Select the repository installation you want to configure (It has been used previously).
41+
3. Paste your API token in the field provided for that connector.
42+
4. Click on **Save Changes** to store the credentials securely for the current user account.
43+
44+
#### The repository does not exist in Settings
45+
46+
1. In OnDemand Loop, open the **Repositories** drop-down in the navigation bar and choose **Settings**.
47+
2. If the repository has not been configured, click on **Add repository** and enter the repository url (for example
48+
https://demo.dataverse.org).
49+
3. Select the repository installation yu have just created.
50+
4. Paste your API token in the field provided for that connector.
51+
5. Click on **Save Changes** to store the credentials securely for the current user account.
52+
53+
54+
After you save the key, OnDemand Loop can load draft datasets from Dataverse, view unpublished Zenodo depositions, and perform other actions that require authenticated access. You can remove or update keys at any time from the same settings page.

docs/guide/content/user_guide/finding_data.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The application supports two ways of finding datasets from remote repositories:
1414
See the [Supported Repositories](supported_repositories.md) section for the current list. [Contributions to support additional repositories are welcome!](../development_guide/contributing.md)
1515

1616
**Public datasets** with published versions are supported by default.
17-
Access to **unpublished or draft content** may require an API key, depending on the repository's access policies.
17+
Access to **unpublished or draft content** may require an API key, depending on the repository's access policies. See [API keys](api_keys.md) for details on how to configure access for Dataverse and Zenodo.
1818

1919
---
2020

@@ -81,6 +81,8 @@ Once a dataset is selected, **OnDemand Loop displays its metadata and file listi
8181

8282
- For **Zenodo** depositions, a registered API key is needed to load any unpublished or draft content.
8383

84+
- See the [API keys](api_keys.md) section for more details.
85+
8486
#### 3. Reopen Recent Repositories from Activity
8587

8688
You can quickly return to datasets you've already explored:

docs/guide/content/user_guide/supported_repositories.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ You can find a list of known public Dataverse instances on the <a href="https://
2828

2929
- Download individual files from public or draft datasets.
3030
- Public dataset versions are available by default.
31-
- Draft dataset versions require the presence of an API token.
31+
- Draft dataset versions require the presence of an API token (See [API keys](api_keys.md) section)
3232
- Files must be under 10&nbsp;GB in size.
3333
- Checksums are verified after download.
3434

3535
**Upload**
3636

37-
- Requires a Dataverse API token.
37+
- Requires a Dataverse API token (See [API keys](api_keys.md) section).
3838
- Upload to an existing dataset or create a new dataset inside a collection.
3939
- Files are transferred using the Dataverse API and verified with checksums.
4040

@@ -128,10 +128,10 @@ You can access the **Settings** page from the **Repositories** dropdown in the t
128128
From this page, you can:
129129

130130
- View all previously used repositories.
131-
- Edit existing API keys.
132-
- Add API keys for newly used repositories.
131+
- Edit existing [API keys](api_keys.md).
132+
- Add [API keys](api_keys.md) for newly used repositories.
133133
- **Delete repositories** to remove their saved settings.
134134

135135
Deleting a repository clears its associated settings and credentials from the application. This can be helpful for managing outdated or incorrect configurations.
136136

137-
Configuring API keys ahead of time simplifies upload and download operations, particularly when working with draft datasets from platforms like **Dataverse**.
137+
Configuring [API keys](api_keys.md) ahead of time simplifies upload and download operations, particularly when working with draft datasets from platforms like **Dataverse**.

docs/guide/content/user_guide/uploading_files.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Uploads are organized into **upload bundles**, which group a set of files and li
1515
Each upload bundle requires an API key for authentication.
1616
- If no key is present, a red badge appears in the bundle header.
1717
- Click the **pencil icon** to enter your key and choose whether to save it globally or only for this bundle.
18+
- Another way of defining the API key is on **Repositories -> Settings** as it is described in [API keys](api_keys.md) section.
1819

1920
3. **Select or Create a Dataset**
2021
Depending on the type of URL provided and the rules of the remote repository,

docs/guide/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ nav:
2727
- Introduction: user_guide/index.md
2828
- Projects: user_guide/projects.md
2929
- Finding Data: user_guide/finding_data.md
30+
- API keys: user_guide/api_keys.md
3031
- Downloading Files: user_guide/downloading_files.md
3132
- Uploading Files: user_guide/uploading_files.md
3233
- Upload File Selector: user_guide/upload_file_selector.md

0 commit comments

Comments
 (0)