| Requires any of the roles: | Admin, TenantAdmin, Receptionist |
| PUT | /thing/states | Updates state(s) of individual things (as a business user). |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ThingId | body | string | Yes | Thing Id (GUID). |
| States | body | List<StateValue> | Yes | List of state names and their values. |
| Properties | body | Dictionary<string, string> | No | Dictionary with key value pairs of all thing properties. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Name | form | string | No | |
| Value | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | ThingStateView | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ThingId | form | Guid | No | |
| OrganizationId | form | Guid | No | |
| Properties | form | Dictionary<string, Object> | No | |
| States | form | Dictionary<string, List<StateValueView>> | No | |
| ChildThings | form | List<ThingStateView> | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /thing/states HTTP/1.1
Host: api.4spaces.io
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'PutThingStates' using the custom 'csv' filter}One or more errors occurred. (Unable to cast object of type 'ServiceStack.Host.BasicResponse' to type 'ServiceStack.Host.NetCore.NetCoreResponse'.)
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{Unable to show example output for type 'ThingStatesResponse' using the custom 'csv' filter}One or more errors occurred. (Unable to cast object of type 'ServiceStack.Host.BasicResponse' to type 'ServiceStack.Host.NetCore.NetCoreResponse'.)