Get key-value pairs
GET/homes/{homeId}/kv
Base URL: https://api.tinkermode.com
Get all key-value pairs stored for the specified home.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user, service account, or project API key.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
homeId | integer | Yes | The unique ID for a specified home. |
Query parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
keyPrefix | string | No | If specified, only items with keys containing the prefix are returned. |
Responses
200 An array of key-value pair objects are returned.
Content type: application/json
A key-value pair stored for a home.
An array of objects with the following shape:
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
key | string | No | read-only (server-generated); pattern: ^[a-zA-Z0-9]([a-zA-Z0-9\-_\:]*[a-zA-Z0-9])*$ | Must be unique within each home. Must 1 to 256 characters and must contain alphanumeric characters; dashes ('-'), underscores ('_') and colons (':') may be used after the first character but must be followed by 1+ alphanumeric characters. |
modificationTime | string | No | read-only (server-generated); format: date-time | Timestamp of creation or last modification. |
value | boolean | string | number | array | object | Yes | An arbitrary piece of data assigned to the given key. |
Response example
[
{
"key": "happy",
"modificationTime": "2020-01-02T23:18:16.915Z",
"value": true
},
{
"key": "neutral",
"modificationTime": "2020-01-02T23:17:39.852Z",
"value": false
},
{
"key": "clicks",
"modificationTime": "2020-01-02T23:18:21.383Z",
"value": 100
}
]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. |