v1
latestOpenAPI 3.0.12026-07-172011.0 KBAirBeamMini fixed sessions binary flow
Create a new AirBeamMini fixed session
Creates a new fixed session for an AirBeamMini device. The mobile app calls this before configuring the AirBeamMini. The response includes a sensor_type_id per stream that the AirBeamMini uses to identify stream types in the binary upload payload.
Error Codes
| error_code | HTTP | Description |
|---|---|---|
| unauthorized | 401 | Missing or invalid Authorization token |
| validation_error | 400 | Request body failed validation. See fields for per-field details |
post/api/v3/fixed_sessions
Headers
Authorizationstring required
Token token=<user_token>
Request body
Example request
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Rooftop PM2.5 monitor",
"latitude": 40.7128,
"longitude": -74.006,
"contribute": true,
"time_zone": "America/New_York",
"airbeam": {
"mac_address": "AA:BB:CC:DD:EE:FF",
"model": "AirBeamMini",
"name": "Roof sensor"
},
"streams": [
{
"sensor_name": "AirBeamMini-PM1",
"unit_symbol": "µg/m³"
},
{
"sensor_name": "AirBeamMini-PM2.5",
"unit_symbol": "µg/m³"
}
]
}Response
session created
Example response
{
"location": "http://aircasting.org/s/ab12c",
"session_token": "a3f2c1d4e5b6a7f8c9d0e1f2a3b4c5d6",
"streams": [
{
"sensor_name": "AirBeam-PM2.5",
"sensor_type_id": 2
}
]
}