Create a Device

Creates a new device for each Serial Number given. When created, devices will be in a pre-registered state awaiting activation.

Serial Number: The serial number is a unique ID assigned to each device, accessible to the activation code running on the device. This ID can be a value generated and programmed into the device during the manufacturing process, or it can be a device specific identity such as a MAC address or processor serial number. At all times, non-consecutive serial numbers should be used so that in the unfortunate case where a product secret is discovered, it is difficult to guess the serial number of other devices. A serial number can be any arbitrary string composed of alphanumeric characters as well as the following characters:
Plus ( + ) Minus ( - ) Comma ( , ) Underscore ( _ ) and Colon ( : )

Note -You can also use the GUI on the Xively Management Console to upload the serial numbers. Look for the “ + Add Serial Numbers” button.

Request

Parameters
Method POST
Base URL https://api.xively.com
API Endpoint /v2/products/PRODUCT_ID_HERE/devices
Headers
X-ApiKey API_KEY_HERE
Body
JSON
XML
CSV
  • POST/v2/products/PRODUCT_ID_HERE/devices

    {
      "devices": [
          {"serial": "abc123"},
          {"serial": "321cba"}
        ]
    }
    
  • XML format not available for this call
    
  • CSV format not available for this call
    

Response

Parameters
Status Code 201 CREATED
Headers
Location https://api.xively.com/v2/products/h5wT2IlOMrd09r_qd1jm/devices
Body
JSON
XML
CSV
  • This response does not contain body data
    
  • XML format not available for this call
    
  • CSV format not available for this call