Query User with Permission

Last Updated on : 2023-07-06 08:20:22download

Query the information about all the users with a specified permission under a specified organization.

API address

POST: /v1.0/iot-03/idaas-prod/spaces/{space_id}/organizations/{organization_code}/users/actions/query

Request parameter

Parameter nameTypeINRequiredDescription
organization_codeStringuritrueThe identifier of a specified organization.
space_idStringuritrueThe ID of a specified space.

Description of body

Parameter nameTypeINRequiredDescription
role_codeString falseThe identifier of a specified role.
page_numberInteger falseThe current page number.
page_sizeInteger falseThe number of items per page.

Return parameter

Parameter nameTypeDescription
resultPageThe returned result on pages, including the current page number, number of items on each page, total number of pages, total number of items, and specific data.

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.
resultsIdaasUserParamThe list of results.

Description of results

Parameter nameTypeDescription
gmt_modifiedLongThe time when it is modified.
gmt_createLongThe time when it is created.
remarkStringThe remarks.
uidStringThe user's identifier.
space_idStringThe ID of a specified space.
usernameStringThe username.
typeIntegerThe user type.

Request example

POST: /v1.0/iot-03/idaas-prod/spaces/1400335346549391440/organizations/Acode/users/actions/query
{
  "role_code": "Acode",
  "page_number": 1,
  "page_size": 10
}

Return example

{
    "result": {
        "total_count": 1,
        "total_pages": 1,
        "page_number": 1,
        "results": [
            {
                "gmt_create": "1622775600000",
                "remark": "Remarks",
                "gmt_modified": "1622775600000",
                "type": 0,
                "uid": "052533b7bf1d41c78505e421daa3f29a",
                "space_id": "1400335346549391440",
                "username": "username"
            }
        ],
        "page_size": 20
    },
    "t": 1629272469492,
    "success": true
}

Error code

For more information, see error code.