<< Click to Display Table of Contents >> Permission validation |
![]() ![]() ![]() |
Request address |
http://ip:port/bi/api?action=login&adminv=xxxx&passv=xxxx ➢Note: 1) URL login,the password cannot be set to special characters "" "and" < ". Other special characters require escape logon. 2) The token that the permission validation returns represents a HTTP session, so the returned token should be available in ten or twenty minutes, and it does not need to call this interface every time the API is called. 3) Finally, you must call the < 1.2 exit permission > interface, otherwise it may lead to a short period of excessive number of users, can not be authorized to verify the situation. And this interface is only for api validation and cannot be used for single sign-on. |
|
Request message |
Request parameter |
No xml request parameters |
parametric description |
The request parameter only adds adminv and passv to the url, corresponding to the username and password to be authenticated respectively. |
|
Sample |
function login() { $.post("http://" + ip + ":" + port + "/" + project + "/api? action=login&adminv=admin&passv=g5", {}, function(result) { writeXml(result); }); } |
|
Response message |
Response result
|
1) Permission validation success <results> <result> <level>1</level> <message>5B9778881E30396DF314B1F58AF20597</message> </result> </results> 2) Permission validation failed <results> <result> <level>6</level> <message>wrong username or password.</message> </result> </results> |
Result description |
The response result information is xml. direct parse. 1) Level return type, different values represent different return status, see appendix. 2) Message is the interface operation result information.When level is 1, it indicates that the successful validation message message is a token value;When the level is 6, the message message information indicates that the permission validation failure is the cause of the failure。All of the following interfaces are required to bring token information to the request. |