Device Cloud Service Interface

Applications use the TR50-compliant Device Cloud APIs to interface with Device Cloud.

Keys

For many of the commands, the item key is one of the parameters. An item key is a separate field from an item name. The valid characters for a key are letters, numbers, underscore (_), and hyphen (-).

Thing Keys

If you use an application token to connect your client (not user name and password), you can omit the thingKey field in any API call.  

If you do not specify the thing key, Device Cloud uses the thing key from your current session.  You use this behavior to conserve bandwidth because you do not need to resend the thing key with each API call. 

Timestamp and Date Formats

Dates in the APIs are formatted using RFC3339. The RFC3339 format enables reliable transmission of the date and time, as well as timezone information.

The following are examples of Internet date and time format:

  • 1985-04-12T23:20:50.52Z represents 20 minutes, 50 seconds and 52 milliseconds after the 23rd hour of April 12th, 1985 in UTC.

  • 1996-12-19T16:39:57-08:00 represents 39 minutes and 57 seconds after the 16th hour of December 19th, 1996 with an offset of minus eight hours from UTC (Pacific Standard Time). This is equivalent to 1996-12-20T00:39:57Z in UTC.

  • 1990-12-31T23:59:60Z represents the leap second inserted at the end of 1990.

  • 1990-12-31T15:59:60-08:00 represents the same leap second in Pacific Standard Time, 8 hours behind UTC.

  • 1937-01-01T12:00:27.87+00:20 represents the same instant of time as noon, January 1, 1937, Netherlands time. Standard time in the Netherlands is exactly 19 minutes and 32.13 seconds ahead of UTC by law from 1909-05-01 through 1937-06-30. This timezone cannot be represented exactly using the HH:MM format, and this timestamp uses the closest representable UTC offset.

Error Codes

The Management Portal provides a list of error codes with their corresponding error messages. To view the list, on the Developer page, click Error codes.