Qualify Your Database Needs with DataStax Astra Stargate REST API
Published: 2022-09-29 15:20:57

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pya0fdmn7e8ffec5f8dn.jpeg)


_This is the first post in a series we introduced [here](https://medium.com/building-the-open-data-stack/get-a-head-start-on-your-app-development-with-flexible-datastax-stargate-apis-478bba7e32c2) on using Stargate application programming interfaces (APIs) to quickly qualify your database needs right in your browser. We’ll begin with the most common API — the representational state transfer (REST) API. To help you learn how to use it, we’ve created a [Katacoda scenario](https://katacoda.com/datastax/courses/astra-core-course/astra-rest-api) that will show you how to perform standard create, read, update and delete (CRUD) operations in your [Apache Cassandra®](https://www.datastax.com/what-is/cassandra) database._

When you want to build a world-class app, you need to think about scalability, availability, and performance. So you’re probably looking for a cloud-native solution. And a run-of-the-mill database won’t cut it for your backend.

For many of your scalable application needs, Cassandra is a one-stop solution. It can give you the fastest lookup speed. And since it can be globally distributed, it’s highly available for your clients no matter where they are located.

Cassandra requires a fair amount of expertise and effort to run. So the Cassandra experts at DataStax created Cassandra-as-a-service called [Astra DB](https://astra.dev/3xYDGxK). Standard API access lets you get up and running with Cassandra in minutes and enjoy all the benefits with none of the hassle. Now, you can try it out in the scenario we’ve created to help you get started using this API right in your favorite browser.

In this scenario, you’ll learn the basics of how to use the [Stargate REST API](https://stargate.io/docs/stargate/1.0/developers-guide/rest-using.html) built on Cassandra. Specifically, we’ll show you how to use the REST API to create tables in your Cassandra database and perform CRUD operations on them using [client URL](https://en.wikipedia.org/wiki/CURL) (cURL).

The technologies we’ll use in this scenario are:



* **Astra DB:** Serverless cloud database-as-a-service based on Cassandra.
* **Stargate REST API:** Most common API for handling app data.
* **Apache Cassandra®:** Open-source database management system.


# Creating a Cassandra Database with Astra DB

Cassandra is what we’ll be basing your database on, so you get the best options of high performance, scalability, throughput, and availability. Cassandra is a free and open-source database management system. It has been used by hundreds of companies to support data-driven, mission-critical applications that frequently require a global scale. For example, Cassandra is used by Apple, eBay, Hulu, Instagram, Netflix, Spotify, and Uber, just to name a few.

Unfortunately, Cassandra, being a distributed database that runs on large clusters, can be complicated to operate. That’s no issue in the big corporations with experienced engineers with time to focus solely on their databases. But it might be an issue for you. We know a lot of developers want to use Cassandra without having to start from scratch on their own.

That’s why we built Astra DB. It’s a cloud database-as-a-service (DBaaS) built on Cassandra. We designed it to make it easy and fast to start building apps that can scale fast. You can get started for free and pay as you go, once you are ready to go into production.


# Using the Stargate REST API

To make it easy for your app to interact with the database, we created [Stargate.io](https://stargate.io/). It’s an open-source data gateway with three APIs that work with Astra DB right out of the box. Instead of having to read up on different APIs and databases, all you have to do is pick one of the three Stargate APIs and get to work on your application.

You can read more about the GraphQL API and Document API in [the intro post to this series](https://medium.com/building-the-open-data-stack/get-a-head-start-on-your-app-development-with-flexible-datastax-stargate-apis-478bba7e32c2) and the following posts that will take a closer look at each of them. For now, we’ll focus on the REST API, which is the most commonly used.

The REST API concept has been around for over 20 years now. It’s still popular because it’s so easy to use. It lets you use standard HTTP commands like `POST`, `PUT`, `GET,` and `DELETE` to exchange data in [JavaScript Object Notation](https://www.json.org/json-en.html) (JSON) or other formats that are well-known to most developers.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnpr9nf7expusxes7x4f.jpg)

With the Stargate REST API, you can implement your application and Cassandra database separately. You can then use the API to call on microservices between the two. The clean cuts between all your moving parts make it easier for you to scale whatever it is you’re building. You can even use our REST API to create new tables in your database.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/00u9ti10f5ztdqf06n11.png)

# Try out the Stargate REST API in your browser

We’ve set up a scenario for you to try out the Stargate REST API for free. You can use the REST API [Katacoda scenario](https://katacoda.com/datastax/courses/astra-core-course/astra-rest-api) to set up a world-class, cloud-native database and perform CRUD operations on your data in just a matter of minutes — all within your browser of choice.

Learn more about Astra by also going through our other scenarios on [our developer portal](https://www.datastax.com/dev).

All you need to do is sign up for an [Astra account](https://astra.dev/3xYDGxK) to start writing and reading data. DataStax gives you a free credit of USD 25 every month so you can check it out without entering any credit card details. If you experience any friction in the sign-up process, have a look at [this short guide](https://www.youtube.com/watch?v=hzZ3nVrsEpM).

_Sign up for an [Astra DB account](https://astra.dev/3xYDGxK) today and get started with the Stargate REST API in a matter of minutes._


# References



1. [What is Astra DB? (Astra documentation)](https://docs.datastax.com/en/astra/docs/)
2. [Get a head start on your app development with DataStax Stargate APIs](https://medium.com/building-the-open-data-stack/get-a-head-start-on-your-app-development-with-flexible-datastax-stargate-apis-478bba7e32c2)
3. [Astra Katacoda scenarios](https://katacoda.com/datastax/courses/astra-core-course)
4. [Astra Youtube tutorials](https://www.youtube.com/playlist?list=PL2g2h-wyI4SpWK1G3UaxXhzZc6aUFXbvL)
5. [DataStax Developer Portal](https://www.datastax.com/dev)
6. [Join our Discord: Fellowship of the (Cassandra) Rings](https://discord.com/invite/pPjPcZN)
7. [Stargate APIs | GraphQL, REST, Document](https://www.datastax.com/products/datastax-astra/apis)
8. [DataStax Academy](https://auth.cloud.datastax.com/auth/realms/CloudUsers/protocol/saml/clients/absorb)
9. [DataStax Certifications](https://www.datastax.com/dev/certifications)
10. [DataStax Workshops](https://www.datastax.com/workshops)