Datasources

GET {baseUrl}/datasources
Returns metadata for all datasources belonging to the organization of the caller. The organization is determined by the API key passed in the headers.

Example
https://clarity-data-api.clarity.io/v1/datasources

Headers

  • x-api-key: the API key string.

Request

No querystring parameters for this endpoint

Response

List of datasource metadata

Datasource metadata

attribute description example
datasourceId string unique id of the datasource "4f4563fe43fd9995b9d2620e"
deviceCode string The short ID of the device that produced the Measurement, usually starting with "A". "A0000001"
sourceType string A Clarity device
"CLARITY_NODE"
or government reference site
"REFERENCE_SITE"
"CLARITY_NODE"
name string Optional.
The name assigned to the data source by the organization. If the dataSource is not named, the underlying deviceCode is returned.
"myName"
group string Optional.
The group assigned to the data source by the organization, or null if no group
"myGroup"
tags list of string Optional.
Identifying tages assigned to the data source by the organization
["tag1","tag2"]
subscriptionStatus string "active" or "expired" "active"
subscriptionExpirationDate string When the subscription to this datasource will expire "2028-03-15T00:00:00.000Z"


Example 200 Response

[
    {
        "datasourceId": "4f4563fe43fd9995b9d2620e",
        "deviceCode": "A000001",
        "sourceType": "CLARITY_NODE",
        "name": "my name",
        "group": "group A",
        "tags": ["tag1", "tag2"],
        "subscriptionStatus": "active",
        "subscriptionExpirationDate": "2028-03-15T00:00:00.000Z"
    },
    {
        "datasourceId": "7b4887fe43ad0104b9e2652c",
        "deviceCode": "A000002",
        "sourceType": "CLARITY_NODE",
        "name": "another name",
        "group": "group A",
        "tags": ["tag2"],
        "subscriptionStatus": "active",
        "subscriptionExpirationDate": "2028-03-15T00:00:00.000Z"        
    }        
]