<< Click to Display Table of Contents >> Navigation: Help > Troubleshooting > Previous Manuals > E-SM-RMS-WEB > Application Programming Interface (API) > Read Data from RMS using JSON API > Token request |
In order for the request to be authorized, a token must first be requested. This token authenticates an RMS user whose rights apply.
oThe user needs the read right for the "Data" View.
oIf the user is disabled or deleted, the token is also invalid.
oThe token has a scheduled validity of maximum 30 days and must be renewed afterward.
oThe token is in the JSON web token format and about 260 characters long.
oAfter 3 unsuccessful attempts (e.g. wrong password) the request for this user will be blocked for 1 min.
Parameter
Key |
|
---|---|
UserId |
User ID |
Username |
User name |
Password |
Password |
RequestType |
Must be "DataHistory" |
ExpirationDays |
Expiration for token in days (maximum 30) |
Example:
Request |
URL: API/RequestToken.ashx (HTTP POST) Parameter: { UserId: 1234, Username: Meier, Password: 12$456, RequestType: DataHistory, ExpirationDays: 30 } |
Response from server |
{ UserId: 1234, RequestType: DataHistory, Token: xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxx, Status: OK } |