Grid RESTful API Supported Functions
Grid RESTful API Start-up Guide
7
2
Grid RESTful API Supported Functions
2.1
HTTP Usage
Most RESTful requests can be made using either POST or GET requests. POST requests must specify
parameters in a JSON payload and GET requests must specify parameters as query parameters in the
URL. Parameters that are too complex for the query parameter syntax will necessitate a JSON POST
request.
All POST requests containing a JSON payload must set the following HTTP header:
Content-Type: application/json
2.2
Authentication
A RESTful client acquires an API token using the Authenticate RESTful call. This token must
accompany every RESTful request as a query parameter in order to authenticate the request.
Authentication tokens inherit the permissions of the user who created them.
Important Note:
All GET and POST requests
other than Authentication requests must provide the authentication
token as a query parameter, happn_token:
/rest/method/fieldpop-api/deviceDataLog?happn_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ImlkfGNiMmQ0N
Dg5LTAyNTQtNGJlYy1hZWNiLThkZDM3NDY0NjA3Mnx0eXBlfHRpbWVzdGFtcHxpc0VuY3J5cHRlZHxvcmlnaW58Z
mllbGRwb3AtbWFpbnxwb2xpY3l8MHx0dGx8aW5hY3Rpdml0eV90aHJlc2hvbGR8MXxwZXJtaXNzaW9uU2V0S2V5f
C9PRU0rQWRtaW4vL19NRVNIX0dTVC98aXNUb2tlbnx1c2VybmFtZXxlZ2dlcnNqZW5zQGdtYWlsLmNvbV4wfEozW
DRKU0pLfDB8MF5eJDB8MXwyfEh8M3xJfDR8LTJ8NXw2fDd8JDh8JDl8SnxBfC0zXXxCfCQ5fEt8QXwtM11dfEN8R
HxFfC0xfR10i.H7BAXttwX1aug4HXDnJwBh8m4njAi2ggQAMCNBGWRE
This query parameter will be shortened in the examples below for brevity.
2.2.1 Login
NOTE: Check if the Grid
password uses “#”. If so, the password must be changed to remove it
before moving forward. See the
for instructions. The # symbol is
a reserved character in URL web services.
Description:
Use user credentials to obtain a new API token.
HTTP Verb:
GET or POST
URL:
JSON Parameters:
username (email address), password
Example GET URL:
rest/[email protected]&password=Ip6ISBKiOy5U
Example POST URL:
rest/login
Example POST Payload:
{
"username": "[email protected]",
"password": "Ip6ISBKiOy5U"
}