API Keys¶
Wherobots API Keys allow you to authenticate with Wherobots Cloud for programmatic access to Wherobots APIs and services. They can be created by any Wherobots user and ensure that requests are executed as though they were made by the user themselves.
This enables usage of Wherobots APIs like the Spatial SQL API in scripts, CI/CD pipelines, or with Apache Airflow ETLs and other automated workflows.
If you want to create your API key under a service principal, see Service Principals.
Before you start¶
Before using API keys, ensure that you have the following required resources:
- An account within a Community, Professional, or Enterprise Edition Organization. For more information, see Create a Wherobots Account.
- If you are creating API keys, you must be configured as an Admin. For more information on Roles see, Organization Roles.
- A User can authenticate with API keys provided by an Admin. For more information see Access API keys from an Admin.
Create an API Key¶
Only Organization Administrators can create API keys.
To create an API key, do the following:
- Go to Settings > API Keys.
-
Click Create new key.
-
Enter a value in the Name field.
- Choose an Expiration Date for your API key. This value defaults to 1 year from when the API key is created.
-
Click Submit.
After clicking Submit, Wherobots generates an API key.
Note
Copy and store your API key securely, as Wherobots will not show you this API key again.
Revoke an API Key¶
Only Organization Administrators can revoke API keys.
To revoke an API key, do the following:
Warning
To avoid service interruptions, it's crucial to identify any dependencies on an API key before you revoke it. Thoroughly investigate and understand what systems or processes rely on that key before revoking an API key.
- Go to Organization Settings > Security.
- Find API Keys section.
- Scroll to the right and click ... > Revoke.
- Click Revoke to confirm that you want to remove this API key from your Organization.
HTTP Requests¶
To use an API key in an HTTP request, you must include it in the X-API-KEY
header.
curl -H "X-API-KEY: YOUR_API_KEY_HERE" https://api.cloud.wherobots.com/users/me
Access API key from an Admin¶
If you're configured as a User in your Organization, you won't be able to view or manage API keys in that Organization.
In order to gain access to any needed API keys, an Admin from your Organization must share the necessary credentials with you.
Contact your Wherobots Organization Administrator if you have further questions regarding your Organization's API keys or API keys.
To find the Admin associated with your Organization, do the following:
- Go to Organization Settings > Users.
- Find the email address associated with the Admin in your Organization.