This new functionality opens up a world of opportunities for our users and makes it easier than ever to programmatically integrate CrateDB Cloud into your existing workflows and applications.
An API token is a secure and convenient way to authenticate with our API. Instead of using a username and password, you can use a token to access the API and perform various management and monitoring actions. Tokens can be generated and revoked at any time, providing you with complete control over access to your Cloud console.
There are many reasons why you might use the API. Here are a few use cases we can think of:
All the available endpoints can be found in our API documentation.
Getting started with the CrateDB Cloud API is very simple. A new key/secret can be created in your account settings. Make sure to safely store the secret, as you will only see it once upon creation. Also, keep in mind that any key is automatically deleted after 90 days of inactivity.
After you have the key, simply go to our API documentation and figure out what you'd like to do.
For example, you might want to display information about the current user. That can be done with this simple curl command:
curl -s -u $your_key:$your_secret https://console.cratedb.cloud/api/v2/users/me/
The response will contain the available information of the user: {
"email": "some@example.com",
"hmac": "...",
"is_superuser": false,
"name": "Some User",
"organization_id": "123",
"status": "active",
"uid": "uid",
"username": "some@example.com"
}
You can also create multiple keys for your organization. This prevents issues with the so-called "Key Rollover". With only 1 API key available at a time, your services can be disrupted if you need to delete or update your key for any reason. With multiple keys, you can easily switch between them to avoid this.
Public API access has been a strongly requested feature, so we're thrilled it's now available for our users. It is a powerful tool allowing users to manage all aspects of their CrateDB Cloud account programmatically. Whether you're automating management tasks, integrating with other systems, or creating custom dashboards, the API will make it all much easier.