All Products
Search
Document Center

Drive and Photo Service:AssignRole

Last Updated:Mar 21, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.