The Sources endpoint returns the synchronization status of the different sources that a specific user has connected.

Returns a sources array
GET https://api.humanapi.co/v1/human/sources

# Returns a json object of sources:
// example
[
	{
    "id": "551ac6ef15eab1445e527c64",
    "source": "55a83bdc8d1eb1420aa1a71b",
    "sourceName": "Starfleet Medical",
    "supportedDataTypes": [
    ], // deprecated supportedDataTypes property
    "devices": [
			"55a83bdc8d1eb1420aa1a71b"
    ], // deprecated devices property 
    "connectedSince": "2018-07-20T21:07:13.136Z",
    "historySync": {
        "status": "completed",
        "oldestDate": "2015-03-21T00:00:00.000Z"
    },
    "organization": {
      "href": "/medical/organizations/55a83bdc8d1eb1420aa1a71b",
      "id": "55a83bdc8d1eb1420aa1a71b",
      "name": "Starfleet Medical"
    },
    "resync" : {
      "active" : true
    },
    "syncStatus": {
        "status": "ok",
        "details" : "ok",
        "synchedAt": "2018-07-20T21:07:13.136Z",
        "newestDate": "2018-04-20T19:06:11.151Z"
    }
  }
]
# Get sources measurement associated with the user
curl -H "Authorization: Bearer demo" "https://api.humanapi.co/v1/human/sources"

Response Properties

PropertyTypeDescription
sourceStringName or id of the connected source (all lowercase, no spaces)
supportedDataTypesArray[String](Deprecated) List of data types supported by the source
devicesArray[String](Deprecated) List of devices or medical source id (when available)
idStringNon-unique id for an external data account
connectedSinceDateDate that the source was connected to Human API
sourceNameStringName of source
historySyncObjectSee historySync object
syncStatusObjectSee syncStatus object
resyncObject(optional) See resync object
organizationObjectSee organization object

historySync Object

PropertyTypeDescription
statusStringStatus of the historical sync
oldestDateDateOldest date of the data retrieved from the service

📘

For some services, oldestDate is just an indication of how far back the synchronization tasks attempted to retrieve data.

syncStatus Object

PropertyTypeDescription
statusStringStatus of the most recent sync
synchedAtDateThe last time the synchronization task ran for this user
newestDateDate(Deprecated) The timestamp of the most recently retrieved data
detailsString(optional) Identifies details about the status property when appropriate

resync Object

PropertyTypeDescription
activeBooleanIdentifies if the medical provider source in general has continuous capability (note: does not identify if this connected account will re-sync)