Skip to content

Per-Datasource details

GET {baseURl}/v2/datasources/:datasourceId
Detailed datasource information for a single datasource from the point of view of a single organization.

Includes historical information about source devices, subscriptions, and access to measurements. Note that access to measurements requires a source installed in the datasource, a subscription attached to the datasource, and the attached subscription to be active.

If the org requested has the licensed subscription to the datasource, then related shared subscriptions are included in the response.

Example
https://clarity-data-api.clarity.io/v2/datasources/:datasourceId?org=alpha2XF8F

Headers

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

Request

path parameter description
datasourceId string The target datasourceId
Example "DHARP5723"
query parameter description
org string The org identifier of the subscribing organization.

Response

attribute description
datasourceId string The datasourceId.
Example "DHARP5723"
sourceType string Either "CLARITY_NODE" or "REFERENCE_SITE".
currentSourceId string Unique identifier of the device or reference site currently
installed into the datasource.
nameProvidedBySourceOperator string The name of the source, typically only available for reference sites.
openData array Whether and how the datasource appears on OpenMap.
orgAnnotations array Array of org-specific annotations.
sourceHistory array Array of source history.
Details the sources currently and previously
installed into this datasource.
Omitted for reference sites.
accessToMeasurements array Array of time periods during which measurement access has been granted.
Omitted for reference sites.
subscriptionHistory array List of subscriptions that have ever been attached to this datasource.
Omitted for reference sites.

Open Data

attribute description
isOpen bool Whether the datasource is open (i.e. visible publicly on OpenMap).
openName string If the datasource is open, the name it presents
when accessed through open APIs and on OpenMap.
lastOpenedAt string Timestamp when the datasource was last opened.
lastClosedAt string Timestamp when the datasource was last un-opened.

Source History

attribute description
sourceId string Unique identifier of the device or reference site that is/was installed into the datasource.
inDate string Timestamp when the source was first installed in the datasource.
outDate string Timestamp when the source was uninstalled from the datasource (or null if it is still installed).

Org Annotations

attribute description
org string Unique identifier of the org providing these annotations.
name string The name provided by the org.
group string A group to which the org has assigned this datasource.
tags array A list of tags (i.e. arbitrary string) assigned by the org to this datasource.

Access To Measurements

attribute description
subscriptionId string Unique identifier of the subscription providing access.
sourceId string Unique identifier of the device providing measurements during the access period.
accessStart string Timestamp when access began.
accessEnd string Timestamp when access ended, or null if hasn't ended yet.

Subscription History

attribute description
subscriptionId string Unique identifier of the subscription.
subscriptionType string One of "public" (for reference sites), "licensed",
"shared", or "temporary".
timePeriodStart string The beginning timestamp of the subscription.
timePeriodEnd string The ending timestamp of the subscription.

Subscription Attachment History

attribute description
subscriptionId string Unique identifier of the subscription.
subscriptionAttachmentId string Unique identifier of this subscription attachment.
attachmentDate string The beginning timestamp of the attachment.
detachmentDate string The ending timestamp of the attachment.

Example 200 Response

{
    "request": {
        "datasourceId": "DNQPD5647",
        "org": "alpha2XF8F"
    },
    "datasource": {
        "datasourceId": "DNQPD5647",
        "subscriptionAttachmentHistory": [
            {
                "subscriptionId": "SD36DVWR6",
                "attachmentDate": "2021-12-10T00:00:00.000Z",
                "detachmentDate": null,
                "subscriptionAttachmentId": "SD36DVWR6:DNQPD5647:61b2c2b0",
                "org": "alpha2XF8F"
            },
            {
                "subscriptionId": "SU9P13CEW",
                "attachmentDate": "2021-12-10T00:00:00.000Z",
                "detachmentDate": null,
                "subscriptionAttachmentId": "SU9P13CEW:DNQPD5647:61b29880",
                "org": "wxyzstNY4P"
            },
            {
                "subscriptionId": "SMATQB6ER",
                "attachmentDate": "2021-12-10T00:00:00.000Z",
                "detachmentDate": null,
                "subscriptionAttachmentId": "SMATQB6ER:DNQPD5647:61b29880",
                "org": "ghijklADNW"
            }
        ],
        "currentSourceId": "S33J34PL",
        "sourceType": "CLARITY_NODE",
        "subscriptionHistory": [
            {
                "subscriptionId": "SD36DVWR6",
                "subscriptionType": "primary",
                "org": "alpha2XF8F",
                "timePeriodStart": "2021-12-10T00:00:00.000Z",
                "timePeriodEnd": "2023-12-10T00:00:00.000Z"
            },
            {
                "subscriptionId": "SMATQB6ER",
                "subscriptionType": "shadow",
                "org": "ghijklADNW",
                "timePeriodStart": "2021-12-10T00:00:00.000Z",
                "timePeriodEnd": "2023-12-10T00:00:00.000Z"
            },
            {
                "subscriptionId": "SU9P13CEW",
                "subscriptionType": "shadow",
                "org": "wxyzstNY4P",
                "timePeriodStart": "2021-12-10T00:00:00.000Z",
                "timePeriodEnd": "2023-12-10T00:00:00.000Z"
            }
        ],
        "accessToMeasurements": [
            {
                "subscriptionId": "SD36DVWR6",
                "sourceId": "S33J34PL",
                "accessStart": "2021-12-10T00:00:00.000Z",
                "accessEnd": null
            },
            {
                "subscriptionId": "SMATQB6ER",
                "sourceId": "S33J34PL",
                "accessStart": "2021-12-10T00:00:00.000Z",
                "accessEnd": null
            },
            {
                "subscriptionId": "SU9P13CEW",
                "sourceId": "S33J34PL",
                "accessStart": "2021-12-10T00:00:00.000Z",
                "accessEnd": null
            }
        ],
        "sourceHistory": [
            {
                "sourceId": "S33J34PL",
                "inDate": "2021-12-10T00:00:00.000Z",
                "outDate": null
            }
        ],
        "openData": {
            "isOpen": false,
            "openName": null,
            "lastOpenedAt": null,
            "lastClosedAt": null
        },
        "orgAnnotations": [
            {
                "name": "S33J34PL",
                "group": "TEST_GROUP2",
                "tags": [],
                "org": "alpha2XF8F"
            }
        ]
    }
}