Create a home
POST/homes
Base URL: https://api.tinkermode.com
Create a home. If the request is made by a user, the user will be automatically added as a member of the home.
If the request is made using the API key of a user who has permission to create homes, or a project API key with "Admin" privileges, the home will be created without any member. (Members must be explicitly added later.)
In either cases, the request body must contain the "name" field.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key.
Request body
Content type: application/json
| 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. | |||||||||||||||||||||
| ||||||||||||||||||||||||
Request example
{
"name": "Home_Base"
}Responses
201 Successfully created a new home.
Content type: application/json
| 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-12-18T19:00:26.512Z",
"id": 1888,
"name": "Home_Base",
"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 invalid data or 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. |