The Device methods allows you to access and manipulate Devices associated with your account.
The following datatype will be JSONified and returned for methods which retrieve Device values. Method requests which update existing Devices will be parsed for a JSON representation of this data structure.
When modifying an existing Device, please set the AccountId to 0, or your AccountId as returned by the /Account method. Any other value will result in an Authentication error.
public | UInt64 | AccountId; | // The AccountId associated with the Message |
public | UInt64 | DeviceId; | // A unique identifier for the Device. Use this when making further API calls specific to this device. |
public | String | DeviceName; | // The name of the device. This will show up on the device's label on the webapp. |
public | String | FlagColor; | // The color of the label's backdrop on the webapp. |
public | String | TextColor; | // The color of the label's text on the webapp. |
public | DateTime? | ActivationDate; | // This provides the date the device was Activated, if known. |
public | String | IconPath; | // This is the relative URL of the device's icon |
The following list provides a reference for all valid /Device HTTP requests.
Summary: Returns a device row for the given ID
Returns: Device row
Parameters:
- id: Device ID (FromUri)
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)
Summary: Returns device rows for all devices associated with the account
Returns: Device rows (JSON)
Parameters:
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)
- after: (Optional) If this parameter is included, results will be limited to devices known to be activated after the provided date. (FromUri)
Summary: Update device with new DeviceName, FlagColor, and/or TextColor POST data: DeviceName(string), FlagColor(string, six hex characters), TextColor(string, six hex characters)
Returns: Device row (JSON)
Parameters:
- ToUpdate: A JSONified Device object, representing the record to update as it should be updated. (FromBody)
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)