/api/v1/auth/register
Create a first-party email/password account and secure browser session.
- Authentication
- Public
RoboSport developers / web API
Use the implemented first-party account and event-simulation API today, then follow the separately labelled RSDP draft toward production integrations.
The web API is available at https://robosport.live/api/v1. Account and simulator endpoints use a secure same-origin cookie session and do not expose the access JWT to browser code.
Quickstart
bash# 1. Use the deployed RoboSport web API and create an account.
export ROBOSPORT_ORIGIN='https://robosport.live'
curl --fail-with-body --silent --show-error \
--cookie-jar robosport.cookies \
--header "origin: $ROBOSPORT_ORIGIN" \
--header 'content-type: application/json' \
--data '{"display_name":"Pilot","email":"you@example.com","password":"change-me"}' \
"$ROBOSPORT_ORIGIN/api/v1/auth/register"
# 2. Read the readable CSRF companion cookie. The session JWT stays HttpOnly.
CSRF_TOKEN="$(awk '$6 == "rs_csrf" || $6 == "__Host-rs_csrf" {print $7}' robosport.cookies | tail -n 1)"
IDEMPOTENCY_KEY="$(uuidgen | tr '[:upper:]' '[:lower:]')"
# 3. Create a deterministic sandbox run.
curl --fail-with-body --silent --show-error \
--cookie robosport.cookies \
--cookie-jar robosport.cookies \
--header 'content-type: application/json' \
--header "origin: $ROBOSPORT_ORIGIN" \
--header "x-csrf-token: $CSRF_TOKEN" \
--header "idempotency-key: $IDEMPOTENCY_KEY" \
--data '{"scenario_id":"autonomous-sprint","scenario_version":1,"seed":42,"speed":1}' \
"$ROBOSPORT_ORIGIN/api/v1/simulations"bash# Replace SIMULATION_ID and EXPECTED_REVISION with values from create/read.
curl --fail-with-body --silent --show-error \
--cookie robosport.cookies \
--header 'content-type: application/json' \
--header "origin: $ROBOSPORT_ORIGIN" \
--header "x-csrf-token: $CSRF_TOKEN" \
--header "idempotency-key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
--data '{"action":"step","expected_revision":1}' \
"$ROBOSPORT_ORIGIN/api/v1/simulations/SIMULATION_ID/actions"
curl --fail-with-body --silent --show-error \
--cookie robosport.cookies \
"$ROBOSPORT_ORIGIN/api/v1/simulations/SIMULATION_ID/messages?limit=100"Web identity
Passwords establish a first-party RoboSport session. The access JWT and opaque refresh token remain Secure and HttpOnly; applications should use the cookie and CSRF contract rather than reading or storing tokens.
Email/password accounts, rotation, logout, profile, password change and per-browser revocation. New passwords need at least 6 characters; no capitals, numbers or symbols are required.
Producer credentials, API-client scopes and official-source authority are not granted by a normal web account.
/api/v1/auth/registerCreate a first-party email/password account and secure browser session.
/api/v1/auth/loginVerify an account password and issue rotated HttpOnly session cookies.
/api/v1/auth/refreshRotate an eligible browser session without exposing its JWT to JavaScript.
/api/v1/auth/logoutRevoke the current refresh session and clear its cookies.
/api/v1/auth/meRead the current account and browser-session summary.
/api/v1/accountRead the current account profile.
/api/v1/accountUpdate the current account display name.
/api/v1/account/passwordChange the password and revoke other browser sessions.
/api/v1/account/sessionsList revocable browser sessions without returning tokens or IP addresses.
/api/v1/account/sessions/{session_id}Revoke another browser session owned by the account.
Simulation data is synthetic, account-owned and operationally isolated from any future production result. Each account can store 100 runs, with up to 500 recorded actions per run.
Event laboratory
Runs use explicit revisions for controls. Restart creates a new run, while messages and snapshots keep the original run intact.
/api/v1/simulation-scenariosList deterministic event templates available to the signed-in user.
/api/v1/simulationsList private simulation runs owned by the current account.
/api/v1/simulationsCreate an isolated sandbox contest from a versioned scenario and optional seed.
/api/v1/simulations/{simulation_id}Read one owned run, its virtual clock and revision.
/api/v1/simulations/{simulation_id}/actionsStart, pause, resume, step, cancel or restart using optimistic revision checks.
/api/v1/simulations/{simulation_id}/messagesPage through schema-valid synthetic RSDP messages using an opaque cursor.
/api/v1/simulations/{simulation_id}/snapshotRead the current projected sandbox contest and entry state.
Failure contract
Failures use JSON Problem Details. Authentication errors remain generic, validation errors identify correctable fields and private values never appear in responses.
json{
"type": "https://robosport.live/problems/invalid-request",
"title": "Request validation failed",
"status": 400,
"detail": "Review the invalid fields and try again."
}RSDP v0.1 / proposed production service
/v1/competitionsProposed production competition registry read.
/v1/ingest/messagesProposed scoped producer ingestion boundary for one to 1,000 RSDP messages.
/v1/contests/{contest_id}/eventsProposed historical canonical event query and cursor recovery path.
/v1/contests/{contest_id}/resultsProposed versioned result-record query.