Properties provide information about the internal state of a Thing. Several basic operations on properties are defined which can be implemented through a REST API tool or command line tool, such as cURL.
Create property
Create a new thing property.
1. Request
POST /<api-version>/things/<thingId>/properties.<format>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
thingId | x | string | - | Identifier of thing. |
format |
x | string | - |
Request/response format. Currently supported format is json. |
2. Request Body
New property attributes:
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
name | x | string | - | Property name. |
type | x | string | - | Property type: persistent,remote, script. |
dataType | x | string | - | Property data type: string, int, long, float, double, date, boolean, uuid, <type>[], <user_type>. |
nullable | x | boolean | - | True if property value can be set to null. |
private | x | boolean | - | True if property is visible for external calls. |
readOnly | x | boolean | - | True if property is read only. |
description | string | null | Property description. |
3. Response Status
4. Response Body
The string ID of a created property
5. Examples
1. Request
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
thingId | x | string | - | Identifier of a thing. |
property | x | object | - | Property details to create |
→name | x | string | - | Property name. |
→type | x | string | - | Property type: persistent,remote, script. |
→dataType | x | string | - | Property data type: string, int, long, float, double, date, boolean, uuid, <type>[], <user_type>. |
→nullable | x | boolean | - | True if property value can be set to null. |
→private | x | boolean | - | True if property is visible for external calls. |
→readOnly | x | boolean | - | True if property is read only. |
→description | string | null |
Property description. |
2. Response
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
id | string | null | Request identifier specified in request | |
result |
x | string | - |
Created property ID |
3. Example
Get property details
Get property information by the ID.
1. Request
GET /<api-version>/things/<thingId>/properties/<propertId>.<format>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
format |
x | string | - |
Request/response format. Currently supported format is json. |
2. Response Status
3. Response Body
Property attributes:
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | x | string | - | Identifier of a property. |
name | x | string | - | Property name. |
type | x | string | - | Property type: persistent,remote, script. |
dataType | x | string | - | Property data type: string, int, long, float, double, date, boolean, uuid, <type>[], <user_type>. |
nullable | x | boolean | - | True if property value can be set to null. |
private | x | boolean | - | True if property is visible for external calls. |
readOnly | x | boolean | - | True if property is read only. |
description | string | null |
Property description. |
4. Examples
1. Request
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
2. Response
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
result | object | null | Property details | |
→id | x | string | - | Identifier of a property. |
→name | x | string | - | Property name. |
→type | x | string | - | Property type: persistent,remote, script. |
→dataType | x | string | - | Property data type: string, int, long, float, double, date, boolean, uuid, <type>[], <user_type>. |
→nullable | x | boolean | - | True if property value can be set to null. |
→private | x | boolean | - | True if property is visible for external calls. |
→readOnly | x | boolean | - | True if property is read only. |
→description | string | null |
Property description. |
3. Example
Get properties
Obtain list of a properties.
1. Request
GET /<api-version>/things/<thingId>/properties.<format>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
thingId | x | string | - | Identifier of thing. |
format |
x | string | - |
Request/response format. Currently supported format is json. |
2. Response Status
3. Response Body
Array with property information:
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | x | string | - | Property Id. |
name | x | string | - | Property name. |
type | x | string | - | Property type: persistent,remote, script. |
dataType | x | string | - | Property data type: string, int, long, float, double, date, boolean, uuid, <type>[], <user_type>. |
nullable | x | boolean | - | True if property value can be set to null. |
private | x | boolean | - | True if property is visible for external calls. |
readOnly | x | boolean | - | True if property is read only. |
description | string | null | Property description. |
4. Examples
1. Request
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
thingId | x | string | - | Identifier of a thing. |
2. Response
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
result | x | array | null | Array of properties |
→id | x | string | - | Property Id. |
→name | x | string | - | Property name. |
→type | x | string | - | Property type: persistent,remote, script. |
→dataType | x | string | - | Property data type: string, int, long, float, double, date, boolean, uuid, <type>[], <user_type>. |
→nullable | x | boolean | - | True if property value can be set to null. |
→private | x | boolean | - | True if property is visible for external calls. |
→readOnly | x | boolean | - | True if property is read only. |
→description | string | null | Property description. |
3. Example
Get property value
Get property value.
1. Request
GET /<api-version>/things/<thingId>/properties/<propertyId>/value.<format>?cached=<cached>&ignoreNulls=<ignore_nulls>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
format |
x | string | - |
Request/response format. Currently supported format is json. |
cached | x | boolean | false | Use last server cached value |
ignoreNulls | x | boolean | true | Skip null-value attributes |
2. Response Status
3. Response Body
Property value.
4. Examples
1. Request
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
cached | boolean | false | Use last server cached value | |
ignoreNulls | boolean | true | Skip null-value attributes |
2. Response
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
result | object | null | Property value |
3. Example
Get values of all properties
Get value of all thing properties.
1. Request
GET /<api-version>/things/<thingId>/properties/values.<format>?cached=<cached>&ignoreNulls=<ignore_nulls>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
x | string | - |
Identifier of a thing. |
|
format |
x | string | - |
Request/response format. Currently supported format is json. |
cached | boolean | false | Use last server cached value | |
ignoreNulls | boolean | true | Skip null-value attributes |
2. Response Status
3. Response Body
PropertyId-Value map.
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
propertyId | x | string | - | Identifier of a property. |
value | x | object | null | Property value |
4. Examples
1. Request
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
x | string | - |
Identifier of a thing. |
|
cached | x | boolean | false | Use last server cached value |
ignoreNulls | x | boolean | true | Skip null-value attributes |
2. Response
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
result | object | null | Map of propertyId-value | |
→propertyId | x | string | - | Property Id. |
→value | x | object | - | Property value. |
3. Example
Set property value
Set property value.
1. Request
PUT /<api-version>/things/<thingId>/properties/<propertyId>/value.<format>?async=<async>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
format |
x | string | - |
Request/response format. Currently supported format is json. |
async | boolean | false | Asynchronous execution flag. |
2. Request Body
Property value.
3. Response Status
4. Examples
1. Request
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
async | boolean | false | Asynchronous execution flag. | |
value | x | object | - | Property value. |
2. Response
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client |
3. Example
Delete property
Delete property.
1. Request
DELETE /<api-version>/things/<thingId>/properties/<propertyId>.<format>
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
api-version |
x | string | - |
API version. Currently v1. |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
format |
x | string | - |
Request/response format. Currently supported format is json. |
2. Response Status
3. Examples
1. Request
Attribute | Required | Type | Default | Description |
---|---|---|---|---|
id | string | null | Request identifier established by the client | |
x | string | - |
Identifier of a thing. |
|
propertyId | x | string | - | Identifier of a property. |
2. Response
Attribute | Required | Type | Default | Information |
---|---|---|---|---|
id | string | null | Request identifier established by the client |
3. Example