Create configuration

POST /networks/{network_identifier}/sensors/{sensor_identifier}/configurations

Creates or updates a sensor's configuration. Each configuration is assigned a monotonically increasing revision number. The new configuration is stored in the database and relayed to the sensor over MQTT.

Configurations are an optional feature. Sensors don't need to implement configuration updates and can nevertheless send measurements and logs unidirectionally to the server.

Path parameters

  • network_identifier string Required

    Format should match the following pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$.

  • sensor_identifier string Required

    Format should match the following pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$.

application/json

Body

  • Additional properties are allowed

Responses

  • 201

    Created

    Hide response attribute Show response attribute object
    • revision integer

      Configurations are assigned monotonically increasing revision numbers. The revision is used as an identifier in the communication with the sensors and can clearly match configurations to measurements and logs.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

POST /networks/{network_identifier}/sensors/{sensor_identifier}/configurations
curl \
 -X POST https://example.com/networks/575a7328-4e2e-4b88-afcc-e0b5ed3920cc/sensors/575a7328-4e2e-4b88-afcc-e0b5ed3920cc/configurations \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"measurement_interval":8.5,"cache":true,"strategy":"default"}'
Request example
{
  "measurement_interval": 8.5,
  "cache": true,
  "strategy": "default"
}
Request examples
{
  "cache": true,
  "strategy": "default",
  "measurement_interval": 8.5
}
Response examples (201)
{
  "revision": 42
}
Response examples (201)
{
  "revision": 42
}