Autumn Labs
API

Metrics

Retrieve metrics data for specified or all accessible stations and optional filters

GET
/metrics

Authorization

AuthorizationRequiredBearer <token>

In: header

Query Parameters

station_idsstring

Comma-separated list of station IDs

tostring
Default: "2025-06-11T07:25:02.143Z"Format: "date-time"
fromstring
Default: "2025-06-10T07:25:02.144Z"Format: "date-time"
namesarray<string>

The names of the metrics to filter by

Default: []

Response Body

Response containing metrics data

TypeScript Definitions

Use the response body type in TypeScript.

dataRequiredarray<object>
messageRequiredstring
metaobject

Standard error response

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredobject

Standard error response

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredobject

Standard error response

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredobject

Standard error response

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredobject
curl -X GET "https://example.com/metrics?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&names=temperature&names=humidity" \
  -H "Authorization: Bearer <token>"
fetch("https://example.com/metrics?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&names=temperature&names=humidity", {
  headers: {
    "Authorization": "Bearer <token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/metrics?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&names=temperature&names=humidity"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/metrics?station_ids=507f1f77bcf86cd799439011%2C507f1f77bcf86cd799439012&to=2025-06-11T07%3A25%3A02.143Z&from=2025-06-10T07%3A25%3A02.144Z&names=temperature&names=humidity"

response = requests.request("GET", url, headers = {
  "Authorization": "Bearer <token>"
})

print(response.text)
{
  "data": [
    {
      "station_id": "string",
      "slot": "string",
      "unit_serial": "string",
      "time_inserted": "string",
      "time_created": "string",
      "tz": "string",
      "mode": "string",
      "tags": [
        "string"
      ],
      "name": "string",
      "value": "string",
      "unit": "string",
      "type": "string",
      "limit_upper": "string",
      "limit_lower": "string"
    }
  ],
  "message": "Success",
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z",
    "request_id": "c2ed3e07-8c5f-4be9-b7ec-86bddcedd154",
    "query_duration_ms": 0
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}