v0.1 — Initial Public Release
This is the first public release of the Moti-Physio API Sample Code repository.
It provides complete, ready-to-run client examples for every endpoint of the Public Moti-Physio REST API.
What's Included
7 Language Implementations
| Language | Folder | Runtime / Framework |
|---|---|---|
| Python | python/ |
Python 3.7+ · requests |
| JavaScript | javascript/ |
Node.js 14+ · axios |
| Java | java/ |
Java 11+ · built-in HttpClient |
| Swift | swift/ |
Swift 5.5+ · URLSession (iOS 15 / macOS 12) |
| Kotlin | kotlin/ |
Kotlin 1.5+ · OkHttp + Coroutines |
| C# | csharp/ |
.NET 6.0+ · built-in HttpClient |
| C++ | cpp/ |
C++17 · libcurl + nlohmann/json |
8 API Endpoints Covered
| # | Endpoint | Description |
|---|---|---|
| 1 | POST /v1/get_user_list |
Retrieve all members in your program |
| 2 | POST /v1/get_user_info |
Retrieve detailed info for a single member |
| 3 | POST /v1/get_user_static_analysis_list |
List Static (posture) analysis records |
| 4 | POST /v1/get_user_ohs_analysis_list |
List OHS (core-function / squat) records |
| 5 | POST /v1/get_user_ols_analysis_list |
List OLS (balance / one-leg stand) records |
| 6 | POST /v1/get_user_static_analysis_report |
Get presigned S3 URLs for Static report images |
| 7 | POST /v1/get_user_ohs_analysis_report |
Get presigned S3 URLs for OHS report images |
| 8 | POST /v1/get_user_ols_analysis_report |
Get presigned S3 URLs for OLS report images |
Key Features
- Body-based authentication —
program_id+security_keysent in the JSON request body (no header tokens required) - Rate-limit awareness — all samples include a 200 ms inter-request delay to stay within the server's 10 req/s sliding-window limit
- Error handling — every sample correctly handles both HTTP-level errors (429, 500) and business-logic errors returned as
{"error": "..."}inside a 200 response - Optional period filtering —
start_period/end_periodUnix-timestamp parameters are fully demonstrated - Presigned URL workflow — report endpoints return time-limited (24 h) AWS S3 URLs that can be downloaded without further authentication
Quick Start
- Obtain your
program_idandsecurity_keyfrom the Moti-Physio team. - Open the folder for your preferred language.
- Follow the
README.mdinside that folder to install dependencies and run the sample. - Replace
BASE_URL,PROGRAM_ID, andSECURITY_KEYwith your real values.
Authentication
Every request body must include:
{
"program_id": "YOUR_PROGRAM_ID",
"security_key": "YOUR_SECURITY_KEY"
}An incorrect security_key returns {"error": "password is not match"} with HTTP 200.
Rate Limiting
The server enforces 10 requests per second per IP (sliding window).
Exceeding this limit returns HTTP 429. All sample clients add a 200 ms delay between calls.
License
MIT — see LICENSE for details.