Skip to content

Attenuator Endpoints

GET /api/attenuator

Returns the current attenuation setpoint in dB.

Response:

{
  "setpoint": 15.5
}

POST /api/attenuator

Sets the attenuation setpoint in dB.

Request:

{
  "setpoint": 20.0
}

Valid range: 0 to 95.25 dB in steps of 0.25 dB.

Response:

{
  "setpoint": 20.0
}

Errors:

  • 400 — Invalid request body
  • 500 — Failed to set setpoint (value out of range or invalid step size)

GET /api/attenuator/startup

Returns the startup attenuation setpoint — the value applied when the device boots.

Response:

{
  "startup_setpoint": 95.25
}

POST /api/attenuator/startup

Sets the startup attenuation setpoint. This value is persisted and applied on every device boot.

Request:

{
  "startup_setpoint": 30.0
}

Valid range: 0 to 95.25 dB in steps of 0.25 dB.

Response:

{
  "startup_setpoint": 30.0
}

Errors:

  • 400 — Invalid request body
  • 500 — Failed to save startup setpoint

Examples:

# Set attenuation to 20 dB
curl -X POST -H "Content-Type: application/json" \
  -d '{"setpoint": 20.0}' \
  http://<device-ip>/api/attenuator

# Query current setpoint
curl http://<device-ip>/api/attenuator

# Save 30 dB as the startup default
curl -X POST -H "Content-Type: application/json" \
  -d '{"startup_setpoint": 30.0}' \
  http://<device-ip>/api/attenuator/startup