Skip to main content

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 POLYMATH_ACCESS_TOKEN as shown in Authentication, then set a vehicle ID provided by Polymath:

export POLYMATH_VEHICLE_ID="your_vehicle_id"

Polymath Systemd API

List Polymath Services

curl "https://polyglot.polymathrobotics.dev/api/synapse/$POLYMATH_VEHICLE_ID/v2/systemd/list/user" \
--header "Authorization: Bearer $POLYMATH_ACCESS_TOKEN"

Get Status of a Polymath Service

curl "https://polyglot.polymathrobotics.dev/api/synapse/$POLYMATH_VEHICLE_ID/v2/systemd/status/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $POLYMATH_ACCESS_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/$POLYMATH_VEHICLE_ID/v2/systemd/restart/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $POLYMATH_ACCESS_TOKEN"

Reload:

curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$POLYMATH_VEHICLE_ID/v2/systemd/reload/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $POLYMATH_ACCESS_TOKEN"

Stop a Polymath Service

curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$POLYMATH_VEHICLE_ID/v2/systemd/stop/user/[SERVICE_NAME]" \
--header 'Authorization: Bearer '"$POLYMATH_ACCESS_TOKEN"

Start a Polymath Service

curl -X POST "https://polyglot.polymathrobotics.dev/api/synapse/$POLYMATH_VEHICLE_ID/v2/systemd/start/user/[SERVICE_NAME]" \
--header "Authorization: Bearer $POLYMATH_ACCESS_TOKEN"