Services API
Requires JWT with access_level: ENCHANTER or ADMIN.
Get Service Logs
- Endpoint:
/api/{{ API_VERSION }}/service/{system}/{service_name} - Function: Return last-hour
journalctllogs for a service. - Method:
GET - Shell Command:
curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/service/base/enchanted_stack.service" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/service/base/enchanted_stack.service"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())
List Services
- Endpoint:
/api/{{ API_VERSION }}/service/get_services_list - Function: List all allowed
.servicefiles on head and base. - Method:
GET - Shell Command:
curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/service/get_services_list" \
-H "Authorization: Bearer <token>"
- Python Command: