Skip to main content

User management API

Last updated 10/03/2026

For how to call the API, see the calling method described in the Open API document.

1. User management​

1. Query user IDs​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters

{
"loginNames": [
"test_user1",
"test_user2"
]
}
Parameter nameExample valueParameter typeRequiredDescription
loginNames["test_user1"]ListYesList 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 nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectKey for querying the validation result
data.authUsers-ListUser list
data.authUsers.userId88IntegerUser ID
data.authUsers.loginNametest_user1StringUsername

2. Query a single user's information, including roles​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNametest_user1StringYesLogin 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 nameExample valueParameter typeDescription
data-ObjectReturned data
data.loginNametest_user1StringLogin name
data.roleInfo-ObjectRole information
data.roleInfo.companyRole-ListCompany role list
data.roleInfo.companyRole.roleNamerootStringRole name
data.roleInfo.companyRole.roleDescRootStringRole description
data.userId88IntegerUser ID
data.userNameTest User AStringUser name
return_code0IntegerReturn code
return_messagesuccessStringReturn 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 nameExample valueParameter typeDescription
data-ObjectReturned data
data.loginNametest_user1StringLogin name
data.roleInfo-ObjectRole information
data.roleInfo.projectRoles-ListProject role list
data.roleInfo.projectRoles.projectId3IntegerProject ID
data.roleInfo.projectRoles.roleDescFor adminsStringRole description
data.roleInfo.projectRoles.roleNameadminStringRole name
data.userId88IntegerUser ID
data.userNameTest User AStringUser name
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1008,
"return_message": "Find no user with loginName: test007"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageFind no user with loginName: test007StringReturn message

3. Query user account status​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNameuser007StringYesLogin name

Success response example

{
"data": {
"accountStatus": "NORMAL",
"loginName": "user007"
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
data-ObjectReturned data
data.accountStatusNORMALString

Account status

  • INVALID: invalid
  • NORMAL: normal
  • LOCK: locked
data.loginNameuser007StringLogin name
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

4. Freeze a user​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNameuser007StringYesLogin name

Success response example

{
"data": true,
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
datatrueObjectReturned data
return_code0IntegerReturn code
return_messagesuccessStringReturn 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 nameExample valueParameter typeDescription
return_code-1006IntegerReturn code
return_messageYou don't have permission for this operation. Check whether the token value is correctStringReturn message

5. Unfreeze a user​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNameuser007StringYesLogin name

Success response example

{
"data": true,
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
datatrueObjectReturned data
return_code0IntegerReturn code
return_messagesuccessStringReturn 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 nameExample valueParameter typeDescription
return_code-1006IntegerReturn code
return_messageYou don't have permission for this operation. Check whether the token value is correctStringReturn message

6. Unbind a user's MFA​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNamerootStringYesLogin name

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1009,
"return_message": "Username does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1009IntegerReturn code
return_messageUsername doesn't existStringReturn 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

ParameterTypeRequiredDescription
tokenStringYesA 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
}
]
}
]
}
ParameterTypeRequiredDescription
authUsersArrayYesA non-empty account list.
authUsers[].loginNameStringYesThe user’s login name. Its format follows the batch user creation API.
authUsers[].rolesArrayYesThe 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[].projectIdIntegerNoThe 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[].roleDescStringYesThe 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[].dataPowersArrayNoData 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[].projectIdIntegerYesThe 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[].dataPowerNameStringOne of twoThe 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[].allDataBooleanOne of twoOnly 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 nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1006,
"return_message": "This API is Forbidden in SAAS"
}
Parameter nameExample valueParameter typeDescription
return_code-1006IntegerReturn code
return_messageThis API is Forbidden in SAASStringReturn message

9. Create an SSO user​

Note
  • Used to create SSO user information

Endpoint URL

/open/create/ssoUser?token=xxx&loginType=dingtalk&loginName=user007

Request method

GET

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginTypedingtalkStringYesThird-party login type
loginNameuser007StringYesLogin name
password-StringNoLogin password (generated automatically by the system if not passed)

Success response example

{
"data": true,
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
datatrueObjectReturned data
return_code0IntegerReturn code
return_messagesuccessStringReturn 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 nameExample valueParameter typeDescription
return_code-1006IntegerReturn code
return_messageYou don't have permission for this operation. Check whether the token value is correctStringReturn 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId0IntegerYesProject ID
loginNameuser007StringYesLogin name of the user to remove
handoverToLoginNameuser008StringYesLogin name of the user to hand over work to

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1023,
"return_message": "user user007 does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1023IntegerReturn code
return_messageuser user007 does not existStringReturn message

11. Delete a user from the system and optionally hand over their work​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNameuser007IntegerYesLogin name
handoverToLoginNameuser008StringYesLogin name of the user to hand over work to

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1010,
"return_message": "Unsupported in SAAS"
}
Parameter nameExample valueParameter typeDescription
return_code-1010IntegerReturn code
return_messageUnsupported in SAASStringReturn 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId0IntegerYesProject ID
userGroupNamedemo007StringYesUser 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 nameExample valueParameter typeDescription
data-ObjectReturned data
data.groupNamedemo007StringGroup name
data.id133Integerid
data.isDefaultfalseBooleanDefault
data.members-ListMember list
data.members.userId16426IntegerUser ID
data.updateTime2021-11-22 19:22:15DateUpdate time
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1023,
"return_message": "User group does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1023IntegerReturn code
return_messageUser group does not existStringReturn 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId2IntegerYesProject ID

