Releasesv0.1.0
Read data

Replace the user's orders of sources

PUT
/v1/users/{id}/source-priorities

Replaces every order of the user; {"priorities": {}} goes back to the built-in orders. Source names are lowercased. Stored records are never changed: the orders only decide what the merged view shows.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Request Body

application/json
  1. body
priorities*

Orders of source slugs, best first, keyed by metric, group or *.

Response Body

The orders now in force.

application/json
  1. response
priorities*

Orders of source slugs, best first, keyed by metric, group or *.

defaults*

Orders of source slugs, best first, keyed by metric, group or *.

curl -X PUT 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/source-priorities' \  -H 'Authorization: Bearer ohs_sk_...' \  -H 'Content-Type: application/json' \  -d '{  "priorities": {    "sleep": [      "oura",      "whoop"    ],    "step_count": [      "apple_health"    ]  }}'
{  "priorities": {    "property1": [      "string"    ],    "property2": [      "string"    ]  },  "defaults": {    "property1": [      "string"    ],    "property2": [      "string"    ]  }}
Edit on GitHub