Set member roles
Sets roles for a member in a CelerData Cloud BYOC account.
NOTE
- You cannot modify roles for the creator of an account.
- This operation requires the Member Management privilege.
Request
Basic Information | |
---|---|
HTTP URL | https://cloud-api.celerdata.com/api/1.0/users/:user_id/modify-roles |
HTTP Method | POST |
Frequency | 600/minute |
Path variables
Parameter | Example value | Required | Type | Description |
---|---|---|---|---|
user_id | 9d71aae6-a35d-40d5-b213-27bb1f583be5 | Yes | String | The ID of the member. |
Request body
Parameter | Example value | Required | Type | Description |
---|---|---|---|---|
role_ids | ["12345678-1234-1234-1234-123456789012"] | Yes | Array | An array of IDs representing the roles you want to set for the specified members. You can obtain role IDs using the API role-list. The system-defined role Public is compulsorily assigned to all members. |
Header parameters
Parameter | Example value | Required | Type | Description |
---|---|---|---|---|
Authorization | Bearer OGQ5MDA4MZGTNJMWNS0ZY2Y2LWFJNZYTOTBINMZIYTGZZDUY | Yes | String | The access token used to access the CelerData Cloud API. Format: Bearer <access_token> . |
See Obtain access token.
Response
Sample response
{
"code": 20000,
"data": {
"succeed": true
}
}
Response elements
Parameter | Example value | Type | Description |
---|---|---|---|
code | 20000 | Integer | The error code. If the error code returned is 20000 , the request succeeded. If any other error code is returned, the request failed. |
data | - | Object | The result of the API call. |
data.succeed | true | Boolean | Whether the role modification operation succeeded. Valid values:
|
data.err_msg | - | String | The error message of the role modification operation. This element is returned only when data.succeed is false . |
message | - | String | The error message. This element is returned only when the code returned is not 20000 .NOTICE Do not conclude whether a request succeeded or failed based on the return value of message . |