Request Properties
There are two options for sending a Login request, as follows:
appId in the Header
In this case, the Application(s) to which the user is allowed access is specified in the appId of the Login request header. The appId is a unique Application identifier that is automatically generated by IoT Platform in response to the Application/Post request.
Property
Type
Description
Mandatory
Email
String
User email
Y
Password
String
User password
Y
For example –
https://api.stg.axonize.com/api/auth/login \
-H ‘Content-Type: application/json’ \
-H ‘appId: be517433-c4b8-4788-9258-1ba220432134’ \
-d ‘{“email”:”demousers@axonize.com”,”password”:”somePassword!”}’
URL in the Body
In this case, the Application(s) to which the user is allowed access is determined by the URL property in the body of the Login request (described below). In this case, there is no appId in the Login request header.
Property
Type
Description
Mandatory
URL
String
This URL specifies the application to which the user is allowed access.For example: myapp.stg.axonize.com or myapp.stg.axonize.com/mysubapp.The url can be added with, or without http\s prefix.
Y
Email
String
User email
Y
Password
String
User password
Y
For example –
curl -X POST \
https://api.stg.axonize.com/api/auth/login \
-H ‘Content-Type: application/json’ \
-d ‘{“email”:”demo@user.com”,”password”:”somePassword”,
“url”:”demoapp.stg.axonize.com”}’