History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
Domain name for API request: bi.intl.tencentcloudapi.com.
This API is used to create a user role in the project.
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateUserRoleProject. |
| Version | Yes | String | Common Params. The value used for this API: 2022-01-05. |
| Region | No | String | Common Params. This parameter is not required. |
| ProjectId | No | Integer | Project ID. |
| RoleIdList.N | No | Array of Integer | Role ID list. |
| UserInfoList.N | No | Array of UserInfo | User list (new). |
| Parameter Name | Type | Description |
|---|---|---|
| ErrorInfo | ErrorInfo | Custom error information object. Note: This field may return null, indicating that no valid values can be obtained. |
| Extra | String | Expansion. Note: This field may return null, indicating that no valid values can be obtained. |
| Data | DataId | Data. Note: This field may return null, indicating that no valid values can be obtained. |
| Msg | String | Message. Note: This field may return null, indicating that no valid values can be obtained. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: bi.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateUserRoleProject
<Common request parameters>
{
"ProjectId": 1982493789748932,
"RoleIdList": [
1982493789748932
],
"UserInfoList": [
{
"UserId": "zhangsan",
"UserName": "Username",
"Email": "Mailbox",
"PhoneNumber": "Mobile number",
"AreaCode": "Telephone country code",
"AppUserId": "WeCom account id"
"AppUserName": "WeCom account name"
}
],
"UserList": [
{
"UserId": "zhangsan",
"UserName": "Username",
"CorpId": "Enterprise ID",
"Email": "Mailbox",
"Status": 1982493789748932,
"FirstModify": 1982493789748932,
"PhoneNumber": "Mobile number",
"AreaCode": "Telephone country code",
"CreatedUser": "Creator",
"UpdatedUser": "Modifier",
"GlobalUserName": "Global role",
"Mobile": "Mobile number",
"AppId": "1",
"AppUserId": "1",
"AppUserAliasName": "1",
"AppUserName": "1",
"InValidateAppRange": false
}
]
}
{
"Response": {
"Msg": "success",
"RequestId": "6cd11622-b240-40ae-8ec0-86b933aab8da",
"Extra": "",
"Data": {
"Id": 0
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError.Internal | Internal error. |
| MissingParameter.MissingParam | The required parameter is missing. |
| UnauthorizedOperation.Authorize | Permission error. |
| UnauthorizedOperation.Inactive | User is not enabled. |
피드백