Using Stargate Documents API to build a TimeSeries DB API

A sample app that shows how the Stargate Documents API can be used to build a TimeSeries DB Abstraction on top of AstraDB

15 minutesBeginner

Updated December 13, 2022


Stargate Document API as TimeSeries DB for Weather Monitoring

Stargate is a data gateway deployed between the client applications and a database. The Stargate Document API modifies and queries data stored as unstructured JSON documents in collections. This gives the application developers native json support without having to give up any of the reliability and scalability goodness of Cassandra. This Stargate Docs API lets most Cassandra distros (Cassandra 3.11, Cassandra 4.0, and DataStax Enterprise 6.8), work with JSON through a REST API. The deep dive details on how to the Stargate Docs API stores the json as C* column family within Cassandra are at

In this blog, you would see how to use the Stargate Docs API and build a simple TimeSeries DB for Weather monitoring on top of the DataStax Astra DB. The demo is restricted to the data model, data extraction, storage and retrieval queries for the Weather monitoring app.

The retrieval queries for various reports are available as Postman collection at

App Dev Framework

This is a Next.js project bootstrapped with create-next-app.

Running on local

  1. add the configuration params to .env.local

  2. run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Datastax contributors


Create your Account and get started!

Let's Go!
View on GitHubDeploy to NetlifyDeploy to Vercel