POST api/v1/bots/virtualdevicebots
Register a LifxBot
Request Information
URI Parameters
None.
Body Parameters
AddVirtualDeviceBotName | Description | Type | Additional information |
---|---|---|---|
AddDefaultDevices | boolean |
None. |
Request Formats
application/json, text/json, application/senml+json
Sample:
{ "AddDefaultDevices": true }
application/xml, text/xml
Sample:
<AddVirtualDeviceBot xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots.VirtualDeviceBot"> <AddDefaultDevices>true</AddDefaultDevices> </AddVirtualDeviceBot>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
VirtualDeviceBotDtoName | Description | Type | Additional information |
---|---|---|---|
Id |
User Id |
globally unique identifier |
None. |
Name |
The users name |
string |
None. |
UserName |
UserName (used to login with) |
string |
None. |
FullUserName |
User Id and Account name |
string |
None. |
BotType |
The type of bot. |
string |
None. |
DisplayName |
Users first and last name |
string |
None. |
DevicesCheckIntervalMinutes |
How often the spark account should be checked for new devices. |
integer |
None. |
MeasurementCollectionIntervalMinutes |
How often measurements should be collected from the devices (applies to new devices only). |
integer |
None. |
Links |
Collection of links appropriate for the user |
Collection of LinkDto |
None. |
Actions | Collection of LinkDto |
None. |
|
Description | string |
None. |
|
Enabled | boolean |
None. |
|
Authenticated |
If the bot is authenticated. |
boolean |
None. |
Response Formats
application/json, text/json, application/senml+json
Sample:
{ "Id": "18313012-ac6f-4780-9dc3-1938c4f5ccce", "Name": "sample string 2", "UserName": "sample string 3", "FullUserName": "sample string 4", "BotType": "sample string 5", "DisplayName": "sample string 6", "DevicesCheckIntervalMinutes": 7, "MeasurementCollectionIntervalMinutes": 8, "Links": [ { "Href": "sample string 1", "Rel": "sample string 2", "Action": "sample string 3" }, { "Href": "sample string 1", "Rel": "sample string 2", "Action": "sample string 3" } ], "Actions": [ { "Href": "sample string 1", "Rel": "sample string 2", "Action": "sample string 3" }, { "Href": "sample string 1", "Rel": "sample string 2", "Action": "sample string 3" } ], "Description": "sample string 9", "Enabled": true, "Authenticated": true }
application/xml, text/xml
Sample:
<VirtualDeviceBotDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots.VirtualDeviceBot"> <Actions xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots"> <d2p1:LinkViewModel> <d2p1:Action>sample string 3</d2p1:Action> <d2p1:Href>sample string 1</d2p1:Href> <d2p1:Rel>sample string 2</d2p1:Rel> </d2p1:LinkViewModel> <d2p1:LinkViewModel> <d2p1:Action>sample string 3</d2p1:Action> <d2p1:Href>sample string 1</d2p1:Href> <d2p1:Rel>sample string 2</d2p1:Rel> </d2p1:LinkViewModel> </Actions> <Authenticated xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">true</Authenticated> <BotType xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 5</BotType> <Description xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 9</Description> <DevicesCheckIntervalMinutes xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">7</DevicesCheckIntervalMinutes> <DisplayName xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 6</DisplayName> <Enabled xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">true</Enabled> <FullUserName xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 4</FullUserName> <Id xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">18313012-ac6f-4780-9dc3-1938c4f5ccce</Id> <Links xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots"> <d2p1:LinkViewModel> <d2p1:Action>sample string 3</d2p1:Action> <d2p1:Href>sample string 1</d2p1:Href> <d2p1:Rel>sample string 2</d2p1:Rel> </d2p1:LinkViewModel> <d2p1:LinkViewModel> <d2p1:Action>sample string 3</d2p1:Action> <d2p1:Href>sample string 1</d2p1:Href> <d2p1:Rel>sample string 2</d2p1:Rel> </d2p1:LinkViewModel> </Links> <MeasurementCollectionIntervalMinutes xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">8</MeasurementCollectionIntervalMinutes> <Name xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 2</Name> <UserName xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 3</UserName> </VirtualDeviceBotDto>