All Products
Search
Document Center

Drive and Photo Service:ListAssignment

Last Updated:Aug 04, 2025

Queries a list of assigned roles. For example, you can query the administrators of a group by group ID.

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/list_assignment HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

manage_resource_typestringNo

The type of the managed resource. Set the value to RT_Group, which specifies that the administrators of a group are queried.

RT_Group
manage_resource_idstringNo

The ID of the managed resource, such as a group ID.

105***b82
markerstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of marker. By default, this parameter is empty.

NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg
limitintegerNo

The maximum number of results to return. Valid values: 1 to 100.

The number of returned results must be less than or equal to the specified number.

50

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

assignment_listarray<object>

The assigned roles.

object
domain_idstring

The domain ID.

hz1
identityIdentity

The identity to whom the role is assigned, which is a user or a group.

role_idstring

The ID of the role assigned to the identity.

SystemGroupAdmin
manage_resource_typestring

The type of the managed resource. For example, a value of RT_Group indicates group.

RT_Group
manage_resource_idstring

The ID of the managed resource, such as a group ID.

105***b82
creatorstring

The ID of the user who assigned the role.

216***c83
created_atlong

The time when the role was assigned. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1622682267564
next_markerstring

A pagination token. It can be used in the next request to retrieve a new page of results. If next_marker is empty, no next page exists.

NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg

Examples

Sample success responses

JSONformat

{
  "assignment_list": [
    {
      "domain_id": "hz1",
      "identity": {
        "identity_type": "IT_User",
        "identity_id": "16435bdf934248b788b7b3771ee9a3dw"
      },
      "role_id": "SystemGroupAdmin",
      "manage_resource_type": "RT_Group",
      "manage_resource_id": "105***b82",
      "creator": "216***c83",
      "created_at": 1622682267564
    }
  ],
  "next_marker": "NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg"
}

Error codes

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