Request URL http://ip:port/bi/api?action=login&adminv=xxxx&passv=xxxx ➢Note • URL login, the password can not be set to special characters """ and "<", other special characters need to be escaped login. •The token returned by privilege authentication represents an http session, you don't need to call this api every time you call the API. the expiration time of the token is controlled by the value of the attribute: secure.session.timeout=1800000 in seconds, the default expiration time is 30 minutes. •Finally, you must call the [1.2 Exit Permission] api, otherwise it may lead to a short period of time when the number of users is too large to verify the permission. And this api is only used for api verification, can not be used for single sign-on. Request Message Request Parameter No xml request parameters Request Parameter Description The request parameter is just to add adminv and passv to the url, which correspond to the username and password to be authenticated, respectively. Request Example function login() { $.post("http://" + ip + ":" + port + "/" + project + "/api? action=login&adminv=admin&passv=g5", {}, function(result) { writeXml(result); }); } Response Message Response Result •Privilege authentication succeeded <results> <result> <level>1</level> <message>5B9778881E30396DF314B1F58AF20597</message> </result> </results> •Privilege authentication failed <results> <result> <level>6</level> <message>The username or password is incorrect.</message> </result> </results> Result Description Response result information is xml, can parse direcly. •level return type, different values represent different return status, see Appendix. •message is the result of api operation. When the level is 1, it means the permission verification is successful, and the message is the token value; when the level is 6, it means the permission verification fails, and the message is the reason of failure. All the following apis need to bring the token information when requesting. |