Request body parameters

{
"groupName": "demo007",
"isDefault": false,
"members": [
{
"userId": 16426,
"userName": "user007"
}
]
}
$$Parameter nameExample valueParameter typeRequiredDescription
groupNamedemo007StringYesGroup name, up to 64 characters
isDefaultfalseBooleanNoWhether new users join the group by default
members-ListNoMember list
members.userId16426IntegerNoMember user ID
members.userNameuser007StringNoMember user name

Success response example

{
"data": {
"id": 135
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
data-ObjectReturned data
data.id135Integerid
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1015,
"return_message": "Already exists"
}
Parameter nameExample valueParameter typeDescription
return_code-1015IntegerReturn code
return_messageAlready existsStringReturn message

3. Update user group members​

Used to add or update the user group name, and to add or update group member information

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId0IntegerYesProject ID

Request body parameters

{
"id": 99,
"groupName": "testGroup",
"isDefault": false,
"members": [
{
"userId": 88,
"userName": "test88"
},
{
"userId": 100,
"userName": "test100"
}
]
}
$$Parameter nameExample valueParameter typeRequiredDescription
id99IntegerYesUser group ID
groupNametestGroupStringNoUser group name, up to 64 characters
isDefaultfalseBooleanNoNew project users join this group by default
members-ListNoUser group members
members.userId88StringNoUser ID of the member
members.userNametest88StringNoUser name of the member

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1023,
"return_message": "User group does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1023IntegerReturn code
return_messageUser group does not existStringReturn 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId0IntegerYesProject ID
groupId1StringYesGroup ID

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1023,
"return_message": "User group does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1023IntegerReturn code
return_messageUser group does not existStringReturn 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId2IntegerYesProject ID
roleDescAnalyst007StringYesRole 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 nameExample valueParameter typeDescription
data-ObjectReturned data
data.projectId2IntegerProject ID
data.roleDescAnalyst007StringRole description
data.roleNameanalyst_1462717171385241600StringRole name
data.funcList-ListFeature list
data.funcList.functionClassDashboard UsageStringFeature class
data.funcList.functionDescTemporarily adjust dashboard filters and use global filtersStringDescription
data.funcList.functionId35IntegerFeature ID
data.funcList.functionNameuseDashbordFilterStringFeature name
data.funcList.functionTypeViewStringFeature type
data.funcList.preFunctionId34IntegerDependent feature ID
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1023,
"return_message": "role test does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1023IntegerReturn code
return_messagerole test does not existStringReturn message

2. (Deprecated) Get basic role features​

Note

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​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery 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 nameExample valueParameter typeDescription
data-ObjectReturned data
data.functionId8IntegerFeature ID
data.functionNameconfigProjectParmStringFeature name
data.functionDescEdit project integration informationStringDescription
data.functionTypeEditStringFeature category
data.functionClassProjectsStringModule
data.preFunctionId6IntergerDependent feature ID
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

3. Create a project role​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId2IntegerYesProject ID

Request body parameters

{
"roleDesc": "Analyst007",
"roleFuncList": [
14,34,53
]
}
Parameter nameExample valueParameter typeRequiredDescription
roleDescAnalyst007StringYesRole description, up to 60 characters
roleFuncList[14]ListYesList of role feature IDs, which must be valid IDs

Success response example

{
"data": {
"roleName": "analyst_1462717171385241600"
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
data-ObjectReturned data
data.roleNameanalyst_1462717171385241600StringRole name
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -3004,
"return_message": "Invalid project"
}
Parameter nameExample valueParameter typeDescription
return_code-3004IntegerReturn code
return_messageInvalid projectStringReturn 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId2IntegerYesProject ID
roleNameadminStringYesRole name

Request body parameters

{
"roleDesc": "Analyst009",
"roleFuncList": [
14,34,53
]
}
Parameter nameExample valueParameter typeRequiredDescription
roleDescAnalyst009StringNoRole description
roleFuncList[14]ListNoList of role feature IDs

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -3004,
"return_message": "Invalid project"
}
Parameter nameExample valueParameter typeDescription
return_code-3004IntegerReturn code
return_messageInvalid projectStringReturn message

5. Delete a project role​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId0IntegerYesProject ID
roleNamerole_1StringYesRole name
newRoleNamerole_2StringYesName of the new role

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1023,
"return_message": "role 'role_1' does not exist"
}
Parameter nameExample valueParameter typeDescription
return_code-1023IntegerReturn code
return_messagerole 'test' does not existStringReturn 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​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNamerootStringYesLogin name
blackProjectId0IntegerYes

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 nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
dataObjectReturned result

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

2. Batch add to the blocklist (csv)​

Note

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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

The file template is as follows:

loginName,blackProjectId
demo@thinkingdata,-1
user1,298

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

3. Set blocklist groups​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
groupIdList[1]ListYesList of group IDs
groupType1IntegerYes1: blocklist group

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

4. Remove from the blocklist​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
loginNamerootStringYesLogin name
blackProjectId0IntegerNoBlocklist project ID

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

5. Download the blocklist​

Note
  • 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 nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery 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 nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message
Was this page helpful?