Skip to content

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

  1. 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.

  2. Use the key to authenticate.

    Use the Key ID as client_id and the Secret as client_secret to 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:

Terminal window
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:

Terminal window
curl -X GET "https://api.aerospike.com/v1/database/clusters/<CLUSTER_ID>/vpc-peerings" \
-H "Authorization: Bearer <YOUR_TOKEN>"
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?