-
Notifications
You must be signed in to change notification settings - Fork 0
REST API
Andre-John Mas edited this page Jan 12, 2022
·
7 revisions
See the following repo for more complete documentation: https://github.com/aolde/smarthalo-api
According to the APK, there are three servers in use:
- https://api.smarthalo.bike/ - API Server
- https://valhalla.smarthalo.bike/valhalla/ - For navigation (per a Reddit thread)
- https://mobile.smarthalo.bike/ - For the presentation
It does also make use of the Strava API, but that is considered out of scope for this page.
Any attempt to implement a compatible API server will be limited to use to devices using a proxy connection or on a local network, where DNS entries can be redefined.
Still need to fill out the request & response structures
Depending on the call, the following headers are used:
- x-access-token
- x-consumer-token
There also appears to be two versions of the API, those being 1 & 2.
For the most part requests and responses are REST based, using JSON.
POST v2/activities
POST auth/local/login
POST auth/local/refresh_tokens
POST auth/local/signup
POST auth/local/checkEmail
POST auth/forgot
GET api/v1/users/whoami
POST api/v1/users/sendConfirm
PUT api/v1/users/update
DELETE api/v2/rides/{ride_id}
GET /v2/users/me/rides/{ride_id}
GET api/v1/users/rides
PATCH /v2/users/me/rides/{ride_id}
POST api/v1/users/rides/sync
PUT api/v2/users/{userId}/configs
DELETE api/v2/users/{userId}/configs
GET api/v2/users/{userId}/configs
POST api/v2/users/{userId}/favourites
GET api/v2/users/{userId}/favourites
DELETE api/v2/users/{userId}/favourites
- Note: FormUrlEncoded
# Get latest firmware info
GET v2/dfu