Cassandra.Api
Cassandra.Api copied to clipboard
Open Source Application for DataStax Astra
Leaves on DataStax Astra™ with NoSQL, and Apache Cassandra™ in the cloud!
Table of Contents
- Astra Setup & Configuring Credentials
- Getting Started
- Running Data Migrator
- Node JS
- Python
- Running Unit Tests
- Running Admin UI
Setup
1.1 Create Account
- Before you start using our tools, you'll need to create an account on DataStax Astra

1.2 Create New Database
- You'll then be directed to the home page. Locate the
Create Databasebutton on the left side:
- On the following screen, press the
Get Startedbutton underneath "Pay as you go":
- Enter a database name and keyspace name. Select any of the providers at the bottom and select the region closest to you. Then press
Create Database
- Now wait a few minutes for the database to spin up, and click on the name of the database on the left side of the screen. Expected result:

Database is ready, notice how the status changed from pending to Active and now you now have the connect button enabled.*
1.3 Finding Secure Connect Bundle
- Get your secure connect bundle.
- Press the blue Connect button at the top right corner, and then select "Node.js" under the menu "Connect using a driver":
1.4 Download Secure Connect Bundle
- Finally, click the Download Bundle button to download the zip. Once saved, move the zip into the
cassandra.api/astra.credentialsdirectory of this project.

1.5 Generate Tokens For Database
- In the top left corner, press the arrow next to the "Current Organization" name and go to Organization Settings:
- Navigate to Token Management, Select the role "Admin User" and press
Generate Token. Expected result:
- Before leaving this page, make sure to save these three values into a text document (or press the 'Download CSV' button)
1.6 Configure Cassandra.API Connection
- Fill in the naming conventions you declared earlier, when you setup your database, in your (cassandra.api/astra.credentials/UserCred.json) file
- For Username, input your generated Client ID (from Token Management)
- For Password, input your generated Client Secret
- The following is an example of that the UserCred.json file would look like using the credentials used for configuring the Astra instance.
{
"username":"your-client-id",
"password":"your-client-secret",
"cluster":"testdb2",
"keyspace":"testkeyspace",
"table":"leaves"
}
The last value table wasn't declared before so you can do that here for the first time.
Getting Started
It's best to go through this project in the following order so you do not get confused.
2.1 Run the data migrator to transfer data from our cassandra.api to your Astra Database.
Data Migrator
2.2 Setup an API so that you can communicate with your Astra database. We have 2 APIs for you to use:
Node JS
Python
2.3 Run this set of unit tests against your API to confirm that it is working properly.
Testing
2.4 Launch Web Admin UI to visualize your Astra Database in Table Format
Admin UI
Reference Material
Cassandra.API Documentation Walkthrough
Cassandra.API Blog Post: Part 1
Cassandra.API Blog Post: Part 2
Building a REST API with DataStax Astra using Node & Python: Part 1
Building a REST API with DataStax Astra using Node & Python: Part 2
Cassandra.API Live Workshop w/DataStax