Login Api
Log in to the related interface, which is effective for both HTTP access and WebSocket access of the upper system
1 Linkis interface specification
Linkis defines its own set of interface specifications when interacting between the front and back ends.
If you are interested in the interface specification, please click here view interface specification
2 How to achieve login-free
Enter the linkis-gateway/conf directory and execute the command:
1. vim linkis.properties
Turn on the test mode, the parameters are as follows:
1. wds.linkis.test.mode=true # Turn on test mode
2. wds.linkis.test.user=enjoyyin # Specify which user all requests are delegated to in test mode
3 Login interface summary
We provide the following login-related interfaces:
- Log in
- Sign out -Heartbeat
4 Interface details
4.1 Login
- Interface
/api/rest_j/v1/user/login - Submission method
POST
1. {
2. "userName": "",
3. "password": ""
4. }
- Return to example
1. {
2. "method": "/api/rest_j/v1/user/login",
3. "status": 0,
4. "message": "OK",
5. "data": {
6. "isAdmin": false,
7. "loginNum": 5,
8. "userName": "enjoyyin",
9. "lastLoginTime": 1722222222222
10. }
11. }
4.2 Logout
- 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 successfully!"
5. }
4.3 Heartbeat
- 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": "Maintaining the heartbeat success!"
5. }
