Basic Information

Detailed Information

Report Data

The Device Datatype

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 class Device
{
publicUInt64AccountId; // The AccountId associated with the Message
publicUInt64DeviceId; // A unique identifier for the Device. Use this when making further API calls specific to this device.
publicStringDeviceName; // The name of the device. This will show up on the device's label on the webapp.
publicStringFlagColor; // The color of the label's backdrop on the webapp.
publicStringTextColor; // The color of the label's text on the webapp.
publicDateTime?ActivationDate; // This provides the date the device was Activated, if known.
publicStringIconPath; // This is the relative URL of the device's icon
}

The Device Methods

The following list provides a reference for all valid /Device HTTP requests.

  • GET v1/Device/{id}?account={account}

    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)
  • GET v1/Device?account={account}&after={after}

    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)
  • PUT v1/Device?account={account}

    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)