Skip to content

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 journalctl logs for a service.
  • Method: GET
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/service/base/enchanted_stack.service" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/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 .service files on head and base.
  • Method: GET
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/service/get_services_list" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/service/get_services_list"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())