Get all data sources
GET/homes/{homeId}/dataSources
Base URL: https://api.tinkermode.com
Get the list of data sources of a home. Data sources are represented as data generated sources such as sensors, Web APIs, databases, and so on. It's used for enabling sensors on gateways and accepting requests from data sources to the MODE Cloud.
Authentication
This endpoint does not require authentication.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
homeId | integer | Yes | The unique ID for a specified home. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
attributesQuery | string | No | A filter string starting with a conjunction. Supported conjunctions are AND()
and OR(). A conjunction takes a comma-separated condition string like AND (group==="group_1",maxSpeed<5). Each condition string defines a filter for the
attribute value. The left-hand side must be a valid attribute field name. The
right-hand side must be a value condition. For example, group==="group_1" matches
any records where the group attribute value exactly matches "group_1".
Supported operators are following
| Operator | |
| --- | --- |
| === | exact match |
| == | substring match |
| ~== | included in array as exact match. name~==["john"|"jeff"|"jack"] matches one of the three. |
| ~= | included in array as substring match. name~=["j"|"e"] matches "john", "jeff", "jack", and "ethan". |
| < | less than |
| <= | less than or equal to |
| > | greater than |
| >= | greater than or equal to |
| |
catalogId | string | No | Return data sources of the specified catalogId. | |
dataType | string | No | Return data sources of the specified dataType. dataType allows "metrics" and "locations" only. | |
deviceId | integer | No | Return data sources of the specified devices. | |
headers | string | No | ||
intmodConfigId | string | No | Return data sources of the specified intmodConfigId. | |
limit | integer | No | default: 25; min: 1 | Maximum number of data sources to return. |
name | string | No | Return data sources of the specified name. If specified, the request will return all data sources whose names match the given name exactly or contain the specified name as a substring. For example, if the value "name=example" is provided, the request will return all data sources with names like "example", "my-example", or "example-source". | |
responses | string | No | ||
skip | integer | No | default: 0; min: 0 | Number of data sources to skip over. |
sortBy | string | No | default: "_id:asc" | A comma-delimited list of sort keys and their respective orders. The format is field1:order1,field2:order2. field refers to either a data source field name or a data source attribute name. order can be either asc or desc. The default order is ascending if not specified. Multiple fields can be specified. Colons can be used within field names. Example query name:asc,attributes.model:desc,device:location:lat:desc. |
Responses
200 A list of dataSource objects are returned in the response body.
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. |
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. |