Skip to main content

User Permissions API

Introduction: User Permissions Management API

HOST:https://{envId}.ap-shanghai.tcb-api.tencentcloudapi.com

Manage Users

Create User

Endpoint:/weda/auth/v1.1/{envType}/addUser

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Description:

Create a weda user

Request Example:

{
"Name": "User1",
"NickName": "UserNickName",
"Uuid": "22332323",
"Phone": "13709999999",
"Email": "1234567@qq.com",
"Password": "TestUser1",
"ParentUserId":"1688747135862595586",
"RoleIds": [
"160483621866285465",
"160483621866285464"
],
"MainOrg": {
"OrgId": "630e01e284ae3f3f6abff2f05NSXH23BPE",
"OrgIdentity": ""
},
"Description": "",
"UserExtend": ""
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Create User ObjectbodytrueCreate User Object
NameUsername;
Format:
Must start with a letter or digit, length between 1-64 characters
Can only contain uppercase/lowercase letters, digits, and symbols: - _ . @
truestring
NickNameNickname; Format: 2-64 characters stringfalsestring
PhonePhone number; must be correctly formatted and uniquefalsestring
EmailEmail; must be correctly formatted and uniquefalsestring
UuidCustomer system user ID; must be unique, if not provided will be generated by the system
Note: Used when developers have an existing user system, it is recommended to pass the user ID from your own system
falsestring
PasswordPassword; Format: 4-60 characters string;
Note: Uuid and Password cannot be empty at the same time
falsestring
ParentUserIdDirect superior user ID;
Note: weda user ID
falsestring
RoleIdsRole id listfalsearraystring
MainOrgPrimary departmentfalseDepartment object
OrgIdDepartment idtruestring
OrgIdentityDepartment identifierfalsestring
DescriptionUser descriptionfalsestring
UserExtendUser data source extension information, json stringfalsestring
SortWeight; used for user sortingfalseinteger

Response Status:

Status CodeDescriptionschema
200OKServerResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response ObjectCommon Response Object
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataUser idstring

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": "160483621866285465"
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Delete User

Endpoint:/weda/auth/v1.1/{envType}/deleteUser

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"UserIdList": [
"160483621866285465"
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Delete User Request ObjectbodytrueDelete User Request Object
UserIdListweda user ID (pass one weda user ID only; single deletion supported)truearraystring

Response Status:

Status CodeDescriptionschema
200OKServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Boolean)Common Response Object (data type: Boolean)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataWhether successfulboolean

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Update User

Endpoint:/weda/auth/v1.1/{envType}/updateUserInfoByUserId

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"UserId": "1519289370670850049",
"Name": "User1",
"NickName": "UserNickName",
"Phone": "13709999999",
"Email": "1234567@qq.com",
"Password": "TestUser1",
"ParentUserId":"1688747135862595586",
"RoleIds": [
"160483621866285465",
"160483621866285464"
],
"MainOrg": {
"OrgId": "630e01e284ae3f3f6abff2f05NSXH23BPE",
"OrgIdentity": ""
},
"Description": "",
"UserExtend": ""
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Update User ObjectbodytrueUpdate User Object
UserIdweda user idtruestring
NameUsername;
Format:
Must start with a letter or digit, length between 1-64 characters
Can only contain uppercase/lowercase letters, digits, and symbols: - _ . @
Note: Passing an empty string, omitting this parameter, or passing null means no modification
falsestring
NickNameNickname;
Format: 2-64 characters string;
Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification
falsestring
PhonePhone number;
Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification
falsestring
EmailEmail;
Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification
falsestring
PasswordPassword;
Format: 4-60 characters string;
Note: Passing an empty string, omitting this parameter, or passing null means no modification
falsestring
ParentUserIdDirect superior user id;
Note: Omitting this parameter or passing null means no modification
falsestring
RoleIdsRole id list;
Note: Omitting this parameter, passing null, or passing an empty array means no role modification
falsearraystring
MainOrgPrimary department;
Note: Omitting this parameter, passing null, or passing an empty object will clear the primary department
falseDepartment object
OrgIdDepartment idtruestring
OrgIdentityDepartment identifierfalsestring
DescriptionUser description;
Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification
falsestring
UserExtendUser data source extension information, json string;
Note: Passing an empty string, omitting this parameter, or passing null means no modification
falsestring
SortWeight; used for user sorting
Note: Omitting this parameter or passing null means no modification
falseinteger

Response Status:

Status CodeDescriptionschema
200OKServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Boolean)Common Response Object (data type: Boolean)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataWhether successfulboolean

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

User Details

Endpoint:/weda/auth/v1.1/{envType}/describeWedaUser

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"UserId": "151928937067085004",
"RelatedType": "UserRelatedRole"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Query User Input Parameters ObjectQuery User Input Parameters ObjectbodytrueQuery User Input Parameters ObjectQuery User Input Parameters Object
UserIdweda user idtruestring
RelatedTypeWhether to return associated roles;
Note: If this parameter is omitted, associated roles are not returned by default; to return associated roles, pass 'UserRelatedRole'
falsestring
WithIdentitiesWhether to obtain IdP Token informationfalseboolean

Response Status:

