Polymath Services
The Polymath Automony Application running on the vehicle is composed of a set of subsystems running as SystemD Services.
You can query and control these services with the Polymath SystemD API namespace.
Prerequisites
Set BEARER_TOKEN as shown in Authentication.
Polymath Systemd API
List Polymath Services
curl "https://polyglot.polymathrobotics.dev/api/synapse/$DEVICE_ID/v2/systemd/list/user" \
--header "Authorization: Bearer $BEARER_TOKEN"
Get Status of a Polymath Service
curl "https://polyglot.polymathrobotics.dev/api/synapse/$DEVICE_ID/v2/systemd/status/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $BEARER_TOKEN"
Restart/Reload a Polymath Service
In systemd, restarting a service will stop it and then start it again, while reloading will attempt to reload the service's configuration without stopping it.
Restart:
curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$DEVICE_ID/v2/systemd/restart/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $BEARER_TOKEN"
Reload:
curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$DEVICE_ID/v2/systemd/reload/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $BEARER_TOKEN"
Stop a Polymath Service
curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$DEVICE_ID/v2/systemd/stop/user/[SERVICE_NAME]" \
--header 'Authorization: Bearer '"$BEARER_TOKEN"
Start a Polymath Service
curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$DEVICE_ID/v2/systemd/start/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $BEARER_TOKEN"