Using APIs

An API (Application Programming Interface) is a back-end tool for special use cases where you need to connect a collection and datasets to other platforms. To utilize an API, you must first create a personal API Token on your repository user account. This page guides you through setting up and API for use in your collection or dataset records.

See the API Terms of Use in the Policy section of the user guide to learn what APIs are and how they can be used.

API Tokens

Treat your API Token like a password

In many cases, such as when depositing data, an API Token is required to interact with Dataverse APIs. The word “token” indicates a series of letters and numbers such as c6527048-5bdc-48b0-a1d5-ed1b62c8113b. Anyone who has your API Token can add and delete data as you so you should treat it with the same care as a password.

How to Create Your API Token

To create your API token, click on your account name in the navigation bar, then select “API Token” from the dropdown menu. In this tab, click “Create Token.”

Dataverse_APIToken_navigation.png
Select API Token

Token Expirations

Remember, API Tokens Expire one year after creation. The date will be shown above your token. If you are using your token for a long-term connection, such as connecting to an OSF project, it's crucial to recreate the token at the time of expiration.

Tip: After creating your API token, set a calendar alert for the expiration date.

How to Recreate Your API Token

If your API Token becomes compromised or has expired, click on your account name in the navigation bar, then select “API Token” from the dropdown menu. In this tab, click “Recreate Token.”

 

Three square buttons Copy to Clipboard in a red box,  Recreate Token, and Revoke Token
The recreate API token button is highlighted.

 

Additional Information about Dataverse Platform APIs and API Tokens

References ink to the official Harvard Dataverse documentation. Information is not specific to the ASU Research Data Repository.

Dataverse APIs are documented in the external API Guide, but the following sections may be of particular interest: