Get all homes
GET/homes
Base URL: https://api.tinkermode.com
Get a list of homes of a project (by using the projectId parameter), or homes of which a user is a member (by using the userId parameter). Optionally, results can be filtered by keywords. Either the projectId or userId must be specified. To fetch the homes of a project, the request must be made using the API key of a user who has permission to read all homes, or a project API key with "Admin" privileges.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key.
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
limit | integer | No | default: 25; min: 1 | Maximum number of homes to return. |
projectId | integer | No | Return homes of the specified project. | |
search | string | No | Search for homes by keywords. | |
skip | integer | No | default: 0; min: 0 | Number of homes to skip over. |
tenantIdentifier | string | No | Return homes of which have the specified tenant identifier. | |
userId | integer | No | Return homes of which the specified user is a member. |
Responses
200 Successful retrieval of list of homes.
Content type: application/json
Represents a home which contains devices and is managed by one or more users.
An array of objects with the following shape:
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
creationTime | string | No | read-only (server-generated); format: date-time | Timestamp of home creation. | ||||||||||||||||||||
deactivated | boolean | No | True if home has been deactivated by project admin. | |||||||||||||||||||||
id | integer | Yes | read-only (server-generated) | Unique ID assigned at time of creation. | ||||||||||||||||||||
name | string | Yes | Display name of home. | |||||||||||||||||||||
projectId | integer | Yes | read-only (server-generated) | Project that this home belongs to. | ||||||||||||||||||||
tenant | object | No | Tenant information associated with a home. | |||||||||||||||||||||
| ||||||||||||||||||||||||
Response example
[
{
"creationTime": "2019-09-16T22:10:30.384Z",
"id": 1696,
"name": "Home_1",
"projectId": 1260
},
{
"creationTime": "2019-12-17T22:52:13.917Z",
"id": 1885,
"name": "Home_2",
"projectId": 1260
}
]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. |