REST API Introduction and login
Request
Requests must be sent using HTTPS. All URLs begin with the assigned address, which will be provided to you once the REST API is up and running. In this documentation, we will state:https://[YOUR_COMPANY].iquant.eu.
Please contact Quant Support for your URL address.
Supported formats
The API currently supports JSON and SVG formats according to the type of request.
If you use another format, you will receive a response from the server HTTP 415 Unsupported Media Type.
Error handling
If the API is temporarily unavailable, the error response will be 5XX. It is the client's responsibility to retry the request in this case.
Login
Login is required to communicate with the API. In response to the login, you will receive a token that you will use for further requests. The token will be valid for 30 minutes. When the token expires, you will need to log in again to get a new token.
You must log in using the Robot user role that you create in Quant.
- REST Request:
Parameter | Value |
URL | /authenticate |
Header | Accept: application/json |
Header | Content-type: application/json |
Method | POST |
Payload | {"username":"<username>","password":"<password>"} |
- REST Response:
Parameter | Value |
Body | {"token":"<token>","status":"<result>"} |
If the login is successful, you will receive a response: HTTP 200. You will receive an authentication token in the response. Otherwise, the status attribute in the response will contain an error message, for example:
HTTP 401 {"token":"","status":"Wrong username or password!"}"
Login to REST API
Request
curl -H "accept: application/json" -H "content-type: application/json" "https://[YOUR_COMPANY].iquant.eu/authenticate" -d "{\"username\":\"xxxx\",\"password\":\"xxxx\"}"
Response
{"token":"nAti4s84yqxmgcOf16IOmp4NwLaJV7kJIoGFnzTDrra0JSEG02","status":"SUCCESS"}
Authorization
Authorization is performed using a token attached to the HTTP header.
Parameter | Value |
Header | Authorization: Bearer <TOKEN> |
If the token is already invalid, you will receive a response:
HTTP 401 Unauthorized Content-Type: text/plain Body:"Token is missing or invalid!"
curl -H "accept:application/svg+xml" -H "Authorization: Bearer cDEHSUb03G8SJIAtHRYHYVeCmcxKxLDkVaUrhtBNGBSZpDyuBh" "https://[YOUR_COMPANY].iquant.eu/floorplan/55?productId=123456&kioskId=KID5&"
Automatic Tasks Setting
In Quant, you need to set up specific automatic tasks in order to automate the entire data transfer process.
Desktop Rights
First, however, you need to set up desktop rights to view and edit the automatic tasks.
Automatic Task Setting
In the Automatic Task section, click on the New button to add a specific automatic task, which you must then set up in the Settings tab.
Default Task Settings
Some settings are repeated for all tasks, so it's a good idea to set all the repeating properties in the Default Task Settings tab as you need them so you don't have to change them for every tasks individually.
In the Default Task Settings, we recommend configuring attributes whose values are the same for all imports and exports, so you don’t have to set them individually each time. An example might be Emails for Notifications, where you specify the email addresses to which error status reports should be sent.
Each automatic task has its own settings, which will always be described in the manual for that particular automated task.