User Group Management
Reminders:
- Please read Access and Authentication REST API and understand how authentication works.
- On Curl command line, don't forget to quote the URL if it contains
&or other special chars.
Get User Group Listâ
-
GET http://host:port/kylin/api/user_group/groups -
Introduced in: 5.0
-
Request Parameters
group_name-optionalstring, group name.is_case_sensitive-optionalboolean, whether case-sensitive on user group name. The default value isfalse.page_offset-optionalint, offset of returned result, 0 by default.page_size-optionalint, quantity of returned result per page, 10 by default.
-
HTTP Header
Accept: application/vnd.apache.kylin-v4-public+jsonAccept-Language: enContent-Type: application/json;charset=utf-8
-
Curl Request Example
curl -X GET \'http://host:port/kylin/api/user_group/groups`' \-H 'Accept: application/vnd.apache.kylin-v4-public+json' \-H 'Accept-Language: en' \-H 'Authorization: Basic QURNSU46S1lMSU4=' \-H 'Content-Type: application/json;charset=utf-8' -
Response Example
{"code": "000","data": {"value": ["ALL_USERS","ROLE_ADMIN","ROLE_ANALYST","ROLE_MODELER"...],"offset": 0,"limit": 10,"total_size": 7},"msg": ""}
Get User List of Specified User Groupâ
-
GET http://host:port/kylin/api/user_group/group_members/{group_name} -
Introduced in: 5.0
-
URL Parameters
group_name-requiredstring, group name.
-
Request Parameters
username-optionalstring, username.page_offset-optionalint, offset of returned result, 0 by default.page_size-optionalint, quantity of returned result per page, 10 by default.
-
HTTP Header
Accept: application/vnd.apache.kylin-v4-public+jsonAccept-Language: enContent-Type: application/json;charset=utf-8
-
Curl Request Example
curl -X GET \'http://host:port/kylin/api/user_group/group_members/test' \-H 'Accept: application/vnd.apache.kylin-v4-public+json' \-H 'Accept-Language: en' \-H 'Authorization: Basic QURNSU46S1lMSU4=' \-H 'Content-Type: application/json;charset=utf-8' -
Response Example
{"code": "000","data": {"value": [{"username": "ADMIN","authorities": [{"authority": "ROLE_ADMIN"},{"authority": "ALL_USERS"}],"disabled": false,"default_password": false,"locked": false,"uuid": "aaf02c5d-1605-42fa-abf9-9b0bb5715a6a","last_modified": 1592555313558,"create_time": 1586744927779,"locked_time": 0,"wrong_time": 0,"first_login_failed_time": 0}...],"offset": 0,"limit": 10,"total_size": 10},"msg": ""}
Add User Groupâ
-
POST http://host:port/kylin/api/user_group -
Introduced in: 5.0
-
HTTP Body: JSON Object
group_name-requiredstring, group name.
-
HTTP Header
Accept: application/vnd.apache.kylin-v4-public+jsonAccept-Language: enContent-Type: application/json;charset=utf-8
-
Curl Request Example
curl -X POST \'http://host:port/kylin/api/user_group' \-H 'Accept: application/vnd.apache.kylin-v4-public+json' \-H 'Accept-Language: en' \-H 'Authorization: Basic QURNSU46S1lMSU4=' \-H 'Content-Type: application/json;charset=utf-8' \-d '{"group_name": "test_group"}' -
Response Example
{"code": "000","data": "","msg": "add user group"}
Update User Groupâ
Note: Updating group will overwrite the original user list.
-
PUT http://host:port/kylin/api/user_group/users -
Introduced in: 5.0
-
HTTP Body: JSON Object
group_name-requiredstring, group name.users-requiredarray[string], list of users in group.
-
HTTP Header
Accept: application/vnd.apache.kylin-v4-public+jsonAccept-Language: enContent-Type: application/json;charset=utf-8
-
Curl Request Example
curl -X PUT \'http://host:port/kylin/api/user_group/users' \-H 'Accept: application/vnd.apache.kylin-v4-public+json' \-H 'Accept-Language: en' \-H 'Authorization: Basic QURNSU46S1lMSU4=' \-H 'Content-Type: application/json;charset=utf-8' \-d '{"group_name": "test","users":["ANALYST", "MODELER"]}' -
Response Example
{"code": "000","data": "","msg": "modify users in user group"}
Delete User Groupâ
-
DELETE http://host:port/kylin/api/user_group -
Introduced in: 5.0
-
HTTP Body: JSON Object
group_name-requiredstring, group name.
-
HTTP Header
Accept: application/vnd.apache.kylin-v4-public+jsonAccept-Language: enContent-Type: application/json;charset=utf-8
-
Curl Request Example
curl -X DELETE \'http://host:port/kylin/api/user_group' \-H 'Accept: application/vnd.apache.kylin-v4-public+json' \-H 'Accept-Language: en' \-H 'Authorization: Basic QURNSU46S1lMSU4=' \-H 'Content-Type: application/json;charset=utf-8'-d '{"group_name": "test_group"}' -
Response Example
{"code": "000","data": "","msg": "del user group"}