Project ACL
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 the special char
&.
Get Project ACLâ
-
GET http://host:port/kylin/api/access/project -
Introduced in: 5.0
-
Request Parameters
project-requiredstring, project name.name-optionalstring, user or group name.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/access/project?project=learn_kylin' \
-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": [
{
"type": "user",
"name": "ADMIN",
"permission": "ADMIN"
},
{
"type": "group",
"name": "TEST_GROUP",
"permission": "QUERY"
}
...
],
"offset": 0,
"limit": 10,
"total_size": 4
},
"msg": ""
}
Grant Project ACLâ
-
POST http://host:port/kylin/api/access/project -
Introduced in: 5.0
-
HTTP Body: JSON Object
project-requiredstring, project name.type-requiredstring, represents users or user groups, optional values areuserorgroup.permission-requiredstring, represents users or user groups permission, optional values areQUERY,OPERATION,MANAGEMENTandADMIN.names-requiredarray[string], name of user or user group.
-
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/access/project' \
-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 '{
"project": "Kylin",
"type": "user",
"permission": "QUERY",
"names":["test"]
}' -
Response Example
{
"code": "000",
"data": "",
"msg": ""
}
Update Project ACL (overwrite)â
-
PUT http://host:port/kylin/api/access/project -
Introduced in: 5.0
-
HTTP Body: JSON Object
project-requiredstring, project name.type-requiredstring, represents users or user groups, optional values areuserorgroup.permission-requiredstring, represents users or user groups permission, optional values areQUERY,OPERATION,MANAGEMENTandADMIN.name-requiredstring, name of user or user 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/access/project' \
-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 '{
"project": "Kylin",
"type": "user",
"permission": "ADMIN",
"name": "test"
}' -
Response Example
{
"code": "000",
"data": "",
"msg": ""
}
Revoke Project ACLâ
-
DELETE http://host:port/kylin/api/access/project -
Introduced in: 5.0
-
Request Parameters
project-requiredstring, project name.type-requiredstring, Represents users or user groups, optional areuserorgroup.name-requiredstring, name of user or user group.
-
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/access/project?project=learn_kylin&type=user&name=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": "",
"msg": ""
}