All Products
Search
Document Center

Drive and Photo Service:AssignRole

Last Updated:Sep 29, 2024

Assigns a group administrator role to a user.

Operation description

You can call this operation to assign a group administrator role to a user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/role/assign HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo
identityIdentityYes

The unique identifier of a user. The group administrator role can only be assigned to a user.

role_idstringYes

The ID of the role that is assigned to a user. Valid value: SystemGroupAdmin.

SystemGroupAdmin
manage_resource_typestringYes

The type of the resource that the role can manage. Valid value: RT_Group.

RT_Group
manage_resource_idstringYes

The ID of the resource that the role can manage. You can only set this parameter to the ID of a group.

105***b82

Response parameters

ParameterTypeDescriptionExample
The current API has no return parameters

Examples

Sample success responses

JSONformat

{}

Error codes

For a list of error codes, visit the Service error codes.