User management API
For how to call the API, see the calling method described in the Open API document.
1. User management
1. Query user IDs
Only company-level tokens are supported
Endpoint URL
/open/list-auth-users-by-login-names?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Request body parameters
{
"loginNames": [
"test_user1",
"test_user2"
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| loginNames | ["test_user1"] | List | Yes | List of login usernames |
Success response example
{
"return_code": 0,
"return_message": "success",
"data": {
"authUsers": [
{
"userId": 88,
"loginName": "test_user1"
},
{
"userId": 89,
"loginName": "test_user2"
}
]
}
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | - | Object | Key for querying the validation result |
| data.authUsers | - | List | User list |
| data.authUsers.userId | 88 | Integer | User ID |
| data.authUsers.loginName | test_user1 | String | Username |
2. Query a single user's information, including roles
- If the user is Root, companyRole is returned; otherwise, projectRoles is returned
- Only company-level tokens are supported
Endpoint URL
/open/get-auth-user-info-by-login-name?token=xxx&loginName= test_user1
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | test_user1 | String | Yes | Login name |
Success response example
companyRole is returned when the user is Root:
{
"return_code": 0,
"return_message": "success",
"data": {
"userId": 88,
"loginName": "test_user1",
"userName": "Test User A",
"roleInfo": {
"companyRole": {
"roleName": "root",
"roleDesc": "Root"
}
}
}
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.loginName | test_user1 | String | Login name |
| data.roleInfo | - | Object | Role information |
| data.roleInfo.companyRole | - | List | Company role list |
| data.roleInfo.companyRole.roleName | root | String | Role name |
| data.roleInfo.companyRole.roleDesc | Root | String | Role description |
| data.userId | 88 | Integer | User ID |
| data.userName | Test User A | String | User name |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
projectRoles is returned when the user is not Root:
{
"return_code": 0,
"return_message": "success",
"data": {
"userId": 88,
"loginName": "test_user1",
"userName": "Test User A",
"roleInfo": {
"projectRoles": [
{
"projectId": 3,
"roleName": "admin",
"roleDesc": "Admin"
},
{
"projectId": 4,
"roleName": "analyst",
"roleDesc": "Analyst"
}
]
}
}
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.loginName | test_user1 | String | Login name |
| data.roleInfo | - | Object | Role information |
| data.roleInfo.projectRoles | - | List | Project role list |
| data.roleInfo.projectRoles.projectId | 3 | Integer | Project ID |
| data.roleInfo.projectRoles.roleDesc | For admins | String | Role description |
| data.roleInfo.projectRoles.roleName | admin | String | Role name |
| data.userId | 88 | Integer | User ID |
| data.userName | Test User A | String | User name |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Find no user with loginName: test007"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Find no user with loginName: test007 | String | Return message |
3. Query user account status
- Query a user's account status by login name
Endpoint URL
/open/get-auth-user-status?token=xxx&loginName=user007
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | user007 | String | Yes | Login name |
Success response example
{
"data": {
"accountStatus": "NORMAL",
"loginName": "user007"
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.accountStatus | NORMAL | String | Account status
|
| data.loginName | user007 | String | Login name |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
4. Freeze a user
- Freeze a user by login name
Endpoint URL
/open/member-lock?token=xxx&loginName=user007
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | user007 | String | Yes | Login name |
Success response example
{
"data": true,
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | true | Object | Returned data |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1006,
"return_message": "You don't have permission for this operation. Check whether the token value is correct"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1006 | Integer | Return code |
| return_message | You don't have permission for this operation. Check whether the token value is correct | String | Return message |
5. Unfreeze a user
- Unfreeze a user by login name
Endpoint URL
/open/member-unlock?token=xxx&loginName=user007
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | user007 | String | Yes | Login name |
Success response example
{
"data": true,
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | true | Object | Returned data |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1006,
"return_message": "You don't have permission for this operation. Check whether the token value is correct"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1006 | Integer | Return code |
| return_message | You don't have permission for this operation. Check whether the token value is correct | String | Return message |
6. Unbind a user's MFA
Only company-level tokens are supported
Endpoint URL
/open/unbind-auth-user-mfa?token=xxx&loginName=root
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | root | String | Yes | Login name |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1009,
"return_message": "Username does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1009 | Integer | Return code |
| return_message | Username doesn't exist | String | Return message |
7. Batch create user roles
Batch create accounts and replace their complete analytics role sets in projects within the company. Data permissions for those projects can be specified in the same request. Only company tokens are supported. A request can handle multiple projects in the same company. This API is available in private deployments; SaaS is not supported.
In earlier versions, to create the Analytics Admin role, you needed to pass the role name Admin
This restriction has been removed since the role optimization in v5.0. You can pass the name of the analytics role in the project directly
Role names can be changed. Check the required names on the Role Management page under System Management / Project Management in the AE system.
Endpoint URL
/open/batch-create-auth-user-and-set-roles?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | String | Yes | A company token. Project tokens, user tokens, and temporary tokens are not accepted. |
Request Body Parameters and Example
This example sets analytics roles for test_user1 in projects 57 and 390, assigning a custom data permission in one project and access to all data in the other. The role and data permission names shown are examples; replace them with existing names in the corresponding project. Omit dataPowers to set roles only.
{
"authUsers": [
{
"loginName": "test_user1",
"roles": [
{
"projectId": 57,
"roleDesc": "数据分析师A"
},
{
"projectId": 390,
"roleDesc": "普通成员"
}
],
"dataPowers": [
{
"projectId": 57,
"dataPowerName": "华东地区数据"
},
{
"projectId": 390,
"allData": true
}
]
}
]
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| authUsers | Array | Yes | A non-empty account list. |
| authUsers[].loginName | String | Yes | The user’s login name. Its format follows the batch user creation API. |
| authUsers[].roles | Array | Yes | The account’s complete analytics role sets for the target projects in this request. Must not be empty. May include multiple projects within the company. |
| authUsers[].roles[].projectId | Integer | No | The project ID. The project must belong to the company associated with the token. Explicitly providing the ID is recommended. If omitted, project ID 0 is used, and project 0 must exist. |
| authUsers[].roles[].roleDesc | String | Yes | The display name of an analytics role already defined in the project, not its internal identifier. Engage roles are currently not supported. Role names can be changed; check them on the Role Management page under System Management / Project Management. |
| authUsers[].dataPowers | Array | No | Data permission settings for this account. Omission, null, or an empty array preserves existing data permissions. New accounts or new project members retain the default access to all data when no permission is specified. Array elements must not be null. |
| authUsers[].dataPowers[].projectId | Integer | Yes | The project ID for the data permission. Must be an existing, non-negative integer included in this account’s roles in the same request. The same project must not be configured more than once for an account. |
| authUsers[].dataPowers[].dataPowerName | String | One of two | The full original name of an existing custom data permission in the project. It must match exactly and uniquely. Do not pass an internal ID. Fuzzy matching and automatic creation are not supported. Even a custom name meaning All Data is resolved as a custom permission. When selecting a name, omit allData or set it to null. |
| authUsers[].dataPowers[].allData | Boolean | One of two | Only true is allowed. It explicitly grants access to all data, regardless of the request language. Omit dataPowerName or set it to null. false, a blank name, neither selection, or both selections are rejected. |
Behavior
- Creates an account with the initial password ta2020 if it does not exist. Existing accounts are reused without resetting their passwords. Accounts newly added to a project join its default user group.
- Replaces the complete analytics role set in each specified project instead of appending roles. For example, if a project previously has roles A and B and the request specifies only B, only B remains after success. Provide the complete role set to retain for each target project. Unlisted projects remain unchanged.
- Only project data permissions explicitly listed in dataPowers are changed. Unlisted projects remain unchanged. Omitting dataPowers, null, or an empty array preserves existing data permissions. New accounts or new project members retain the default access to all data when no permission is specified. The same custom permission name may exist in different projects and resolves to each project’s own configuration.
- A missing or duplicate custom data permission name, or a name that exists only in another project, fails the entire batch without falling back to all data. Renaming a permission does not change existing assignments; subsequent requests must use its new name. When data permissions are specified, the account must belong to the current company.
- This API cannot grant the Root role. The roles and data permissions of existing Root accounts remain unchanged. When the request assigns the project owner role and also specifies a data permission for that project, only allData: true is allowed. dataPowers may instead be omitted to retain the existing behavior.
- The batch is applied as a whole. Any account’s parameter, permission, role, or data permission validation failure, or any failure when writing accounts, roles, default group membership, or data permissions, rolls back the entire batch. Partial success is not returned.
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1006,
"return_message": "This API is Forbidden in SAAS"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1006 | Integer | Return code |
| return_message | This API is Forbidden in SAAS | String | Return message |
9. Create an SSO user
- Used to create SSO user information
Endpoint URL
/open/create/ssoUser?token=xxx&loginType=dingtalk&loginName=user007
Request method
GET
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginType | dingtalk | String | Yes | Third-party login type |
| loginName | user007 | String | Yes | Login name |
| password | - | String | No | Login password (generated automatically by the system if not passed) |
Success response example
{
"data": true,
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | true | Object | Returned data |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1006,
"return_message": "You don't have permission for this operation. Check whether the token value is correct"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1006 | Integer | Return code |
| return_message | You don't have permission for this operation. Check whether the token value is correct | String | Return message |
10. Remove a user from a project and optionally hand over their work
Endpoint URL
/open/delete-auth-user-from-project?token=xxx&projectId=0&loginName=user007&handoverToLoginName=user008
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 0 | Integer | Yes | Project ID |
| loginName | user007 | String | Yes | Login name of the user to remove |
| handoverToLoginName | user008 | String | Yes | Login name of the user to hand over work to |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1023,
"return_message": "user user007 does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | user user007 does not exist | String | Return message |
11. Delete a user from the system and optionally hand over their work
Only company-level tokens are supported
Endpoint URL
/open/delete-auth-user-from-system?token=xxx&loginName=user007&handoverToLoginName=user008
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | user007 | Integer | Yes | Login name |
| handoverToLoginName | user008 | String | Yes | Login name of the user to hand over work to |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1010,
"return_message": "Unsupported in SAAS"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1010 | Integer | Return code |
| return_message | Unsupported in SAAS | String | Return message |
2. User group management
1. Query user group IDs and member lists
Endpoint URL
/open/get-user-group-by-name?token=xxx&projectId=0&userGroupName=demo007
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 0 | Integer | Yes | Project ID |
| userGroupName | demo007 | String | Yes | User group name |
Success response example
{
"data": {
"groupName": "demo007",
"id": 133,
"isDefault": false,
"members": [
{
"userId": 16426
}
],
"updateTime": "2021-11-22 19:22:15"
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.groupName | demo007 | String | Group name |
| data.id | 133 | Integer | id |
| data.isDefault | false | Boolean | Default |
| data.members | - | List | Member list |
| data.members.userId | 16426 | Integer | User ID |
| data.updateTime | 2021-11-22 19:22:15 | Date | Update time |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1023,
"return_message": "User group does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | User group does not exist | String | Return message |
2. Create a user group
Endpoint URL
/open/create-user-group?token=xxx&projectId=2
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
Request body parameters
{
"groupName": "demo007",
"isDefault": false,
"members": [
{
"userId": 16426,
"userName": "user007"
}
]
}
| $$Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| groupName | demo007 | String | Yes | Group name, up to 64 characters |
| isDefault | false | Boolean | No | Whether new users join the group by default |
| members | - | List | No | Member list |
| members.userId | 16426 | Integer | No | Member user ID |
| members.userName | user007 | String | No | Member user name |
Success response example
{
"data": {
"id": 135
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.id | 135 | Integer | id |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1015,
"return_message": "Already exists"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1015 | Integer | Return code |
| return_message | Already exists | String | Return message |
3. Update user group members
Used to add or update the user group name, and to add or update group member information
The submitted member list replaces the original member list entirely
Endpoint URL
/open/update-user-group?token=xxx&projectId=0
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 0 | Integer | Yes | Project ID |
Request body parameters
{
"id": 99,
"groupName": "testGroup",
"isDefault": false,
"members": [
{
"userId": 88,
"userName": "test88"
},
{
"userId": 100,
"userName": "test100"
}
]
}
| $$Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| id | 99 | Integer | Yes | User group ID |
| groupName | testGroup | String | No | User group name, up to 64 characters |
| isDefault | false | Boolean | No | New project users join this group by default |
| members | - | List | No | User group members |
| members.userId | 88 | String | No | User ID of the member |
| members.userName | test88 | String | No | User name of the member |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1023,
"return_message": "User group does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | User group does not exist | String | Return message |
5. Delete a user group
Endpoint URL
/open/delete-user-group?token=xxx&projectId=0&groupId=1
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 0 | Integer | Yes | Project ID |
| groupId | 1 | String | Yes | Group ID |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1023,
"return_message": "User group does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | User group does not exist | String | Return message |
3. Project role management
1. Get project role details
Endpoint URL
/open/get-project-role-by-role-desc?token=xxx&projectId=2&roleDesc=Analyst007
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
| roleDesc | Analyst007 | String | Yes | Role description |
Success response example
{
"data": {
"projectId": 2,
"roleDesc": "Analyst007",
"roleName": "analyst_1462717171385241600",
"funcList": [
{
"functionClass": "Cohort Settings",
"functionDesc": "View the lists of behavioral cohorts, result cohorts, and uploaded ID cohorts",
"functionId": 14,
"functionName": "viewCluster",
"functionType": "View"
},
{
"functionId": 34,
"functionClass": "Dashboard Usage",
"functionDesc": "View dashboards and dashboard settings",
"functionName": "viewDashbord",
"functionType": "View"
},
{
"functionId": 35,
"preFunctionId": 34,
"functionClass": "Dashboard Usage",
"functionDesc": "Temporarily adjust dashboard filters and use global filters",
"functionName": "useDashbordFilter",
"functionType": "View"
}
]
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.projectId | 2 | Integer | Project ID |
| data.roleDesc | Analyst007 | String | Role description |
| data.roleName | analyst_1462717171385241600 | String | Role name |
| data.funcList | - | List | Feature list |
| data.funcList.functionClass | Dashboard Usage | String | Feature class |
| data.funcList.functionDesc | Temporarily adjust dashboard filters and use global filters | String | Description |
| data.funcList.functionId | 35 | Integer | Feature ID |
| data.funcList.functionName | useDashbordFilter | String | Feature name |
| data.funcList.functionType | View | String | Feature type |
| data.funcList.preFunctionId | 34 | Integer | Dependent feature ID |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1023,
"return_message": "role test does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | role test does not exist | String | Return message |
2. (Deprecated) Get basic role features
AE 5.0 has upgraded role and permission management. You no longer need to create custom roles based on baseRole
Use the "Get all features" API to query the full feature list, and create custom roles directly based on the features the role needs and their dependencies.
3. Get all features
Only company-level tokens are supported
Endpoint URL
/open/get-all-functions?token=xxx
Request method
GET
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Success response example
{
"data": [
{
"functionId":6,
"functionName":"viewProjectInfo",
"functionDesc":"View project integration information",
"functionType":"View",
"functionClass":"Project Integration"
},
{
"functionId":8,
"functionName":"configProjectParm",
"functionDesc":"Edit project integration information",
"functionType":"Edit",
"functionClass":"Project Integration",
"preFunctionId":6
},
{
"functionId":14,
"functionName":"viewCluster",
"functionDesc":"View cohort list",
"functionType":"View",
"functionClass":"Cohort Management"
}
],
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.functionId | 8 | Integer | Feature ID |
| data.functionName | configProjectParm | String | Feature name |
| data.functionDesc | Edit project integration information | String | Description |
| data.functionType | Edit | String | Feature category |
| data.functionClass | Projects | String | Module |
| data.preFunctionId | 6 | Interger | Dependent feature ID |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
3. Create a project role
Create a project role and assign permissions. We recommend that you first query the feature permissions you need through the "Get all features" API, and then call this API with the permission IDs from the results
Endpoint URL
/open/create-project-role?token=xxx&projectId=2
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
Request body parameters
{
"roleDesc": "Analyst007",
"roleFuncList": [
14,34,53
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| roleDesc | Analyst007 | String | Yes | Role description, up to 60 characters |
| roleFuncList | [14] | List | Yes | List of role feature IDs, which must be valid IDs |
Success response example
{
"data": {
"roleName": "analyst_1462717171385241600"
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned data |
| data.roleName | analyst_1462717171385241600 | String | Role name |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
4. Update a project role
Endpoint URL
/open/update-project-role?token=xxx&projectId=2&roleName=admin
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 2 | Integer | Yes | Project ID |
| roleName | admin | String | Yes | Role name |
Request body parameters
{
"roleDesc": "Analyst009",
"roleFuncList": [
14,34,53
]
}
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| roleDesc | Analyst009 | String | No | Role description |
| roleFuncList | [14] | List | No | List of role feature IDs |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -3004,
"return_message": "Invalid project"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -3004 | Integer | Return code |
| return_message | Invalid project | String | Return message |
5. Delete a project role
AE 5.0 has upgraded custom feature permissions. When you delete an old role, you need to specify a new role to replace it, so that accounts with the old role can continue to work normally.
Endpoint URL
/open/delete-project-role?token=xxx&projectId=0&roleName=role_1&newRoleName=role_2
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 0 | Integer | Yes | Project ID |
| roleName | role_1 | String | Yes | Role name |
| newRoleName | role_2 | String | Yes | Name of the new role |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1023,
"return_message": "role 'role_1' does not exist"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1023 | Integer | Return code |
| return_message | role 'test' does not exist | String | Return message |
4. Dashboard sharing blocklist
Use case: When you configure dashboard sharing and make a dashboard visible to all members, you can use the blocklist to exclude certain users
1. Add to the blocklist
Only company-level tokens are supported
Endpoint URL
/open/share/add-black?token=xxx&loginName=root&blackProjectId=0
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | root | String | Yes | Login name |
| blackProjectId | 0 | Integer | Yes | Blocklist project ID 0: blocklist shared by all projects Project ID: blocklist for that project only |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | Object | Returned result |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
2. Batch add to the blocklist (csv)
Only company-level tokens are supported
Endpoint URL
/open/share/add-black-list?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
The file template is as follows:
loginName,blackProjectId
demo@thinkingdata,-1
user1,298
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
3. Set blocklist groups
- Only company-level tokens are supported
- After a group is set as a blocklist group, all members of the group are added to the blocklist
Endpoint URL
/open/share/add-black-group-list?token=xxx&groupIdList=[1]&groupType=1
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| groupIdList | [1] | List | Yes | List of group IDs |
| groupType | 1 | Integer | Yes | 1: blocklist group |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
4. Remove from the blocklist
- Only company-level tokens are supported
- You can remove a user from the blocklist of a specific project, or from all blocklists
Endpoint URL
/open/share/cancel-black?token=xxx&loginName=root&blackProjectId=0
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| loginName | root | String | Yes | Login name |
| blackProjectId | 0 | Integer | No | Blocklist project ID |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
5. Download the blocklist
- Only company-level tokens are supported
Endpoint URL
/open/share/download-share-black?token=xxx
Request method
POST
Content-Type
application/json
Request query parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
Success response example
A csv file. An example screenshot is shown below
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |

