API: Devices¶
Make sure to read the API Overview before reading this document.
Retrieving a List of Devices¶
Required Variables¶
| Variable | Description |
|---|---|
| section | Must be set to devices. |
| action | Must be set to retrieve. |
| api_key | Must be set to your unique API key. |
Optional Variables¶
| Variable | Description |
|---|---|
| device_id | An integer or set of integers specifying the set of device IDs you would like us to list. You can specify a single integer or a comma-separated list of integers (Examples: 1005 or 1005, 1010, 1254). You can also use the keyword all to include all devices. This parameter is set to all by default. |
Response¶
After we receive these variables, we will respond with raw XML containing status and device information.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<status>1</status>
<device id="73">
<udid>cb7e743cf62bc79278890a66e4188afc54670753</udid>
<devicename>John's Device</devicename>
<created>2009-11-30 11:28:20</created>
</device>
</xml>
Editing a Device¶
Required Variables¶
| Variable | Description |
|---|---|
| section | Must be set to devices. |
| action | Must be set to update. |
| api_key | Must be set to your unique API key. |
| device_id | An integer which specifies the particular device ID you'd like to edit. |
| device_name | A string which specifies what you'd like to rename the device you're editing. |
Response¶
If your device is successfully edited after we receive these variables, we will respond with raw XML containing a status of 1.
Example: