Specification of the example partner portal hosted on https://portal.partner.com

Server
portal.partner.com
Server Variables

GetURL

This acts as a portal's device-facing endpoint (this will be called only if you passed 'completeUrl': 'https://portal.partner.com/GetURL' in AssignDevice flexa registry endpoint)

NOTE: You can even use a static json file with the response format.

Auth
Query String
regIdstring

Device's registration ID (example - rd7JmLGdg5Rr)

GET /GetURL
Copy
Responses application/json
200

Success

objectobject
packageUrlstring

URL pointing to current version of the flexa package

versioninteger

Version of the current flexa package (this is used to determine if device needs to update)

dataobject

Any extra parameters (These will be pulled from portal on every boot of the device)

setStatusUrlstring

URL denoted with request method (GET/POST) to the SetStatus endpoint, to which the device will push it's state every x hours (this is defined in SetStatus itself)

getConfigUrlstring

URL denoted with request method (GET/POST) to the GetConfig endpoint, from where the device will pull it's config if needed (this is defined in SetStatus endpoint)

apiVersionnumber

API version of the portal, currently defined version is 2

400

Failed

Response
Copy

GetURL

This acts as a portal's device-facing endpoint (this will be called only if you passed 'url': 'https://portal.partner.com' in AssignDevice flexa registry endpoint)

Auth
Request Body application/json
objectobject
regIdstring

Device's registration ID

DeviceInfoobject

Device info in form [name]:[value]

POST /GetURL
Copy
Responses application/json
200

Success

objectobject
packageUrlstring

URL pointing to current version of the flexa package

versioninteger

Version of the current flexa package (this is used to determine if device needs to update)

dataobject

Any extra parameters (These will be pulled from portal on every boot of the device)

setStatusUrlstring

URL denoted with request method (GET/POST) to the SetStatus endpoint, to which the device will push it's state every x hours (this is defined in SetStatus itself)

getConfigUrlstring

URL denoted with request method (GET/POST) to the GetConfig endpoint, from where the device will pull it's config if needed (this is defined in SetStatus endpoint)

apiVersionnumber

API version of the portal, currently defined version is 2

400

Failed

Response
Copy

SetStatus

Endpoint for posting device's status to the portal

Auth
Query String
regIdstring

Device's registration ID (example - rd7JmLGdg5Rr)

statusstring

Device's status (example - Alive)

GET /SetStatus
Copy
Responses application/json
200

Success

objectobject
configstring

Three values are posible, 'new' - new config is available and the device should call GetConfig script; 'sync' - config is synchronized, no action needed; 'reboot' - new version of the application package is available on the cloud, so the device should perform reboot and update

400

Failed

Response
Copy

SetStatus

Endpoint for posting device's status to the portal

Auth
Request Body application/json
objectobject
regIdstring

Device's registration ID

statusstring

Device's status

infoobject

Any other extra parameters about the current status

POST /SetStatus
Copy
Responses application/json
200

Success

objectobject
configstring

Three values are posible, 'new' - new config is available and the device should call GetConfig script; 'sync' - config is synchronized, no action needed; 'reboot' - new version of the application package is available on the cloud, so the device should perform reboot and update

400

Failed

Response
Copy

GetConfig

Endpoint for posting device's status to the portal

Auth
Query String
regIdstring

Device's registration ID (example - rd7JmLGdg5Rr)

GET /GetConfig
Copy
Responses application/json
200

Success

objectobject
UpdateRateinteger

Indicates how many hours to wait between contacting the portal (SetStatus endpoint)

AppParamobject

Device's desired configuration

400

Failed

Response
Copy

GetConfig

Endpoint for getting the desired config by the device

Auth
Request Body application/json
objectobject
regIdstring

Device's registration ID

DeviceInfoobject

Device info in form [name]:[value]

POST /GetConfig
Copy
Responses application/json
200

Success

objectobject
UpdateRateinteger

Indicates how many hours to wait between contacting the portal (SetStatus endpoint)

AppParamobject

Device's desired configuration

400

Failed

Response
Copy