Audio API
All routes require JWT via Authorization: Bearer <token>.
Volume (Set)
- Endpoint:
/api/{{ API_VERSION }}/volume/ - Function: Set system volume percentage.
- Method:
POST - Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/volume/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"percentage": {"value": 75}}'
- Python Command:
import requests
url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/volume/"
headers = {"Authorization": "Bearer <token>"}
data = {"percentage": {"value": 75}}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())
Volume (Read)
- Endpoint:
/api/{{ API_VERSION }}/volume/ - Function: Read current system volume.
- Method:
GET - Shell Command:
- Python Command: