Query Permission on Pages

Last Updated on : 2023-07-06 09:12:33download

Query the permission information on pages.

API address

POST: /v1.0/iot-03/idaas/spaces/{space_id}/page-permission

Request parameter

Parameter nameTypeINRequiredDescription
space_idStringuritrueThe ID of a specified space.

Description of body

Parameter nameTypeINRequiredDescription
permission_nameString falseThe name of a specified permission.
role_nameString falseThe name of a specific role.
role_codeString falseThe identifier of a specified role.
page_numberInteger trueThe current page number.
page_sizeInteger trueThe number of items per page.
gmt_modified_ascBoolean falseIndicates whether to display the items in the descending order of the modification time.

Return parameter

Parameter nameTypeDescription
resultPage

Description of result

Parameter nameTypeDescription
total_countIntegerThe total number of items that are found.
total_pagesIntegerThe total number of pages.
page_numberIntegerThe current page number.
page_sizeIntegerThe number of items per page.
resultsIdaasUserPageResultDTOThe list of results.

Description of results

Parameter nameTypeDescription
space_idStringThe ID of a specified space.
permission_codeStringThe identifier of a permission.
nameStringThe name of a specified permission.
remarkStringThe remarks.
orderIntegerThe order that the items are displayed.
typeIntegerThe type of specified permission. Valid values: 1: API. 2: menu. 3: button. 4: data. 5: combination.
gmt_modifiedLongThe time when it is modified.
gmt_createLongThe time when it is created.

Request example

POST: /v1.0/iot-03/idaas/spaces/1400762304747802670/page-permission
{ "role_name": "Role name", "permission_name": "Permission name", "page_number": 1, "page_size": 100, }

Return example

{
    "result": {
        "total_count": 1,
        "total_pages": 1,
        "page_number": 1,
        "results": [
            {
                "gmt_create": "1622808344941",
                "remark": "updateRemark1",
                "gmt_modified": "1622812407709",
                "permission_code": "permissionCode",
                "type": 2,
                "name": "updateName",
                "space_id": "1400762304747802670",
                "order": 2
            }
        ],
        "page_size": 100
    },
    "t": 1622883484704,
    "success": true
}

Error code

For more information, see error code.