[Big data] WebAPI

vividime-Club Show all floors Published on 2024-12-18 10:53:53 |Reading mode print Previous Topic Next Topic
1
Unresolved

【Big data】 WebAPI

1169 1
How to perform permission verification?
reply

Using props report

Exciting comments1

vividime-Club Show all floors Published on 2024-12-18 10:55:21
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.
reply

Using props report

Advanced mode
You need to log in before you can reply to the post login | Free registration

© 2024 VIVIDATA PTE. LTD. All Rights Reserved. Privacy Statement