Fetching sensor data

Sensor data is queried from a separate endpoint, keyed by the deployment's data_uuid. This page walks through finding the UUID, making the request, trimming the response with field selection, and managing payload size.

Find the data UUID

Each deployment has a data_uuid that identifies its sensor data. You can find it two ways:

  • Programmatically — it's a field on every object returned by /public/deployments/. See Fetching deployments.
  • In the UI — open the deployment's web page on the Data Portal and look at the Instant Query panel, which includes ready-to-copy snippets for Python, MATLAB, and JavaScript.

Data UUIDs look like this: e11478e8-8bda-4494-a796-08b82334dfa0.

Fetch all sensor data

A bare GET against the data endpoint returns an array of rows. Each row is a plain JSON object whose keys depend on the deployment's sensor package — SIMB3 deployments include fields like air_temp, surface_distance, latitude, longitude, and time_stamp.

curl
curl "https://api.cryosphereinnovation.com/public/deployment/data/e11478e8-8bda-4494-a796-08b82334dfa0" \
  -H "Authorization: Bearer YOUR_API_KEY"
curl
curl "https://api.cryosphereinnovation.com/public/deployment/data/e11478e8-8bda-4494-a796-08b82334dfa0" \
  -H "Authorization: Bearer YOUR_API_KEY"
fetch_data.py
import requests
 
data_uuid = "e11478e8-8bda-4494-a796-08b82334dfa0"
url = f"https://api.cryosphereinnovation.com/public/deployment/data/{data_uuid}"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
 
rows = requests.get(url, headers=headers).json()
print(f"{len(rows)} rows")
fetch_data.py
import requests
 
data_uuid = "e11478e8-8bda-4494-a796-08b82334dfa0"
url = f"https://api.cryosphereinnovation.com/public/deployment/data/{data_uuid}"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
 
rows = requests.get(url, headers=headers).json()
print(f"{len(rows)} rows")

Rows are returned ordered by time_stamp ascending.

Select specific fields

The response can get large for long-running deployments. In almost every case you only need a few channels — use the field query parameter (repeated once per channel) to restrict the response to just those fields. _id is always included.

curl
curl "https://api.cryosphereinnovation.com/public/deployment/data/e11478e8-8bda-4494-a796-08b82334dfa0?field=time_stamp&field=air_temp&field=surface_distance" \
  -H "Authorization: Bearer YOUR_API_KEY"
curl
curl "https://api.cryosphereinnovation.com/public/deployment/data/e11478e8-8bda-4494-a796-08b82334dfa0?field=time_stamp&field=air_temp&field=surface_distance" \
  -H "Authorization: Bearer YOUR_API_KEY"
select_fields.py
import requests
 
data_uuid = "e11478e8-8bda-4494-a796-08b82334dfa0"
url = f"https://api.cryosphereinnovation.com/public/deployment/data/{data_uuid}"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = [("field", "time_stamp"), ("field", "air_temp"), ("field", "surface_distance")]
 
rows = requests.get(url, headers=headers, params=params).json()
print(rows[0])
select_fields.py
import requests
 
data_uuid = "e11478e8-8bda-4494-a796-08b82334dfa0"
url = f"https://api.cryosphereinnovation.com/public/deployment/data/{data_uuid}"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = [("field", "time_stamp"), ("field", "air_temp"), ("field", "surface_distance")]
 
rows = requests.get(url, headers=headers, params=params).json()
print(rows[0])

The response:

response
[
  {
    "_id": "6512b7a1f2c9a83b5c1e44d1",
    "time_stamp": "2024-03-14T06:00:00Z",
    "air_temp": -18.4,
    "surface_distance": 1.23
  },
  {
    "_id": "6512b7a1f2c9a83b5c1e44d2",
    "time_stamp": "2024-03-14T07:00:00Z",
    "air_temp": -17.9,
    "surface_distance": 1.24
  }
]
response
[
  {
    "_id": "6512b7a1f2c9a83b5c1e44d1",
    "time_stamp": "2024-03-14T06:00:00Z",
    "air_temp": -18.4,
    "surface_distance": 1.23
  },
  {
    "_id": "6512b7a1f2c9a83b5c1e44d2",
    "time_stamp": "2024-03-14T07:00:00Z",
    "air_temp": -17.9,
    "surface_distance": 1.24
  }
]

Managing payload size

The data endpoint returns every row in the deployment's history — it does not paginate. For a multi-year SIMB3 deployment reporting hourly, that's tens of thousands of rows.

Two practical strategies:

  1. Always use field=. Dropping fields you don't need is the single biggest lever for shrinking the payload.
  2. Track _id client-side. After an initial fetch, store the _id of each row you've processed. On subsequent fetches, ignore rows you've already seen. _id values are stable and unique, so this works reliably even without a server-side cursor.

Discovering what fields exist

There's no programmatic endpoint for listing a deployment's available fields yet. For SIMB3 deployments, the channel list is documented on the SIMB3 Sensors page. For custom instruments, the Instant Query panel on the deployment's web page is the most reliable source.

Next

  • Endpoints — full parameter and response reference
  • Errors — error codes and how to handle them