Services
Total endpoints: 2
Example base URL: https://<ROBOT_IP>/rest
Required access for this section: ADMIN
Get Services List
- Endpoint:
/api/v2/service/get_services_list/ - Function: Get services list.
- Method:
GET - Parameters: none
- Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/service/get_services_list/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/service/get_services_list/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
{
"command": "get_services_list",
"result": {
"head": [
"enchanted_stack.service"
],
"base": [
"enchanted_stack.service"
]
}
}
Get Journalctl Status
- Endpoint:
/api/v2/service/{system}/{service_name}/ - Function: Get journalctl status.
- Method:
GET - Parameters:
system(path,str)service_name(path,str)- Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/v2/service/base/enchanted_stack.service/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/service/base/enchanted_stack.service/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):