POST api/v1/bttn/Pressed
Handle bt.tn web request. To use this, add a HTTP Action HTTP Method: POST Agruments: Format: application/json Example Body: { "Message":"Button Pressed" } Posts a "Button Pressed" message onto the timelie Example Body: { "Name":"@lt;NAME@gt;" "DeviceId":"@lt;DEVICEID@gt;" "Counter":"@lt;COUNTER@gt;" "EventType":"@lt;ETYPE@gt;" "CounterPressed":"@lt;COUNTERP@gt;" "CounterLongPressed":"@lt;COUNTERL@gt;" "CounterNotPressed"::"@lt;COUNTERN@gt;" } Sets device measurements for counter, counter pressed, counter long pressed and counter not pressed. Http Authentication: Yes. Use your desired device login.
Request Information
URI Parameters
None.
Body Parameters
BttnPressedDto| Name | Description | Type | Additional information |
|---|---|---|---|
| Message |
Enter a status message to post to the timeline. This can be used to trigger notifications You can use any of the bttn tags (See https://bttn.freshdesk.com/support/solutions/articles/5000671123-tags-explained) Leave empty to not post a status message when the button is pressed. Example: Message:"Button Pressed. Count = <COUNTER>. Button: <ID>" |
string |
None. |
| Name |
Example "Name":"@lt;NAME@gt;" Passes in the buttons name (e.g. bttn 1668) |
string |
None. |
| Id |
Example "Id":"@lt;ID@gt;" Passes in the buttons short id (e.g. 1668) |
string |
None. |
| DeviceId |
Example "DeviceId":"@lt;DEVICEID@gt;" Passes in the buttons device id (e.g. 0013950007827455) |
string |
None. |
| Counter |
Example "Counter":"@lt;COUNTER@gt;" Passes in the buttons counter (e.g. 3), this is then recorded as a measurement |
integer |
None. |
| EventType |
Example "EventType":"@lt;ETYPE@gt;" Passes in the buttons device id (e.g. 0013950007827455) |
string |
None. |
| CounterPressed |
Example "CounterPressed":"@lt;COUNTERP@gt;" Passes in the buttons pressed counter (e.g. 3), this is then recorded as a measurement |
integer |
None. |
| CounterLongPressed |
Example "CounterLongPressed":"@lt;COUNTERL@gt;" Passes in the buttons long pressed counter (e.g. 3), this is then recorded as a measurement |
integer |
None. |
| CounterNotPressed |
Example "CounterNotPressed":"@lt;COUNTERN@gt;" Passes in the buttons not-pressed counter (e.g. 3), this is then recorded as a measurement |
integer |
None. |
Request Formats
application/json, text/json, application/senml+json
{
"Message": "sample string 1",
"Name": "sample string 2",
"Id": "sample string 3",
"DeviceId": "sample string 4",
"Counter": 1,
"EventType": "sample string 5",
"CounterPressed": 1,
"CounterLongPressed": 1,
"CounterNotPressed": 1
}
application/xml, text/xml
<BttnPressedDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Bttn.Models.BttnPressed"> <Counter>1</Counter> <CounterLongPressed>1</CounterLongPressed> <CounterNotPressed>1</CounterNotPressed> <CounterPressed>1</CounterPressed> <DeviceId>sample string 4</DeviceId> <EventType>sample string 5</EventType> <Id>sample string 3</Id> <Message>sample string 1</Message> <Name>sample string 2</Name> </BttnPressedDto>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml, application/senml+json
Sample not available.