Status CodeDescriptionschema
200OKServerResponseUserResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object, data type: User Response Object
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
codeError codestring
messageError message promptstring
DataUser ListUser Response ObjectUser Response Object
NameNamestring
TypeUser type
0: internal user, 1: external user, 2: anonymous user
integer
InternalUserTypeInternal user type
1: Super administrator; 0: Self-created user
integer
SourceSource
1: Self-created user 2: WeCom 3: External user
integer
NickNameNicknamestring
EmailEmailstring
PhonePhone numberstring
RelatedRolesRelated rolesarrayRole detail object
NameRole namestring
RoleIdentityrole identitystring
IdRole IDstring
RoleDescRole descriptionstring
IsReleasedWhether releasedboolean
UserDescUser descriptionstring
UserIdUser idstring
UserExtendUser data source extension information, json stringstring
MainOrgPrimary departmentDepartment objectDepartment object
OrgIdDepartment idstring
OrgIdentityDepartment identifierstring
IdentitiesExternal identity sourcearray
ProviderIdentity source IDstring
AccessTokenAccess Token in the external identity sourcestring
RefreshTokenRefresh Token in the external identity sourcestring

Response Example:

{
"Response":{
"RequestId":"",
"Error":{
"code":"",
"message":""
},
"Data":{
"Name":"User1",
"Type":0,
"InternalUserType":0,
"Source":0,
"NickName":"UserNickName",
"Email":"",
"Phone":"",
"RelatedRoles":[
{
"Name":"role name",
"RoleIdentity":"RoleIdentity",
"Id":"123213",
"RoleDesc":"",
"IsReleased":true
}
],
"UserDesc":"",
"UserId":"160483621866285465",
"UserExtend":"",
"MainOrg":{
"OrgId":"",
"OrgIdentity":""
},
"Identities":[
{
"Provider":"",
"AccessToken":"",
"RefreshToken":""
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

User List

Endpoint:/weda/auth/v1.1/{envType}/describeUserList

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"PageNo": 1,
"PageSize": 10
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Query User List Input Parameters ObjectQuery User List Input Parameters ObjectbodytrueQuery User List Input Parameters ObjectQuery User List Input Parameters Object
PageNoPage number, default is 1falseinteger(int32)
PageSizePage size, default is 100falseinteger(int32)

Response Status:

Status CodeDescriptionschema
200OKServerResponseQueryUserResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataQuery User Response ObjectQuery User Response Object
TotalTotalinteger
UserListUser ListarrayUser Response Object
NameNamestring
TypeUser type
0: internal user, 1: external user, 2: anonymous user
integer
InternalUserTypeInternal user type
1: Super administrator; 0: Self-created user
integer
SourceSourceinteger
NickNameNicknamestring
EmailEmailstring
PhonePhone numberstring
RelatedRolesRelated rolesarrayRole detail object
NameRole namestring
RoleIdentityRole Identitystring
IdRole IDstring
RoleDescRole descriptionstring
IsReleasedWhether releasedboolean
UserDescUser descriptionstring
UserIdUser idstring
UserExtendUser data source extension information, json stringstring
MainOrgPrimary departmentDepartment objectDepartment object
OrgIdDepartment idstring
OrgIdentityDepartment identifierstring
OrgNameDepartment namestring

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"Total": 1,
"UserList": [
{
"Name": "User1",
"Type": 0,
"InternalUserType": 0,
"Source": 0,
"NickName": "UserNickName",
"Email": "",
"Phone": "",
"RelatedRoles": [
{
"Name": "role name",
"RoleIdentity": "RoleIdentity",
"Id": "12312312312312321",
"RoleDesc": "",
"IsReleased": true
}
],
"UserDesc": "",
"UserId": "160483621866285465",
"UserExtend": "",
"MainOrg": {
"OrgId": "",
"OrgIdentity": "",
"OrgName": ""
}
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Batch Add Users

Endpoint:/weda/auth/v1/prod/batchAddUsers

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

Batch add users. This interface is not currently supported for hybrid clouds.

Request Example:

{
"users": [
{
"name": "test_88888_0",
"nickName": "1234",
"password": "1234",
"phone": "137204980",
"email": "1205218880@qq.com",
"uuid": "test_88888_0",
"roleIds": [
"1691342526177378305"
],
"description": "test_88888_0",
"userExtend": "{\"test\": \"userExtend\"}",
"mainOrg": {
"orgId": "4ebb756064db211001025a72017482fd"
},
"orgs": [
{
"orgId": "4ebb756064db216a01025c7057c98bca"
}
]
},
{
"name": "test_88888_1",
"nickName": "1234",
"password": "1234",
"phone": "137204981",
"email": "1205218881@qq.com",
"uuid": "test_88888_1",
"roleIds": [
"1691342526177378305"
],
"description": "test_88888_1",
"userExtend": "{\"test\": \"userExtend\"}",
"mainOrg": {
"orgId": "4ebb756064db211001025a72017482fd"
}
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Batch Add User ObjectsBatch Add User Objectsbodytrue
usersUser List; the number of users added in a single request cannot exceed 100truearray
nameUsername;
Format:
Must start with a letter or digit, length between 1-64 characters
Can only contain uppercase/lowercase letters, digits, and symbols: - _ . @
truestring
nickNameNickname; Format: 2-64 characters stringfalsestring
phonePhone number; must be correctly formatted and uniquefalsestring
emailEmail; must be correctly formatted and uniquefalsestring
uuidCustomer system user ID; must be unique, if not provided will be generated by the system
Note: Used when developers have an existing user system, it is recommended to pass the user ID from your own system
falsestring
passwordPassword; Format: 4-60 characters string;
Note: Uuid and Password cannot be empty at the same time
falsestring
parentUserIdDirect superior user ID;
Note: weda user ID
falsestring
roleIdsRole id listfalsearraystring
mainOrgPrimary departmentfalseDepartment object
orgIdDepartment idtruestring
orgIdentityDepartment identifierfalsestring
descriptionUser descriptionfalsestring
userExtendUser data source extension information, json stringfalsestring
sortWeightfalseinteger

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponse

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response ObjectCommon Response Object
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataResponse Object
usersUser ListarrayUser Object
userIdweda user idstring
uuidCustomer system user id; if not provided, will be generated by the systemfalse
nameUser nametrue
nickNameNicknamefalse
phonePhone numberfalse
emailEmailfalse
parentUserIdDirect superior user idfalse
roleIdsRole id listfalse
mainOrgPrimary departmentfalse
orgIdDepartment idtrue
orgIdentityDepartment identifierfalse
descriptionUser descriptionfalse
userExtendUser data source extension information, json stringfalse
sortWeightinteger

Response Example:

{
"response": {
"requestId": "bca4ad8de89cb",
"data": {
"users": [
{
"userId": "1693458933143285761",
"uuid": "1693458933143285761",
"name": "test_88888_0",
"nickName": "1234",
"phone": "137204980",
"email": "1205218880@qq.com",
"roleIds": [
"1691342526177378305"
],
"description": "test_88888_0",
"userExtend": "{\"test\": \"userExtend\"}",
"mainOrg": {
"orgId": "4ebb756064db211001025a72017482fd"
},
"appId": 1307578329,
"internalUserType": 0
},
{
"userId": "1693458933143285762",
"uuid": "1693458933143285762",
"name": "test_88888_1",
"nickName": "1234",
"phone": "137204981",
"email": "1205218881@qq.com",
"roleIds": [
"1691342526177378305"
],
"description": "test_88888_1",
"userExtend": "{\"test\": \"userExtend\"}",
"mainOrg": {
"orgId": "4ebb756064db211001025a72017482fd"
},
"appId": 1307578329,
"internalUserType": 0
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Trigger Sync Task

Endpoint:/weda/auth/v1/{envType}/syncContacts

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"EnvId": "lowcode-5gnlujgs9e0f4844"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Trigger Sync Task Input Parameters ObjectTrigger Sync Task Input Parameters ObjectbodytrueTrigger Sync Task Input Parameters ObjectTrigger Sync Task Input Parameters Object
EnvIdEnvironment idfalsestring

Response Status:

Status CodeDescriptionschema
200OKServerResponseTriggerSyncTaskResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Trigger Sync Task Response Object)Common Response Object (data type: Trigger Sync Task Response Object)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataTrigger Sync Task Output Parameters ObjectTrigger Sync Task Output Parameters Object
ResponseTrigger Sync Task Details ObjectTrigger Sync Task Details Object
ExpiresInValidity periodinteger
SyncTaskIdSync Task Idstring

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"Response": {
"ExpiresIn": 0,
"SyncTaskId": "3aa51821-2c45-40c8-a2f3-2bfd32a75c1e"
}
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Query Sync Task Status

Endpoint:/weda/auth/v1/{envType}/getSyncStatus

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"EnvId": "lowcode-5gnlujgs9e0f4844"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Input Parameters Object for Querying Sync Task StatusInput Parameters Object for Querying Sync Task StatusbodytrueInput Parameters Object for Querying Sync Task StatusInput Parameters Object for Querying Sync Task Status
EnvIdEnvironment idfalsestring

Response Status:

Status CodeDescriptionschema
200OKServerResponseQuerySyncTaskStatusResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Query Sync Task Status Response Object)Common Response Object (data type: Query Sync Task Status Response Object)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataQuery Sync Task Status Response ObjectQuery Sync Task Status Response Object
ResponseTask Status Details ObjectTask Status Details Object
StatusTask status, options: PENDING (Queuing), RUNNING (In progress), FINISH (Completed), ERROR (Failed)string
UserCountNumber of synchronized users. Note: This field may return null, indicating that no valid value can be obtained.integer
DepartCountNumber of synchronized departments. Note: This field may return null, indicating that no valid value can be obtained.integer
TagCountNumber of synchronized tags. Note: This field may return null, indicating that no valid value can be obtained.integer
LicensedUserCountNumber of licensed users. Note: This field may return null, indicating that no valid value can be obtained.integer
UnLicensedUserCountNumber of unlicensed users. Note: This field may return null, indicating that no valid value can be obtained.integer
ErrorMsgFailure reasonstring

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"Response": {
"Status": "FINISH",
"UserCount": 0,
"DepartCount": 0,
"TagCount": 0,
"LicensedUserCount": 0,
"UnLicensedUserCount": 0,
"ErrorMsg": ""
}
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Authorization/Freezing User license

Endpoint:/weda/auth/v1/{envType}/batchOperateWedaUserLicense

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"GrantUserIdList": [
"160483621866285465a"
],
"FreezeUserIdList": [
"160483621866285465a"
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Authorization License Input ObjectAuthorization and Freezing user lists cannot both be emptybodytrueAuthorization License Input ObjectAuthorization License Input Object
GrantUserIdListList of user IDs granted licensefalsearraystring
FreezeUserIdListList of user IDs with frozen licensesfalsearraystring

Response Status:

Status CodeDescriptionschema
200OKServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Boolean)Common Response Object (data type: Boolean)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
Databoolean

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Organization Management

Create Organization

Endpoint:/weda/auth/v1/{envType}/addOrg

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"OrgData": "{\"departmentCode\":\"zbm_kfbm\",\"departmentName\":\"Open Department\",\"departmentParentCode\":\"\",\"info\":\"Extended field value\"}"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Add Department Input Parameter ObjectbodytrueAdd Department Input Parameter ObjectAdd Department Input Parameter Object
OrgDataDepartment information; format: department information json string; contains the following parameters:
departmentCode: department identifier, required, must be unique, a string of 1-64 characters that can only contain letters, digits, underscores, '.', and '-';
departmentName: department name, required, a string of 2-32 characters that can only contain letters, digits, underscores, '.', and '-', and must start with a letter or Chinese character;
departmentParentCode: parent department identifier, optional, note: the department identifier of the parent department.
Extended fields of the department data model; multiple extended fields can exist and are optional. For example, the info field in the sample can be assigned a value when adding a department.
Example: {\"departmentCode\":\"zbm_kfbm\",\"departmentName\":\"Open Department\",\"departmentParentCode\":\"\",\"info\":\"Extended field value\"}
truestring

Response Status:

Status CodeDescriptionschema
200OKServerResponseString

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: String)Common Response Object (data type: String)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataDepartment id, defaults to the department identifierstring

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": ""
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Update Organization

Endpoint:/weda/auth/v1/{envType}/updateOrg

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

Update information by department id

Request Example:

{
"OrgData": "{\"_id\":\"zbm_kfbm\",\"departmentName\":\"Open Department\",\"departmentParentCode\":\"zbm_kfbm_parent\",\"info\":\"Extended field value\"}"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Update Department Input Parameter ObjectUpdate Department Input Parameter Objectbodytrue
OrgDataDepartment information; format: department information json string; contains the following parameters:
_id: department ID, required; departmentName: department name, optional, will not be updated if not passed; departmentParentCode: parent department identifier, optional, will not be updated if not passed.
Extended fields of the department data model, optional, will not be updated if not passed. For example, the info field in the sample can update extended information by department ID.
Example: {\"_id\":\"zbm_kfbm\",\"departmentName\":\"Open Department\",\"departmentParentCode\":\"zbm_kfbm_parent\",\"info\":\"Extended field value\"}
truestring

Response Status:

Status CodeDescriptionschema
200OKServerResponseLong

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response ObjectCommon Response Object
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataupdateNuminteger(int64)

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": 0
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Delete Organization

Endpoint:/weda/auth/v1/{envType}/deleteOrg

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"OrgId": "zbm_kfbm"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Delete Department Request ObjectDelete Department Request ObjectbodytrueDelete Department Request ObjectDelete Department Request Object
OrgIdDepartment id, returned by the create organization structure interfacetruestring

Response Status:

Status CodeDescriptionschema
200OKServerResponseLong

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Long)Common Response Object (data type: Long)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DatadeletedNuminteger(int64)

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": 0
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Organization List

Endpoint:/weda/auth/v1/{envType}/describeOrgs

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"PageNo": 1,
"PageSize": 10
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
PageNoPage number, default is 1bodyfalseinteger(int32)
PageSizeNumber per page, default is 1000bodyfalseinteger(int32)

Response Status:

Status CodeDescriptionschema
200OKServerResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response ObjectCommon Response Object
RequestIdrequestIdstring
ErrorError MessageError Message
CodeError codestring
MessageError message promptstring
DataDepartment List
DataListDepartment list, parameter value is a json string
Both DataId and _id represent department id;
Example:
["DataId":"zbm_kfbm","DataRecord":"{\"_id\":\"zbm_kfbm\",\"departmentCode\":\"zbm_kfbm\",\"departmentName\":\"Open Department\",\"departmentParentCode\":\"\"}"]
array
TotalTotalinteger

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"DataList": [
{
"DataId": "zbm_kfbm",
"DataRecord": "{\"_id\":\"zbm_kfbm\",\"departmentCode\":\"zbm_kfbm\",\"departmentName\":\"Open Department\",\"departmentParentCode\":\"zbm_kfbm_parent\"}"
}
],
"Total": 1
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Set Department Head

Endpoint:/weda/auth/v1/prod/setOrgPrincipal

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"orgId": "org_001",
"userIdList": ["1666390158540275714","1666390231445803001"]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
Set Department Head Input Parameter ObjectbodytrueSet Department Head Object
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
orgIdDepartment idtruestring
userIdListList of department head weda user IDs.
Full update; each API call uses the passed users as department heads. Users not passed will be removed from department heads.
Passing empty or omitting this parameter indicates the department has no department head
falsearraystring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
response
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataWhether successfulboolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Manage Roles

Create Role

Endpoint:/weda/auth/v1/prod/createRole

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"roleName": "custom role name",
"roleIdentity": "zdyjsbs",
"description": ""
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Create Role Request ObjectCreate Role Request ObjectbodytrueCreate Role Request ObjectCreate Role Request Object
roleNameRole nametruestring
roleIdentityRole identitytruestring
descriptionDescriptionfalsestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseString

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object (data type: String)Common Response Object (data type: String)
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataRole idstring

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": "1680507332078"
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Update Role

Endpoint:/weda/auth/v1/prod/modifyRole

Request Method:PUT

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"roleId": "1680507332078",
"roleName": "custom role name",
"description": ""
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Update Role Input Parameter ObjectUpdate Role Input Parameter ObjectbodytrueUpdate Role Input Parameter ObjectUpdate Role Input Parameter Object
roleIdRole id, returned by the create user interfacetruestring
roleNameRole name; if not passed, it will not be updatedfalsestring
descriptionDescription; if not passed, it will not be updatedfalsestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object, data type: BooleanCommon Response Object, data type: Boolean
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataWhether successfulboolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Delete Role

Endpoint:/weda/auth/v1/prod/deleteRole

Request Method:DELETE

Response Data Type:*/*

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
roleIdRole idquerytruestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object, data type: BooleanCommon Response Object, data type: Boolean
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataWhether successfulboolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Query Role Details

Endpoint:/weda/auth/v1/prod/describeRole

Request method:GET

Response Data Type:*/*

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
roleNameRole namequerytruestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseRoleDetailsResponse

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response ObjectCommon Response Object
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataRelated rolesRole detail objectRole detail object
roleNameRole namestring
roleIdentityRole identitystring
roleIdRole idstring
descriptionRole descriptionstring
isReleasedWhether releasedboolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"roleName": "Role name",
"roleIdentity": "RoleIdentity",
"roleId": "1688855289721864193",
"description": "",
"isReleased": true
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Role List

Endpoint:/weda/auth/v1.1/{envType}/describeRoleList

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"PageNo": 1,
"PageSize": 10
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Role List Request ObjectRole List Request ObjectbodytrueRole List Request ObjectRole List Request Object
PageNoPage numberfalseinteger(int32)
PageSizePage size, default is 100falseinteger(int32)

Response Status:

Status CodeDescriptionschema
200OKServerResponseRoleListResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Role List Response Object)Common Response Object (data type: Role List Response Object)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataRole List Response ObjectRole List Response Object
TotalTotalinteger
RoleListRelated rolesarrayRole detail object
NameRole namestring
RoleIdentityrole identitystring
IdRole IDstring
RoleDescRole descriptionstring
IsReleasedWhether releasedboolean

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"Total": 1,
"RoleList": [
{
"Name": "Role name",
"RoleIdentity": "RoleIdentity",
"Id": "1688855289721864193",
"RoleDesc": "",
"IsReleased": true
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Query User List by Role

Endpoint:/weda/auth/v1/{envType}/describeUsersByRoleId

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"RoleId": "1680507332078",
"PageNo": 1,
"PageSize": 10
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Query Role User Input Parameters ObjectQuery Role User Input Parameters ObjectbodytrueQuery Role User Input Parameters ObjectQuery Role User Input Parameters Object
RoleIdRole idtruestring
PageNoPage numberfalseinteger(int32)
PageSizePage size, default is 100falseinteger(int32)

Response Status:

Status CodeDescriptionschema
200OKServerResponseQueryUserResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object, with data field of type Query User Response ObjectCommon Response Object, with data field of type Query User Response Object
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataQuery User Response ObjectQuery User Response Object
TotalTotalinteger
UserListUser ListarrayUser Response Object
NameNamestring
TypeUser type, 0: internal user, 1: external user, 2: anonymous userinteger
InternalUserTypeInternal user type, 1: Super administrator; 0: Self-created userinteger
SourceSourceinteger
NickNameNicknamestring
EmailEmailstring
PhonePhone numberstring
RelatedRolesRelated rolesarrayRole detail object
NameRole namestring
RoleIdentityRole Identitystring
IdRole IDstring
RoleDescRole descriptionstring
IsReleasedWhether releasedboolean
UserDescUser descriptionstring
UserIdUser idstring
OrgsPrimary departmentarrayDepartment object
OrgIdDepartment idstring
OrgIdentityDepartment identifierstring
UserExtendUser data source extension information, json stringstring
MainOrgPrimary departmentDepartment objectDepartment object
OrgIdDepartment idstring
OrgIdentityDepartment identifierstring

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"Total": 1,
"UserList": [
{
"Uin": "100021405902",
"Name": "testUser",
"EnvId": "lowcode-4gs26nnz095f6f4d",
"Type": 0,
"InternalUserType": 0,
"Source": 1,
"NickName": "test_user_9",
"Email": "",
"Phone": "",
"RelatedRoles": [
{
"Name": "test",
"RoleIdentity": "zsjs15",
"Source": 1,
"UpdateTime": "2023-08-08T18:19:42",
"Id": "1688855289721864193",
"RoleDesc": "Description 123333",
"EnvId": "lowcode-4gs26nnz095f6f4d"
}
],
"Uuid": "test_user_9",
"UserDesc": "test_user_9",
"UserId": "1668468556945092610",
"UpdateTime": "2023-07-05T11:28:17.283",
"UserExtend": ""
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

User Role Association

Endpoint:/weda/auth/v1/{envType}/batchAuthorize

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"AuthorizeParam": [
{
"UserId": "1668468556945092610",
"RoleIds": ["1688855289721864193"]
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
User Association Request ObjectUser Association Request ObjectbodytrueUser Association Request ObjectUser Association Request Object
AuthorizeParamBinding parameterfalsearrayRole-User Association Object
UserIdweda user idtruestring
RoleIdsRole id list, overwrite update; omission or an empty array means binding no rolesfalsearraystring

Response Status:

Status CodeDescriptionschema
200OKServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: Boolean)Common Response Object (data type: Boolean)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataWhether successfulboolean

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Users Disassociated from Roles

Endpoint:/weda/auth/v1/prod/unbindRoleUsers

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"roleId": "1688855289721864193",
"userIds": ["1668468556945092610"]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Unbind Role Users Request ObjectUnbind Role Users Request ObjectbodytrueUnbind Role Users Request ObjectUnbind Role Users Request Object
roleIdRole Idtruestring
userIdsList of user IDs to unbindtruearraystring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object, data type: BooleanCommon Response Object, data type: Boolean
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataWhether successfulboolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Update Authorized User List for Role

API Endpoint:/weda/auth/v1/prod/updateRoleUsers

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

Request Example:

{
"roleId":"1673888777029201921",
"userIds":[
"1696423988333817859",
"1694893419890860034"
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Update Authorized Users under Rolebodytrue
roleIdRole idtruestring
userIdsAuthorized weda user id listtruearraystring

Response Status:

Status CodeDescriptionschema
200OKBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
response
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
databoolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Publish Role

Endpoint:/weda/auth/v1/prod/releaseRole

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

This interface is used to publish all roles to the production environment. Whenever role information, role-associated members, or role-bound permissions are modified, the role must be published through this interface to take effect in the production environment. The role publishing status can be viewed via the role details query interface or the WeDa console.

Request Parameters:

Null Object

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponsePublishRoleResponse

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response ObjectCommon Response Object
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataPublish Role Response ObjectPublish Role Response Object
taskIdRole Publishing Task idstring

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"taskId": "79c83a32-38ef-429f-a8d4-82ee71086a00"
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Query Publish Role Status

Endpoint:/weda/auth/v1/prod/describeReleaseStatus

Request method:GET

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

Query the release status based on the publish role task id.

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
taskIdRole Publishing Task idquerytruestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseTaskStatusResponse

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object (data type: Task Status Response Object)Common Response Object (data type: Task Status Response Object)
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataTask Status Response ObjectTask Status Response Object
taskStatusDeployment task status, values: SUCCESS (Deployment successful), PENDING (Deployment in progress), FAILED (Deployment failed)string

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"taskStatus": "SUCCESS"
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Resource and Permission Management

Binding Role Resource Permissions

Endpoint:/weda/auth/v1/prod/bindRoleResources

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

This interface is used to bind resource permissions for applications, pages, data models, and processes to roles.

Request Example:

{
"roleId": "1680507332078",
"resourceType": "app",
"resourceIds": [
"app-vlpgih87"
],
"rowPermissionParams": [
{
"rowPermissionScopeType": "all",
"rowPermissionOperationType": "rw"
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Bind and Unbind Role Permissions Request ObjectBind and Unbind Role Permissions Request ObjectbodytrueBind and Unbind Role Permissions Request ObjectBind and Unbind Role Permissions Request Object
roleIdRole Idtruestring
resourceTypeResource type, parameter values: Custom Application: app, Custom Application Page: page, Model Application: modelApp, Model Application Page: modelAppPage, Data Source Row Permission: dataSource, Flow: flowtruestring
resourceIdsUnique resource identifier; parameter values: Custom Application: Application ID, Custom Application Page: Application ID - Page ID, Model Application: Application ID, Model Application Page: Application ID - Page ID, Data Source Row Permission: Data Model ID, Flow: Flow IDtruearraystring
rowPermissionParamsRow PermissionfalsearrayData Row Permission Object
rowPermissionScopeTypeScope type, values: all data: all, data of the department and its sub-departments: org, data of the current user and subordinates: staff, current user's data: mefalsestring
rowPermissionOperationTypeValues: read-only: r, read-write: rwfalsestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBindAndUnbindRolePermissionsResponseObject

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object (data type: Bind and Unbind Role Permissions Response Object)Common Response Object (data type: Bind and Unbind Role Permissions Response Object)
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataBind and Unbind Role Permissions Response ObjectBind and Unbind Role Permissions Response Object
failResourceIdsList of failed resources (usually empty; retry API if failed data is returned)arraystring

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"failResourceIds": []
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Unbinding Role Resource Permissions

Endpoint:/weda/auth/v1/prod/unbindRoleResources

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

This interface is used to unbind resource permissions for applications, pages, data models, and processes from roles.

Request Example:

{
"roleId": "1680507332078",
"resourceType": "app",
"resourceIds": [
"app-vlpgih87"
],
"rowPermissionParams": [
{
"rowPermissionScopeType": "all",
"rowPermissionOperationType": "rw"
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Bind and Unbind Role Permissions Request ObjectbodytrueBind and Unbind Role Permissions Request Object
roleIdRole Idtruestring
resourceTypeResource type, parameter values: Custom Application: app, Custom Application Page: page, Model Application: modelApp, Model Application Page: modelAppPage, Data Source Row Permission: dataSource, Flow: flowtruestring
resourceIdsUnique resource identifier; parameter values: Custom Application: Application ID, Custom Application Page: Application ID - Page ID, Model Application: Application ID, Model Application Page: Application ID - Page ID, Data Source Row Permission: Data Model ID, Flow: Flow IDtruearraystring
rowPermissionParamsRow PermissionfalsearrayData Row Permission Object
rowPermissionScopeTypeScope type, values: all data: all, data of the department and its sub-departments: org, data of the current user and subordinates: staff, current user's data: mefalsestring
rowPermissionOperationTypeValues: read-only: r, read-write: rwfalsestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBindAndUnbindRolePermissionsResponseObject

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response ObjectCommon Response Object
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataBind and Unbind Role Permissions Response ObjectBind and Unbind Role Permissions Response Object
failResourceIdsList of failed resources (usually empty; retry API if failed data is returned)arraystring

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"failResourceIds": []
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Verify Role Resource Permissions

Endpoint:/weda/auth/v1/prod/checkRoleResource

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

This interface is used to check whether a role has resource permissions for applications, pages, and processes, and to query row-level permissions for data models.

Request Example:

{
"roleId": "1680507332078",
"resourceType": "app",
"resourceIds": [
"app-vlpgih87"
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Verify Permission ObjectbodytrueVerify Permission Object
roleIdRole Idtruestring
resourceTypeResource type, parameter values: Custom Application: app, Custom Application Page: page, Model Application: modelApp, Model Application Page: modelAppPage, Data Source Row Permission: dataSource, Flow: flowtruestring
resourceIdsUnique resource identifier; parameter values: Custom Application: Application ID, Custom Application Page: Application ID - Page ID, Model Application: Application ID, Model Application Page: Application ID - Page ID, Data Source Row Permission: Data Model ID, Flow: Flow IDtruearraystring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseListVerifyRolePermissionsResponseObject

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response ObjectCommon Response Object
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataarrayVerify Role Permissions Response Object
roleIdRole Idstring
resourceTypeResource Typestring
resourceIdUnique Resource Identifierstring
isAccessWhether access is grantedboolean
rowPermissionParamsRow PermissionarrayData Row Permission Object
rowPermissionScopeTypeScope type, values: all data: all, data of the department and its sub-departments: org, data of the current user and subordinates: staff, current user's data: mefalse
rowPermissionOperationTypeValues: read-only: r, read-write: rwfalse

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": [
{
"roleId": "1680507332078",
"resourceType": "app",
"resourceId": "app-vlpgih87",
"isAccess": true,
"rowPermissionParams": [
{
"rowPermissionScopeType": "all",
"rowPermissionOperationType": "rw"
}
]
}
]
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Bind API Permissions

Endpoint:/weda/auth/v1/prod/bindMethodAuth

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"roleId": "1680507332078",
"dataSourceId": "data-2WJ5tUFYY",
"methodList": [
{
"methodName": "method_bq7ylr0smpo1c",
"isAccess": true
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
API Permission Request ObjectAPI Permission Request ObjectbodytrueAPI Permission Request ObjectAPI Permission Request Object
roleIdRole Idtruestring
dataSourceIdData source id corresponding to the APIstruestring
methodListMethod name listtruearrayMethod Permission
methodNameMethod namefalsestring
isAccessWhether usage permission is grantedfalseboolean

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object, data type: BooleanCommon Response Object, data type: Boolean
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
databoolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Query Role-Bound API Permissions

Endpoint:/weda/auth/v1/prod/describeMethodAuth

Request method:GET

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
roleIdRole idquerytruestring
dataSourceIdData source id corresponding to the APIsquerytruestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseAPIPermissionsListResponseObject

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object (data type: API Permissions List Response Object)Common Response Object (data type: API Permissions List Response Object)
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataAPI Permissions List Response ObjectAPI Permissions List Response Object
methodAuthListMethod name listarrayMethod Permission
methodNameMethod namestring
isAccessWhether access is grantedboolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"methodAuthList": [
{
"methodName": "method_bq7ylr0smpo1c",
"isAccess": true
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Bind Data Model Column Permissions

Endpoint:/weda/auth/v1/prod/bindColumnAuth

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"roleId": "1680507332078",
"dataSourceId": "data-2WJ5tUFYY",
"columnAuthList": [
{
"column": "fkxm",
"auth": "rw"
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Bind Field Permission Request ObjectBind Field Permission Request ObjectbodytrueBind Field Permission Request ObjectBind Field Permission Request Object
roleIdRole Idtruestring
dataSourceIdData source idtruestring
columnAuthListField permission listtruearrayField Permission
columnField Identifierfalsestring
authField permission, Valid values: No permission: n, View only: r, View and modify: rwfalsestring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBoolean

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object, data type: BooleanCommon Response Object, data type: Boolean
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
databoolean

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": true
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Querying Role-Bound Data Model Column Permissions

Endpoint:/weda/auth/v1/prod/describeColumnAuth

Request method:GET

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
roleIdRole idquerytruestring
dataSourceIdData source idquerytruestring
columnListField listquerytruearraystring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseFieldPermissionsResponseObject

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object (data type: Field Permissions Response Object)Common Response Object (data type: Field Permissions Response Object)
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataField Permissions Response ObjectField Permissions Response Object
columnAuthListField Permission ListarrayField Permission
columnField Identifierstring
authField permission, Valid values: No permission: n, View only: r, View and modify: rwstring

Response Example:

{
"response": {
"requestId": "",
"error": {
"code": "",
"message": ""
},
"data": {
"columnAuthList": [
{
"column": "fkxm",
"auth": "rw"
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Resource Authentication

Endpoint:`/weda/auth/v1/{envType}/describeResourcesPermission

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"UserInfo": {
"Uid": "151928937067085004a",
"Source": 4
},
"ResourceList": [
{
"ResourceId": "app-x74toau6-u_biao_dan_ti_jiao",
"SubResourceId": [],
"MethodIdList": [],
"ColumnList": []
}
],
"ResourceType": "app"
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Resource Authentication Request ObjectResource Authentication Request ObjectbodytrueResource Authentication Request ObjectResource Authentication Request Object
UserInfoUser InformationfalseUser Information Request ObjectUser Information Request Object
UidUser idtruestring
SourceSource, must be 4trueinteger
ResourceListResource listfalsearrayResource Permission Request Object
ResourceIdResource ID; value description: Custom Application: Application ID, Model Application: Application ID, Flow: Flow IDtruestring
SubResourceIdSub-resource id list; value description: Custom Application: pageId, Model Application: pageIdfalsearraystring
MethodIdListMethod id listfalsearraystring
ColumnListField Identifier Listfalsearraystring
ResourceTypeResource type, value description: Custom Application: app, Model Application: modelApp, Data Source: dataSource, Flow: flowtruestring

Response Status:

Status CodeDescriptionschema
200OKServerResponseListResourceAuthorizationResponse

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object (data type: List Resource Authorization Response Object)Common Response Object (data type: List Resource Authorization Response Object)
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataarrayResource Authorization Response Object
ResourceIdResource idstring
ResourceTypeResource Typestring
IsAccessWhether access is grantedboolean

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": [
{
"ResourceId": "app-x74toau6-u_biao_dan_ti_jiao",
"ResourceType": "app",
"IsAccess": true
}
]
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Data Authentication

Endpoint:/weda/auth/v1/{envType}/describeAuthStrategy

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Request Example:

{
"UserInfo": {
"Uid": "151928937067085004a",
"Source": 4
},
"Resource": {
"ResourceId": "app-x74toau6-u_biao_dan_ti_jiao",
"ColumnList": []
}
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Data Authentication Request ObjectbodytrueData Authentication Request Object
UserInfoUser InformationtrueUser Information Request Object
UidUser idtruestring
SourceSource, must be 4trueinteger
ResourceResource objecttrueResource Permission Request Object
ResourceIdResource ID, Value description: data source ID
How to get the data source ID:
In the weda console - Data Model module - after opening the data model details,
the parameter value of detailDataSourceId in the browser's URL is the data source ID
truestring
ColumnListField Identifier List, used for obtaining column permissions of the passed-in fieldsfalsearraystring

Response Status:

Status CodeDescriptionschema
200OKResponse Object

Response Parameters:

Parameter NameDescriptionTypeschema
ResponseCommon Response Object
RequestIdrequestIdstring
ErrorError MessageError MessageError Message
CodeError codestring
MessageError message promptstring
DataData Authorization Response ObjectData Authorization Response Object
UserIdUser idstring
PermissionData PermissionsData Permissions ObjectData Permissions Object
ResourceIdResource idstring
RowPermissionRow PermissionData Row Permission Object
ReadRead Permissionstring
TypePermission type
Description:
1: no permission; 2: view own; 3: view current department and sub-departments;
4: view all; 5: own and subordinates; 6: custom conditions
integer
ScopeScope
Description:
When type is 1 or 4, this field is empty; when type is 2, scope is user id
When type is 3, scope is the set of sub-organization IDs
When type is 5, scope is the set of sub-user IDs
arraystring
WriteWrite Permissionstring
TypePermission type
Description:
1: no permission; 2: view own; 3: view current department and sub-departments;
4: view all; 5: own and subordinates; 6: custom conditions
integer
ScopeScope
Description:
When type is 1 or 4, this field is empty; when type is 2, scope is user id
When type is 3, scope is the set of sub-organization IDs
When type is 5, scope is the set of sub-user IDs
arraystring
ColumnPermissionField Permission (KEY takes the field identifier as its value)object

Response Example:

{
"Response": {
"RequestId": "",
"Error": {
"Code": "",
"Message": ""
},
"Data": {
"Permission": {
"RowPermission": {
"Read": {
"Type": 1,
"Scope": []
},
"Write": {
"Type": 1,
"Scope": []
}
},
"ColumnPermission": {},
"ResourceId": "data-2Nb189cVi"
},
"UserId": "1663382152219467778"
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception

Batch Data Authentication

Endpoint:/weda/auth/v1/{envType}/describeBatchAuthStrategy

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

Interface Description:

Request Example:

{
"userId": "1692086238293827589",
"resourceList": [
{
"resourceId": "data-2ZYkCBqB5",
"columnIdList": []
},
{
"resourceId": "data-2Z0a7Ems0",
"columnIdList": []
},
{
"resourceId": "data-2YrtgmaTx",
"columnIdList": []
}
]
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData Typeschema
envTypeEnvironment type, prod for production environment, must pass prodpathtruestring
AuthorizationAuthentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overviewheadertruestring
Batch Data Authentication Request ObjectbodytrueBatch Data Authentication Request Object
userIdweda user idtruestring
weAppIdweda app id
Description: If this parameter is passed and the user has no role bound, the permission settings configured for the corresponding application will be used for authentication.
falsestring
resourceListResource listtruearray
resourceIdResource ID, Value description: data source ID
How to get the data source ID:
In the weda console - Data Model module - after opening the data model details,
the parameter value of detailDataSourceId in the browser's URL is the data source ID
truestring
columnIdListData model field list, used for obtaining column permissions of the passed-in fieldsfalsearraystring

Response Status:

Status CodeDescriptionschema
200OKOpenApiServerResponseBatchDataAuthenticationResponseObject

Response Parameters:

Parameter NameDescriptionTypeschema
responseCommon Response Object
requestIdrequestIdstring
errorError MessageError MessageError Message
codeError codestring
messageError message promptstring
dataBatch Data Authorization Response Object
authStrategyListarrayData Permission Object
resourceIdResource idstring
rowPermissionRow Permissionobject
readRead Permissionstring
typePermission type
Description:
1: no permission; 2: view own; 3: view current department and sub-departments;
4: view all; 5: own and subordinates; 6: custom conditions
integer
scopeScope
Description:
When type is 1 or 4, this field is empty; when type is 2, scope is user id
When type is 3, scope is the set of sub-organization IDs
When type is 5, scope is the set of sub-user IDs
arraystring
writeWrite Permissionstring
typePermission type
Description:
1: no permission; 2: view own; 3: view current department and sub-departments;
4: view all; 5: own and subordinates; 6: custom conditions
integer
scopeScope
Description:
When type is 1 or 4, this field is empty; when type is 2, scope is user id
When type is 3, scope is the set of sub-organization IDs
When type is 5, scope is the set of sub-user IDs
arraystring
columnPermissionField Permission (KEY takes the field identifier as its value)object

Response Example:

{
"response": {
"requestId": "8918a0bbeff1f",
"data": {
"authStrategyList": [
{
"resourceId": "data-2ZYkCBqB5",
"rowPermission": {
"read": {
"scope": [],
"type": 4
},
"write": {
"scope": [
"1692086238293827587"
],
"type": 2
}
},
"columnPermission": {
"flowkey": "rw"
}
},
{
"resourceId": "data-2Z0a7Ems0",
"rowPermission": {
"read": {
"scope": [],
"type": 4
},
"write": {
"scope": [],
"type": 1
}
},
"columnPermission": {}
},
{
"resourceId": "data-2YrtgmaTx",
"rowPermission": {
"read": {
"scope": [],
"type": 4
},
"write": {
"scope": [],
"type": 4
}
},
"columnPermission": {}
}
]
}
}
}

Error Code: The following lists only the error codes related to interface business logic. For other public error codes, see Overview - Interface Exception Returns.

Error CodeDescription
InvalidActionInterface does not exist
InvalidParameterParameter error
InvalidParameterValueInvalid parameter value
MissingParameterMissing parameter error
InternalErrorInternal Error
FailedOperationOperation failed, server exception