REST API Introduction

The Cryosphere Innovation REST API gives a consistent, cross-platform, and uniform way of accessing data and metadata from resources within the Cryosphere system.

API Basics

The web has changed a lot over the years.

As software applications have grown and become more complex, having a consistent means for transferring information between systems has become more necessary than ever.

A REST API is like a digital messenger that helps different software applications talk to each other over the internet. It provides a set of rules and commands for requesting and exchanging data, making it easy for programs to share information and work together seamlessly.

How do I use a REST API?

You interact with a REST API by making a "request" to an "endpoint" in a request-response cycle. An endpoint is just a URL that tells the API what information you're looking for. For example, you can make a request to the following URL to recieve a response with several facs about cats.

https://cat-fact.herokuapp.com/facts

Try it in your browser. Navigate to the URL and and you'll see a response with the information you requested. The funky combination of braces and curly brackets is called a JSON. It's just a string, and can be decomposed into a native data type in whatever programming language you're using.

Now imagine instead of cat facts, you have a list of metadata for all currently deployed instruments. That request URL would look like:

https://api.cryosphereinnovation.com/public/deployments/?status=deployed

In this process, the REST API can also check who you are (authenticate you) and whether or not you have access to the information you asked for (authorizes you). If the checks pass, you are given a response with the information you asked for.

Requests can be made in virtually any programming language that supports HTTP requests. This includes Python, Matlab, JavaScript, C, C++, Arduino, and many others.

Who is this for?

Anyone can use the Cryosphere Innovation REST API to access Cryosphere Innovation resources programmatically. That being said, there are a few types of people and use cases that this tool might especially suit. These include:

  • Modelers that want real-time data and don't want to download a spreadsheet every time.
  • Scientific Organizations that that want to host data/metadata on their own systems.
  • Developers that build applications that consume real-time data.

To get started quickly, we have written several examples to help you format common requests.