Get a data source
GET/homes/{homeId}/dataSources/{dataSourceKey}
Base URL: https://api.tinkermode.com
Return the data source with the specified key.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
homeId | integer | Yes | The unique ID for a specified home. | |
dataSourceKey | string | Yes | A compound key consisted catalogId, sourceId, and deviceId with the separator :: e.g. bu01::a4dd89297bfd::1234. The device ID is optional when the data source is associated with integration module e.g. heartbeat::sensor-1 or heartbeat::sensor-1::0 |
Responses
200 Successfully retrieved data source with specified key.
Content type: application/json
| Property | Type | Required | Constraints | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attributes | object | No | Optional/informational key-values associated with device. Can be used to store the serial number, for example. | ||||||||||||||||
catalogId | string | Yes | read-only (server-generated) | Data Source Catalog ID. | |||||||||||||||
createdAt | string | No | read-only (server-generated); format: date-time | Timestamp of data source creation. | |||||||||||||||
dataTypes | array<string> | No | read-only (server-generated) | Data types of the data source. It must be one of the supported data types: metrics, locations, and customLog. These values are annotations for filtering data sources in data route panel. | |||||||||||||||
deliveryPolicy | string | No | one of: buffered, unbuffered | The deliveryPolicy field of the dataSource object configures the data transmission method utilized by the Gateway. When the deliveryPolicy is set to buffered, the Gateway ensures guaranteed delivery of data. In the absence of this setting, the Gateway operates in a best effort delivery, which does not guarantee delivery but minimizes delays. This field is enabled only when the dataSource object includes a deviceId. If this field is not specified, the system defaults to the buffered setting. | |||||||||||||||
deviceId | number | No | The device ID is associated with the catalogId and sourceId. The specified device ID must be attached to a home. The device ID is optional when the sourceId is a data source of integration module. | ||||||||||||||||
enabled | boolean | No | The flag indicates whether the data source is enabled. | ||||||||||||||||
homeId | integer | Yes | read-only (server-generated) | Home that this data source belongs to. | |||||||||||||||
imageData | object | No | Metadata used for the uploaded image of the data source. | ||||||||||||||||
| |||||||||||||||||||
multi | boolean | No | read-only (server-generated) | The flag indicates whether the data source can attach to the multiple routings. | |||||||||||||||
name | string | Yes | Display name of data source. | ||||||||||||||||
projectId | integer | Yes | read-only (server-generated) | Project that this data source belongs to. | |||||||||||||||
sourceId | string | Yes | read-only (server-generated) | Unique Data Source ID. | |||||||||||||||
updatedAt | string | No | read-only (server-generated); format: date-time | Timestamp of the last update on the data source. | |||||||||||||||
Response example
{
"attributes": {
"manufacturer": "MODE, inc.",
"serial": "0000001234"
},
"catalogId": "bu01",
"createdAt": "2021-09-02T22:19:39Z",
"dataType": "metrics",
"deviceId": 1234,
"enabled": true,
"homeId": 1234,
"imageData": {
"fileName": "thumbnail.png",
"url": "https://example.com/images/thumbnail.png"
},
"multi": false,
"name": "Sensor 1",
"projectId": 1234,
"sourceId": "a3b2ac399abc",
"updatedAt": "2021-09-02T22:19:39Z"
}401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
404 The requested dataSource does not exist or is not accessible.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |