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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Create User Object | body | true | Create User Object | ||
Name | Username; Format: Must start with a letter or digit, length between 1-64 characters Can only contain uppercase/lowercase letters, digits, and symbols: - _ . @ | true | string | ||
NickName | Nickname; Format: 2-64 characters string | false | string | ||
Phone | Phone number; must be correctly formatted and unique | false | string | ||
Email; must be correctly formatted and unique | false | string | |||
Uuid | Customer 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 | false | string | ||
Password | Password; Format: 4-60 characters string; Note: Uuid and Password cannot be empty at the same time | false | string | ||
ParentUserId | Direct superior user ID; Note: weda user ID | false | string | ||
RoleIds | Role id list | false | array | string | |
MainOrg | Primary department | false | Department object | ||
OrgId | Department id | true | string | ||
OrgIdentity | Department identifier | false | string | ||
Description | User description | false | string | ||
UserExtend | User data source extension information, json string | false | string | ||
Sort | Weight; used for user sorting | false | integer |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object | Common Response Object | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | User id | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Delete User Request Object | body | true | Delete User Request Object | ||
UserIdList | weda user ID (pass one weda user ID only; single deletion supported) | true | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Boolean) | Common Response Object (data type: Boolean) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Update User Object | body | true | Update User Object | ||
UserId | weda user id | true | string | ||
Name | Username; 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 | false | string | ||
NickName | Nickname; Format: 2-64 characters string; Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification | false | string | ||
Phone | Phone number; Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification | false | string | ||
Email; Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification | false | string | |||
Password | Password; Format: 4-60 characters string; Note: Passing an empty string, omitting this parameter, or passing null means no modification | false | string | ||
ParentUserId | Direct superior user id; Note: Omitting this parameter or passing null means no modification | false | string | ||
RoleIds | Role id list; Note: Omitting this parameter, passing null, or passing an empty array means no role modification | false | array | string | |
MainOrg | Primary department; Note: Omitting this parameter, passing null, or passing an empty object will clear the primary department | false | Department object | ||
OrgId | Department id | true | string | ||
OrgIdentity | Department identifier | false | string | ||
Description | User description; Note: Passing an empty string will set to empty, omitting this parameter or passing null means no modification | false | string | ||
UserExtend | User data source extension information, json string; Note: Passing an empty string, omitting this parameter, or passing null means no modification | false | string | ||
Sort | Weight; used for user sorting Note: Omitting this parameter or passing null means no modification | false | integer |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Boolean) | Common Response Object (data type: Boolean) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Query User Input Parameters Object | Query User Input Parameters Object | body | true | Query User Input Parameters Object | Query User Input Parameters Object |
UserId | weda user id | true | string | ||
RelatedType | Whether to return associated roles; Note: If this parameter is omitted, associated roles are not returned by default; to return associated roles, pass 'UserRelatedRole' | false | string | ||
WithIdentities | Whether to obtain IdP Token information | false | boolean |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseUserResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object, data type: User Response Object | ||
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
Data | User List | User Response Object | User Response Object |
Name | Name | string | |
Type | User type 0: internal user, 1: external user, 2: anonymous user | integer | |
InternalUserType | Internal user type 1: Super administrator; 0: Self-created user | integer | |
Source | Source 1: Self-created user 2: WeCom 3: External user | integer | |
NickName | Nickname | string | |
string | |||
Phone | Phone number | string | |
RelatedRoles | Related roles | array | Role detail object |
Name | Role name | string | |
RoleIdentity | role identity | string | |
Id | Role ID | string | |
RoleDesc | Role description | string | |
IsReleased | Whether released | boolean | |
UserDesc | User description | string | |
UserId | User id | string | |
UserExtend | User data source extension information, json string | string | |
MainOrg | Primary department | Department object | Department object |
OrgId | Department id | string | |
OrgIdentity | Department identifier | string | |
Identities | External identity source | array | |
Provider | Identity source ID | string | |
AccessToken | Access Token in the external identity source | string | |
RefreshToken | Refresh Token in the external identity source | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Query User List Input Parameters Object | Query User List Input Parameters Object | body | true | Query User List Input Parameters Object | Query User List Input Parameters Object |
PageNo | Page number, default is 1 | false | integer(int32) | ||
PageSize | Page size, default is 100 | false | integer(int32) |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseQueryUserResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object | ||
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Query User Response Object | Query User Response Object | |
Total | Total | integer | |
UserList | User List | array | User Response Object |
Name | Name | string | |
Type | User type 0: internal user, 1: external user, 2: anonymous user | integer | |
InternalUserType | Internal user type 1: Super administrator; 0: Self-created user | integer | |
Source | Source | integer | |
NickName | Nickname | string | |
string | |||
Phone | Phone number | string | |
RelatedRoles | Related roles | array | Role detail object |
Name | Role name | string | |
RoleIdentity | Role Identity | string | |
Id | Role ID | string | |
RoleDesc | Role description | string | |
IsReleased | Whether released | boolean | |
UserDesc | User description | string | |
UserId | User id | string | |
UserExtend | User data source extension information, json string | string | |
MainOrg | Primary department | Department object | Department object |
OrgId | Department id | string | |
OrgIdentity | Department identifier | string | |
OrgName | Department name | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Batch Add User Objects | Batch Add User Objects | body | true | ||
users | User List; the number of users added in a single request cannot exceed 100 | true | array | ||
name | Username; Format: Must start with a letter or digit, length between 1-64 characters Can only contain uppercase/lowercase letters, digits, and symbols: - _ . @ | true | string | ||
nickName | Nickname; Format: 2-64 characters string | false | string | ||
phone | Phone number; must be correctly formatted and unique | false | string | ||
Email; must be correctly formatted and unique | false | string | |||
uuid | Customer 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 | false | string | ||
password | Password; Format: 4-60 characters string; Note: Uuid and Password cannot be empty at the same time | false | string | ||
parentUserId | Direct superior user ID; Note: weda user ID | false | string | ||
roleIds | Role id list | false | array | string | |
mainOrg | Primary department | false | Department object | ||
orgId | Department id | true | string | ||
orgIdentity | Department identifier | false | string | ||
description | User description | false | string | ||
userExtend | User data source extension information, json string | false | string | ||
sort | Weight | false | integer |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object | Common Response Object | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Response Object | ||
users | User List | array | User Object |
userId | weda user id | string | |
uuid | Customer system user id; if not provided, will be generated by the system | false | |
name | User name | true | |
nickName | Nickname | false | |
phone | Phone number | false | |
false | |||
parentUserId | Direct superior user id | false | |
roleIds | Role id list | false | |
mainOrg | Primary department | false | |
orgId | Department id | true | |
orgIdentity | Department identifier | false | |
description | User description | false | |
userExtend | User data source extension information, json string | false | |
sort | Weight | integer |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Trigger Sync Task Input Parameters Object | Trigger Sync Task Input Parameters Object | body | true | Trigger Sync Task Input Parameters Object | Trigger Sync Task Input Parameters Object |
EnvId | Environment id | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseTriggerSyncTaskResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Trigger Sync Task Response Object) | Common Response Object (data type: Trigger Sync Task Response Object) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Trigger Sync Task Output Parameters Object | Trigger Sync Task Output Parameters Object | |
Response | Trigger Sync Task Details Object | Trigger Sync Task Details Object | |
ExpiresIn | Validity period | integer | |
SyncTaskId | Sync Task Id | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Input Parameters Object for Querying Sync Task Status | Input Parameters Object for Querying Sync Task Status | body | true | Input Parameters Object for Querying Sync Task Status | Input Parameters Object for Querying Sync Task Status |
EnvId | Environment id | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseQuerySyncTaskStatusResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Query Sync Task Status Response Object) | Common Response Object (data type: Query Sync Task Status Response Object) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Query Sync Task Status Response Object | Query Sync Task Status Response Object | |
Response | Task Status Details Object | Task Status Details Object | |
Status | Task status, options: PENDING (Queuing), RUNNING (In progress), FINISH (Completed), ERROR (Failed) | string | |
UserCount | Number of synchronized users. Note: This field may return null, indicating that no valid value can be obtained. | integer | |
DepartCount | Number of synchronized departments. Note: This field may return null, indicating that no valid value can be obtained. | integer | |
TagCount | Number of synchronized tags. Note: This field may return null, indicating that no valid value can be obtained. | integer | |
LicensedUserCount | Number of licensed users. Note: This field may return null, indicating that no valid value can be obtained. | integer | |
UnLicensedUserCount | Number of unlicensed users. Note: This field may return null, indicating that no valid value can be obtained. | integer | |
ErrorMsg | Failure reason | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Authorization License Input Object | Authorization and Freezing user lists cannot both be empty | body | true | Authorization License Input Object | Authorization License Input Object |
GrantUserIdList | List of user IDs granted license | false | array | string | |
FreezeUserIdList | List of user IDs with frozen licenses | false | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Boolean) | Common Response Object (data type: Boolean) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Add Department Input Parameter Object | body | true | Add Department Input Parameter Object | Add Department Input Parameter Object | |
OrgData | Department 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\"} | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseString |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: String) | Common Response Object (data type: String) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Department id, defaults to the department identifier | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Update Department Input Parameter Object | Update Department Input Parameter Object | body | true | ||
OrgData | Department 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\"} | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseLong |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object | Common Response Object | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | updateNum | integer(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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Delete Department Request Object | Delete Department Request Object | body | true | Delete Department Request Object | Delete Department Request Object |
OrgId | Department id, returned by the create organization structure interface | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseLong |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Long) | Common Response Object (data type: Long) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | deletedNum | integer(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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
PageNo | Page number, default is 1 | body | false | integer(int32) | |
PageSize | Number per page, default is 1000 | body | false | integer(int32) |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object | Common Response Object | |
RequestId | requestId | string | |
Error | Error Message | Error Message | |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Department List | ||
DataList | Department 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 | |
Total | Total | integer |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Set Department Head Input Parameter Object | body | true | Set Department Head Object | ||
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
orgId | Department id | true | string | ||
userIdList | List 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 | false | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | |||
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Create Role Request Object | Create Role Request Object | body | true | Create Role Request Object | Create Role Request Object |
roleName | Role name | true | string | ||
roleIdentity | Role identity | true | string | ||
description | Description | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseString |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object (data type: String) | Common Response Object (data type: String) | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Role id | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Update Role Input Parameter Object | Update Role Input Parameter Object | body | true | Update Role Input Parameter Object | Update Role Input Parameter Object |
roleId | Role id, returned by the create user interface | true | string | ||
roleName | Role name; if not passed, it will not be updated | false | string | ||
description | Description; if not passed, it will not be updated | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object, data type: Boolean | Common Response Object, data type: Boolean | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation failed, server exception |
Delete Role
Endpoint:/weda/auth/v1/prod/deleteRole
Request Method:DELETE
Response Data Type:*/*
Request Parameters:
Parameter Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
roleId | Role id | query | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object, data type: Boolean | Common Response Object, data type: Boolean | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation failed, server exception |
Query Role Details
Endpoint:/weda/auth/v1/prod/describeRole
Request method:GET
Response Data Type:*/*
Request Parameters:
Parameter Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
roleName | Role name | query | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseRoleDetailsResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object | Common Response Object | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Related roles | Role detail object | Role detail object |
roleName | Role name | string | |
roleIdentity | Role identity | string | |
roleId | Role id | string | |
description | Role description | string | |
isReleased | Whether released | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Role List Request Object | Role List Request Object | body | true | Role List Request Object | Role List Request Object |
PageNo | Page number | false | integer(int32) | ||
PageSize | Page size, default is 100 | false | integer(int32) |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseRoleListResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Role List Response Object) | Common Response Object (data type: Role List Response Object) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Role List Response Object | Role List Response Object | |
Total | Total | integer | |
RoleList | Related roles | array | Role detail object |
Name | Role name | string | |
RoleIdentity | role identity | string | |
Id | Role ID | string | |
RoleDesc | Role description | string | |
IsReleased | Whether released | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Query Role User Input Parameters Object | Query Role User Input Parameters Object | body | true | Query Role User Input Parameters Object | Query Role User Input Parameters Object |
RoleId | Role id | true | string | ||
PageNo | Page number | false | integer(int32) | ||
PageSize | Page size, default is 100 | false | integer(int32) |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseQueryUserResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object, with data field of type Query User Response Object | Common Response Object, with data field of type Query User Response Object | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Query User Response Object | Query User Response Object | |
Total | Total | integer | |
UserList | User List | array | User Response Object |
Name | Name | string | |
Type | User type, 0: internal user, 1: external user, 2: anonymous user | integer | |
InternalUserType | Internal user type, 1: Super administrator; 0: Self-created user | integer | |
Source | Source | integer | |
NickName | Nickname | string | |
string | |||
Phone | Phone number | string | |
RelatedRoles | Related roles | array | Role detail object |
Name | Role name | string | |
RoleIdentity | Role Identity | string | |
Id | Role ID | string | |
RoleDesc | Role description | string | |
IsReleased | Whether released | boolean | |
UserDesc | User description | string | |
UserId | User id | string | |
Orgs | Primary department | array | Department object |
OrgId | Department id | string | |
OrgIdentity | Department identifier | string | |
UserExtend | User data source extension information, json string | string | |
MainOrg | Primary department | Department object | Department object |
OrgId | Department id | string | |
OrgIdentity | Department identifier | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
User Association Request Object | User Association Request Object | body | true | User Association Request Object | User Association Request Object |
AuthorizeParam | Binding parameter | false | array | Role-User Association Object | |
UserId | weda user id | true | string | ||
RoleIds | Role id list, overwrite update; omission or an empty array means binding no roles | false | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: Boolean) | Common Response Object (data type: Boolean) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Unbind Role Users Request Object | Unbind Role Users Request Object | body | true | Unbind Role Users Request Object | Unbind Role Users Request Object |
roleId | Role Id | true | string | ||
userIds | List of user IDs to unbind | true | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object, data type: Boolean | Common Response Object, data type: Boolean | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Whether successful | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Update Authorized Users under Role | body | true | |||
roleId | Role id | true | string | ||
userIds | Authorized weda user id list | true | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | Boolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | |||
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponsePublishRoleResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object | Common Response Object | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Publish Role Response Object | Publish Role Response Object | |
taskId | Role Publishing Task id | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
taskId | Role Publishing Task id | query | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseTaskStatusResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object (data type: Task Status Response Object) | Common Response Object (data type: Task Status Response Object) | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Task Status Response Object | Task Status Response Object | |
taskStatus | Deployment 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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Bind and Unbind Role Permissions Request Object | Bind and Unbind Role Permissions Request Object | body | true | Bind and Unbind Role Permissions Request Object | Bind and Unbind Role Permissions Request Object |
roleId | Role Id | true | string | ||
resourceType | Resource type, parameter values: Custom Application: app, Custom Application Page: page, Model Application: modelApp, Model Application Page: modelAppPage, Data Source Row Permission: dataSource, Flow: flow | true | string | ||
resourceIds | Unique 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 ID | true | array | string | |
rowPermissionParams | Row Permission | false | array | Data Row Permission Object | |
rowPermissionScopeType | Scope 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: me | false | string | ||
rowPermissionOperationType | Values: read-only: r, read-write: rw | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBindAndUnbindRolePermissionsResponseObject |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object (data type: Bind and Unbind Role Permissions Response Object) | Common Response Object (data type: Bind and Unbind Role Permissions Response Object) | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Bind and Unbind Role Permissions Response Object | Bind and Unbind Role Permissions Response Object | |
failResourceIds | List of failed resources (usually empty; retry API if failed data is returned) | array | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Bind and Unbind Role Permissions Request Object | body | true | Bind and Unbind Role Permissions Request Object | ||
roleId | Role Id | true | string | ||
resourceType | Resource type, parameter values: Custom Application: app, Custom Application Page: page, Model Application: modelApp, Model Application Page: modelAppPage, Data Source Row Permission: dataSource, Flow: flow | true | string | ||
resourceIds | Unique 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 ID | true | array | string | |
rowPermissionParams | Row Permission | false | array | Data Row Permission Object | |
rowPermissionScopeType | Scope 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: me | false | string | ||
rowPermissionOperationType | Values: read-only: r, read-write: rw | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBindAndUnbindRolePermissionsResponseObject |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object | Common Response Object | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Bind and Unbind Role Permissions Response Object | Bind and Unbind Role Permissions Response Object | |
failResourceIds | List of failed resources (usually empty; retry API if failed data is returned) | array | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Verify Permission Object | body | true | Verify Permission Object | ||
roleId | Role Id | true | string | ||
resourceType | Resource type, parameter values: Custom Application: app, Custom Application Page: page, Model Application: modelApp, Model Application Page: modelAppPage, Data Source Row Permission: dataSource, Flow: flow | true | string | ||
resourceIds | Unique 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 ID | true | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseListVerifyRolePermissionsResponseObject |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object | Common Response Object | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | array | Verify Role Permissions Response Object | |
roleId | Role Id | string | |
resourceType | Resource Type | string | |
resourceId | Unique Resource Identifier | string | |
isAccess | Whether access is granted | boolean | |
rowPermissionParams | Row Permission | array | Data Row Permission Object |
rowPermissionScopeType | Scope 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: me | false | |
rowPermissionOperationType | Values: read-only: r, read-write: rw | false |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
API Permission Request Object | API Permission Request Object | body | true | API Permission Request Object | API Permission Request Object |
roleId | Role Id | true | string | ||
dataSourceId | Data source id corresponding to the APIs | true | string | ||
methodList | Method name list | true | array | Method Permission | |
methodName | Method name | false | string | ||
isAccess | Whether usage permission is granted | false | boolean |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object, data type: Boolean | Common Response Object, data type: Boolean | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation failed, server exception |
Query Role-Bound API Permissions
Endpoint:/weda/auth/v1/prod/describeMethodAuth
Request method:GET
Request Parameters:
Parameter Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
roleId | Role id | query | true | string | |
dataSourceId | Data source id corresponding to the APIs | query | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseAPIPermissionsListResponseObject |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object (data type: API Permissions List Response Object) | Common Response Object (data type: API Permissions List Response Object) | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | API Permissions List Response Object | API Permissions List Response Object | |
methodAuthList | Method name list | array | Method Permission |
methodName | Method name | string | |
isAccess | Whether access is granted | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Bind Field Permission Request Object | Bind Field Permission Request Object | body | true | Bind Field Permission Request Object | Bind Field Permission Request Object |
roleId | Role Id | true | string | ||
dataSourceId | Data source id | true | string | ||
columnAuthList | Field permission list | true | array | Field Permission | |
column | Field Identifier | false | string | ||
auth | Field permission, Valid values: No permission: n, View only: r, View and modify: rw | false | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBoolean |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object, data type: Boolean | Common Response Object, data type: Boolean | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation failed, server exception |
Querying Role-Bound Data Model Column Permissions
Endpoint:/weda/auth/v1/prod/describeColumnAuth
Request method:GET
Request Parameters:
Parameter Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
roleId | Role id | query | true | string | |
dataSourceId | Data source id | query | true | string | |
columnList | Field list | query | true | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseFieldPermissionsResponseObject |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object (data type: Field Permissions Response Object) | Common Response Object (data type: Field Permissions Response Object) | |
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Field Permissions Response Object | Field Permissions Response Object | |
columnAuthList | Field Permission List | array | Field Permission |
column | Field Identifier | string | |
auth | Field permission, Valid values: No permission: n, View only: r, View and modify: rw | string |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Resource Authentication Request Object | Resource Authentication Request Object | body | true | Resource Authentication Request Object | Resource Authentication Request Object |
UserInfo | User Information | false | User Information Request Object | User Information Request Object | |
Uid | User id | true | string | ||
Source | Source, must be 4 | true | integer | ||
ResourceList | Resource list | false | array | Resource Permission Request Object | |
ResourceId | Resource ID; value description: Custom Application: Application ID, Model Application: Application ID, Flow: Flow ID | true | string | ||
SubResourceId | Sub-resource id list; value description: Custom Application: pageId, Model Application: pageId | false | array | string | |
MethodIdList | Method id list | false | array | string | |
ColumnList | Field Identifier List | false | array | string | |
ResourceType | Resource type, value description: Custom Application: app, Model Application: modelApp, Data Source: dataSource, Flow: flow | true | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | ServerResponseListResourceAuthorizationResponse |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object (data type: List Resource Authorization Response Object) | Common Response Object (data type: List Resource Authorization Response Object) | |
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | array | Resource Authorization Response Object | |
ResourceId | Resource id | string | |
ResourceType | Resource Type | string | |
IsAccess | Whether access is granted | boolean |
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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Data Authentication Request Object | body | true | Data Authentication Request Object | ||
UserInfo | User Information | true | User Information Request Object | ||
Uid | User id | true | string | ||
Source | Source, must be 4 | true | integer | ||
Resource | Resource object | true | Resource Permission Request Object | ||
ResourceId | Resource 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 | true | string | ||
ColumnList | Field Identifier List, used for obtaining column permissions of the passed-in fields | false | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | Response Object |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
Response | Common Response Object | ||
RequestId | requestId | string | |
Error | Error Message | Error Message | Error Message |
Code | Error code | string | |
Message | Error message prompt | string | |
Data | Data Authorization Response Object | Data Authorization Response Object | |
UserId | User id | string | |
Permission | Data Permissions | Data Permissions Object | Data Permissions Object |
ResourceId | Resource id | string | |
RowPermission | Row Permission | Data Row Permission Object | |
Read | Read Permission | string | |
Type | Permission 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 | |
Scope | Scope 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 | array | string |
Write | Write Permission | string | |
Type | Permission 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 | |
Scope | Scope 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 | array | string |
ColumnPermission | Field 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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation 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 Name | Description | Request Type | Required | Data Type | schema |
---|---|---|---|---|---|
envType | Environment type, prod for production environment, must pass prod | path | true | string | |
Authorization | Authentication parameter, pass Bearer AccessToken; for token acquisition methods, see the overview | header | true | string | |
Batch Data Authentication Request Object | body | true | Batch Data Authentication Request Object | ||
userId | weda user id | true | string | ||
weAppId | weda 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. | false | string | ||
resourceList | Resource list | true | array | ||
resourceId | Resource 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 | true | string | ||
columnIdList | Data model field list, used for obtaining column permissions of the passed-in fields | false | array | string |
Response Status:
Status Code | Description | schema |
---|---|---|
200 | OK | OpenApiServerResponseBatchDataAuthenticationResponseObject |
Response Parameters:
Parameter Name | Description | Type | schema |
---|---|---|---|
response | Common Response Object | ||
requestId | requestId | string | |
error | Error Message | Error Message | Error Message |
code | Error code | string | |
message | Error message prompt | string | |
data | Batch Data Authorization Response Object | ||
authStrategyList | array | Data Permission Object | |
resourceId | Resource id | string | |
rowPermission | Row Permission | object | |
read | Read Permission | string | |
type | Permission 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 | |
scope | Scope 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 | array | string |
write | Write Permission | string | |
type | Permission 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 | |
scope | Scope 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 | array | string |
columnPermission | Field 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 Code | Description |
---|---|
InvalidAction | Interface does not exist |
InvalidParameter | Parameter error |
InvalidParameterValue | Invalid parameter value |
MissingParameter | Missing parameter error |
InternalError | Internal Error |
FailedOperation | Operation failed, server exception |