Login Document

Enter the /conf/linkis-spring-cloud-services/linkis-mg-gateway directory and execute the command:

  1. vim linkis-server.properties

Add LDAP related configuration:

  1. wds.linkis.ldap.proxy.url=ldap://127.0.0.1:389/ #LDAP service URL
  2. wds.linkis.ldap.proxy.baseDN=dc=webank,dc=com #Configuration of LDAP service

Enter the /conf/linkis-spring-cloud-services/linkis-mg-gateway directory and execute the command:

  1. vim linkis-server.properties

Turn on the test mode and the parameters are as follows:

  1. wds.linkis.test.mode=true # Open test mode
  2. wds.linkis.test.user=hadoop # Specify which user to delegate all requests to in test mode

We provide the following login-related interfaces:

  • Login In

  • Login Out

  • Heart Beat

  • The return of the Linkis Restful interface follows the following standard return format:

  1. {
  2. "method": "",
  3. "status": 0,
  4. "message": "",
  5. "data": {}
  6. }

Protocol

  • method: Returns the requested Restful API URI, which is mainly used in WebSocket mode.
  • status: returns status information, where: -1 means no login, 0 means success, 1 means error, 2 means verification failed, 3 means no access to the interface.
  • data: return specific data.
  • message: return the requested prompt message. If the status is not 0, the message returns an error message, and the data may have a stack field, which returns specific stack information.

For more information about the Linkis Restful interface specification, please refer to: Linkis Restful Interface Specification

  • Interface /api/rest_j/v1/user/login

  • Submission method POST

  1. {
  2. "userName": "",
  3. "password": ""
  4. }
  • Return to example
  1. {
  2. "method": null,
  3. "status": 0,
  4. "message": "login successful(登录成功)!",
  5. "data": {
  6. "isAdmin": false,
  7. "userName": ""
  8. }
  9. }

Among them:

-isAdmin: Linkis only has admin users and non-admin users. The only privilege of admin users is to support viewing the historical tasks of all users in the Linkis management console.

  • Interface /api/rest_j/v1/user/logout

  • Submission method POST

    No parameters

  • Return to example

  1. {
  2. "method": "/api/rest_j/v1/user/logout",
  3. "status": 0,
  4. "message": "Logout successful(退出登录成功)!"
  5. }
  • Interface /api/rest_j/v1/user/heartbeat

  • Submission method POST

    No parameters

  • Return to example

  1. {
  2. "method": "/api/rest_j/v1/user/heartbeat",
  3. "status": 0,
  4. "message": "Maintain heartbeat success(维系心跳成功)!"
  5. }