Use Cloud APIs
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
This page describes how to automate creating, modifying, and deleting clusters programmatically in Aerospike Cloud.
Prerequisites
- You have an active Aerospike Cloud account
Create an API key
-
Create an API key.
In the Aerospike Cloud Console, navigate to Access manager > API keys and click Create API key. Enter a name and click Generate key. Copy the Key ID and Secret (or download the CSV) and store them securely.
-
Use the key to authenticate.
Use the Key ID as
client_idand the Secret asclient_secretto obtain a bearer token for the Aerospike Cloud APIs. See Calling Cloud APIs for the token request example.
Calling Cloud APIs
The OpenAPI specification for the Aerospike Cloud APIs is available: Public APIs
The following example uses the API key to generate a bearer token for Aerospike Cloud APIs:
curl --request POST \ --url https://auth.control.aerospike.cloud/oauth/token \ --header 'content-type: application/json' \ --data '{"client_id":"<KEY_ID>","client_secret":"<KEY_SECRET>","grant_type":"client_credentials"}'That bearer token can then be used to communicate with the Aerospike Cloud APIs. For example:
curl -X GET "https://api.aerospike.com/v1/database/clusters/<CLUSTER_ID>/vpc-peerings" \ -H "Authorization: Bearer <YOUR_TOKEN>"