-
Notifications
You must be signed in to change notification settings - Fork 9
Stargate!
Access K8assandra using the Stargate APIs Stargate provides APIs, data types and access methods that bring new capabilities to existing databases. Currently Stargate adds Document, REST and GraphQL APIs for CRUD access to data stored in Apache Cassandra® and there are many more APIs coming soon. Separating compute and storage also has benefits for maximizing resource consumption in cloud environments. When using Stargate with Cassandra, you can offload the request coordination overhead from your storage instances onto Stargate instances which has shown latency improvements in preliminary testing.
✅ Step 2: Access Stargate
To access Stargate in k8ssandra, generate a Stargate access token replacing and with the values you retrieved in the previous step:
curl -L -X POST 'http://<YOURADDRESS>:8081/v1/auth' -H 'Content-Type: application/json' --data-raw '{"username": "<k8ssandra-username>", "password": "<k8ssandra-password>"}'
📃 output
{"authToken":"<access-token>"}
✅ Step 1: Access Document Data API
The Stargate document APIs provide a way schemaless way to store and interact with data inside of Cassandra. The first step is to create a namespace. That can be done with a request to the /v2/schemas/namespaces API:
curl --location --request POST 'http://<YOURADDRESS>:8082/v2/schemas/namespaces' \
--header "x-cassandra-token: <YOURTOKEN>" \
--header 'Content-Type: application/json' \
--data '{
"name": "mynamespace"
}'
Proceed to the Step VI
Got questions? Ask us using discord chat or a community forum!