Releasesv0.1.0
Api referenceEndpointsFhir

The devices the user's records came from, as FHIR R4 Devices

GET
/v1/users/{id}/fhir/Device

A searchset Bundle of the devices named by the provenance of the user's quantity samples, sleep sessions and workouts whose time is in the window, each once, in one page (no next link). Unbounded, it reads the provenance of every record of the user: pass start and end on a large history. cursor and limit are a 400.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid

Query Parameters

start?|

Inclusive lower bound, RFC 3339 or YYYY-MM-DD.

end?|

Exclusive upper bound, RFC 3339 or YYYY-MM-DD. Must not be before start.

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

Every device of the window.

application/fhir+json
  1. response

A FHIR R4 searchset Bundle of Devices, one page.

resourceType*string
type*string
link*array<>
entry?array<>

Absent when there is none.

curl -X GET 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/fhir/Device' \  -H 'Authorization: Bearer ohs_sk_...'
{  "resourceType": "Bundle",  "type": "searchset",  "link": [    {      "relation": "self",      "url": "http://example.com"    }  ],  "entry": [    {      "fullUrl": "http://example.com",      "resource": {        "resourceType": "Device",        "id": "dev-4cd59d3e7b09cd28",        "meta": {          "source": "http://example.com",          "profile": [            "http://example.com"          ],          "tag": [            {              "system": "http://example.com",              "code": "string",              "display": "string"            }          ]        },        "identifier": [          {            "system": "http://example.com",            "value": "string"          }        ],        "deviceName": [          {            "name": "string",            "type": "model-name"          }        ],        "modelNumber": "string",        "patient": {          "reference": "Patient/3f0c2f8e-8b8a-4c55-9f5e-2b0f3a1d9c11",          "identifier": {            "system": "http://example.com",            "value": "string"          },          "display": "string"        }      },      "search": {        "mode": "match"      }    }  ]}
Edit on GitHub