App Developers

Overview

Welcome to People Power Platform API documentation. Here you will find all the details about the REST based APIs for interfacing with People Power Cloud Services. The APIs can be used to develop client UIs or applications based on People Power Platform cloud services.

APIs are categorized into several groups (see bottom of the page).

Below is some general information related to all APIs. You can use the side bar on the left to navigate to your point of interest.

Result codes

All API methods will return a result code 0 if the call was successful or will contain an error code. Here is a list of all result codes. First 10 are common to all API methods. The rest of the error codes are specific to each API and are described in below and in their respective sections.

Result code Description
0 successful
1 internal error
2 wrong API key
3 wrong location ID or location is not relater to the user
4 wrong device ID or device has not been found
5 device command proxy (gateway) has not been found
6 object not found
7 access denied
8 wrong parameter value
9 missed mandatory parameter value
10 no available device resources to complete operation
12 invalid username or wrong password
13 wrong index value
14 error in parsing of input data
15 wrong consumer ID
16 wrong consumer type ID
17 wrong activation key
18 wrong rule schedule format
19 wrong rule ID
20 duplicate user name
21 device is offline or disconnected
22 device is under different location
23 analytic rule generation error
24 wrong device registration code
26 duplicate entity or property
27 timeout in device communication
28 device is not linked to any location

URI format


Requests must be send to feed URI’s in the next format:
{URI prefix}/{method name}/{parameter value #1}/{parameter value #2}/…/{parameter value #N}?{optional parameters}

JSON format support


The default format of response is in XML. But JSON is supported as well. To get JSON output simply include the string "/json/" in the URI prefix before the method name.
Example: **/espapi/rest/json/login/username@ppc.com/password/14/1
All JSON POST methods expect input data in JSON format as well.

Language constants

These constants represent specific language names:

  • en - English
  • fr - French
  • ch - Chinese
  • jp - Japanese

Date and time formats

Most of API methods expect date and time parameters and return date and time values in xsd:dateTime format, which includes information about date, time and a time zone.
However some API methods use YYYY-MM-DD date format. These parameters will be converted to timestamp values using a corresponding location’s time zone.

Common result ordering and limitation

There are several optional URL parameters, which allow to order and limit returned result for all GET API methods:

  • sortCollection - a result collection name, which need to be ordered or limited
  • sortBy - the collection element property used for elements comparison in ordering
  • sortOrder - asc (default) | desc
  • rowCount - number of the collection elements to be returned
  • firstRow - index of the first collection element to be returned starting from zero; if it is not specified, last rowCount elements will be returned