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

NameTypeRequiredConstraintsDescription
limitintegerNodefault: 25; min: 1Maximum number of homes to return.
projectIdintegerNoReturn homes of the specified project.
searchstringNoSearch for homes by keywords.
skipintegerNodefault: 0; min: 0Number of homes to skip over.
tenantIdentifierstringNoReturn homes of which have the specified tenant identifier.
userIdintegerNoReturn 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:

PropertyTypeRequiredConstraintsDescription
creationTimestringNoread-only (server-generated); format: date-timeTimestamp of home creation.
deactivatedbooleanNoTrue if home has been deactivated by project admin.
idintegerYesread-only (server-generated)Unique ID assigned at time of creation.
namestringYesDisplay name of home.
projectIdintegerYesread-only (server-generated)Project that this home belongs to.
tenantobjectNoTenant information associated with a home.
Properties of tenant
PropertyTypeRequiredConstraintsDescription
agencyAdminAccessControlGroupIdintegerYesread-only (server-generated)ID of the access control group that serves as the agency admin for this tenant.
identifierstringYesread-only (server-generated)Unique identifier for the tenant within the project.
tenantAdminAccessControlGroupIdintegerYesread-only (server-generated)ID of the access control group that serves as the tenant admin for this tenant.

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

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.