HTTP OpenAPIAuthentication
Login & status
User login and auth system status.
User login and auth system status. See sibling pages for users, groups, roles, and policies.
Default Base URL: http://127.0.0.1:8090. Management APIs require Authorization (token from login).
Auth · Login
Login and auth system status.
POST
/auth/v1/user/loginUser login
Exchange credentials for a management token; later calls send Authorization. Body is LoginRequest.
Parameters
- ownerbody · stringoptional
owner
- namebody · stringrequired
name
- passwordbody · stringrequired
password
- optionsbody · map<string,string>optional
options
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- loginRequestbody · LoginRequestoptional
LoginRequest entity fields (batch APIs nest under responses[]).
- ownerbody · stringoptional
owner
- namebody · stringoptional
name
- passwordbody · stringoptional
password
- optionsbody · map<string,string>optional
options
Request
curl -sS -X POST 'http://127.0.0.1:8090/auth/v1/user/login' \
-H 'Content-Type: application/json' \
-d '{"name":"admin","password":"Pole@123456"}'Response example
{
"code": 200000,
"info": "execute success",
"loginResponse": { "user_id": "xxx", "token": "<token>", "name": "admin" }
}GET
/auth/v1/systemAuth system status
Check whether auth is enabled and the main user exists.
Parameters
No parameters.
Request
curl -sS 'http://127.0.0.1:8090/auth/v1/system'Response example
{
"code": 200000,
"info": "execute success",
"option": { "authEnabled": "true", "mainUserExist": "true" }
}