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

NameTypeRequiredConstraintsDescription
homeIdintegerYesThe unique ID for a specified home.

Query parameters

NameTypeRequiredConstraintsDescription
attributesQuerystringNoA 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 |
catalogIdstringNoReturn data sources of the specified catalogId.
dataTypestringNoReturn data sources of the specified dataType. dataType allows "metrics" and "locations" only.
deviceIdintegerNoReturn data sources of the specified devices.
headersstringNo
intmodConfigIdstringNoReturn data sources of the specified intmodConfigId.
limitintegerNodefault: 25; min: 1Maximum number of data sources to return.
namestringNoReturn 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".
responsesstringNo
skipintegerNodefault: 0; min: 0Number of data sources to skip over.
sortBystringNodefault: "_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

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.