Fill a user of a tenant with synthetic data (instance admin)
What ohs seed --demo --tenant does: the tenant's user with external_ref is reused, or
created, and days days of made-up data from the persona's sources (six for mix), ending
yesterday, are written for it. Every record is marked {"synthetic": true}. Running it again
adds nothing for the days already there. Takes a few seconds for 90 days. Recorded as
data.write in the caller's audit log and in the tenant's. See docs/demo.md.
tenantKeyAuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
tenant_id*stringThe id of a tenant; any other value is a 404.
uuidapplication/json- body
external_ref?stringThe user to fill, created when the tenant has none with this reference. By default
demo-user for mix and demo-<persona> for the others, so each persona fills its own.
1 <= length <= 255days?integerDays of data, ending yesterday.
1 <= value <= 9030persona?stringThe kind of person: mix (one person seen through six sources), runner (polar, whoop,
apple_health), sleep (a short, irregular sleeper: oura, apple_health) or weight
(someone watching their weight: withings, fitbit). See docs/demo.md.
"mix""mix""runner""sleep""weight"The user existed; the days it lacked were written.
application/json- response
user*days*integerrows_written*integerRows this call stored; 0 when every day was already there.
persona*stringThe persona written.
"mix""runner""sleep""weight"curl -X POST 'http://localhost:8080/v1/admin/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/demo-user' \ -H 'Authorization: Bearer ohs_sk_...' \ -H 'Content-Type: application/json' \ -d '{}'{ "user": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "external_ref": "string", "status": "active", "created_at": "2019-08-24T14:15:22Z" }, "days": 0, "rows_written": 0, "persona": "mix"}