Skip to content

v0.1 — Initial Public Release

Latest

Choose a tag to compare

@Tom-HJ Tom-HJ released this 08 Apr 09:53

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 authenticationprogram_id + security_key sent 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 filteringstart_period / end_period Unix-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

  1. Obtain your program_id and security_key from the Moti-Physio team.
  2. Open the folder for your preferred language.
  3. Follow the README.md inside that folder to install dependencies and run the sample.
  4. Replace BASE_URL, PROGRAM_ID, and SECURITY_KEY with 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.