Enroll Controller

The following HTTP request method creates a new Controller Device on the CloudPlugs platform and it grants the Controller the permissions allowed by the Thing it will control.

The permissions, Read Only or Read/Write, are granted to the Controller in the Thing or Prototype panel of the CloudPlugs platform web desktop.

The controlled Thing is identified by model (which is the Plug-ID of its Production Template), ctrl (which is its serial number or hwid). The Controller is authenticated by pass, which is the control password associated with the Things serial number in the Thing’s Production Template.

Request

Method

PUT

Base Url

http://api.cloudplugs.com/iot/device

Headers

// No Auth HTTP Headers, if this Controller is enrolling for the first time otherwise X-Plug-Id ; X-Plug-Auth.

Body

 {
   "model" : [PLUG_ID],  // the Production Template of the Thing to be controlled
   "ctrl"  : [String] ,  // The serial number of Production Thing to be controlled
   "pass"  : [String] ,  // The control password associated with Production Thing serial number or CODE
   "hwid"  : [String] ,  // optional, unique string such as a serial number to identify this Controller
   "name"  : [String]    // optional, the name of this device
 }

Response

Status

 201 Created // in case of 1st Enrollment
 200 OK      // in case of additional future enrollments/activation; Note: the Body will be empty

Body

 {
   "id"  : [PLUG_ID] ,
   "auth": [String] 		// receive the Controller's Plug-ID and Connection password
 }
Still need help? Get in touch!
Last updated on 23rd May 2019