Query Permission Data of Project

Last Updated on : 2023-10-09 08:08:23download

Query the permission data under a project.

API address

GET: /v2.0/cloud/iam/permission/list

Request parameter

Parameter nameTypeINRequiredDescription
last_row_keyLongqueryfalseThe starting ID of the query.
page_sizeIntegerqueryfalseThe number of items returned on each page.

Return parameter

Parameter nameTypeDescription
successBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
error_codeStringThe error code. For more information, see the error codes.
error_msgStringThe message that is returned if the request fails. It is empty if the request is successful.
resultQueryPermissionListByTenantCodeResThe returned result.

Description of result

Parameter nameTypeDescription
permission_listListThe list of permissions.
last_row_keyLongThe starting ID of the query.
page_sizeIntegerThe number of items returned on each page.
totalIntegerThe total number of returned entries.

Description of permission_list

Parameter nameTypeDescription
permission_idLongThe ID of the specified permission.
nameStringThe name of the specified permission.
descriptionStringThe description of the specified permission.
gmt_createLongThe creation time.

Request example

GET: /v2.0/cloud/iam/permission/list?lastRowKey=0&pageSize=100

Return example

{
    "tid": "195bceee56b411ee801ef25dabf95fef",
    "result": {
        "last_row_key": 181044,
        "total": 101,
        "permission_list": [
            {
                "gmt_create": 1695104201,
                "description": "Description",
                "permission_id": 232371810,
                "name": "Permission name"
            }
        ],
        "page_size": 10
    },
    "t": 1695104201504,
    "success": true
}

Error code

For more information, see error code.