Viviot.Api

<back to all web services

PutThingStates

Requires Authentication
Requires any of the roles:Admin, TenantAdmin, Receptionist
The following routes are available for this service:
PUT/thing/statesUpdates state(s) of individual things (as a business user).
PutThingStates Parameters:
NameParameterData TypeRequiredDescription
ThingIdbodystringYesThing Id (GUID).
StatesbodyList<StateValue>YesList of state names and their values.
PropertiesbodyDictionary<string, string>NoDictionary with key value pairs of all thing properties.
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintegerNoApi version
StateValue Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
ValueformstringNo
ThingStatesResponse Parameters:
NameParameterData TypeRequiredDescription
DataformThingStateViewNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
ThingStateView Parameters:
NameParameterData TypeRequiredDescription
ThingIdformGuidNo
OrganizationIdformGuidNo
PropertiesformDictionary<string, Object>No
StatesformDictionary<string, List<StateValueView>>No
ChildThingsformList<ThingStateView>No

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + 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'.)