Difficulty: Beginner
Estimated Time: 15 minutes

REST stands for Representational State Transfer. The RESTful API style is a popular way of using standard HTTP commands like POST, PUT, GET, DELETE, and others to support exchange of data, using formats such as JSON. This style of interface promotes a clean separation between implementation of clients and servers.

The Stargate open source project provides an API layer that allows you to expose a REST API on top of any Cassandra database. When the Stargate REST API is added to an existing Cassandra deployment, it automatically creates HTTP endpoints that allow you to perform create, read, update, and delete (CRUD) operations on tables in your database. You can also create new database tables directly via the API.

Astra DB now offers offers a REST API via Stargate, which we explore in this scenario.

We'll use the Astra DB REST API to:

  • Create a table and a record
  • Read the record from the table
  • Update the record
  • Delete the record

As a prerequisite, be sure to setup an Astra account and create a Cassandra as a Service database at astra.datastax.com.

This is fun and easy! We'll show you how.

This scenario is also available on our datastax.com/dev site, where you can find many more resources to help you succeed with Apache Cassandra™.

Code Complete

Thanks for taking a tour of Stargate's REST API on Astra DB!

For more details and elaboration of the REST API features check out the Stargate documentation.

For more information and details on using the REST API on Astra DB read the documentation.

Please give this scenario a rating (click on the stars near the top).

Have questions or more feedback? Send us a message.

Getting Started with Stargate REST API for Apache Cassandra™

Step 1 of 7

Watch an introductory video on the REST API

Here's a short video that shows how to use the REST API.

You can enlarge the video to full-screen by clicking in the bottom-right corner of the video.

Now, you give it a try!