Query Account with Permission

Last Updated on : 2023-07-06 08:18:44download

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

API address

POST: /v1.0/iot-03/idaas-prod/spaces/{space_id}/organizations/{organization_code}/accounts/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
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.
resultsEnsembleUserThe 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.
user_nameStringThe username.
mobileStringThe mobile phone number.
emailStringThe email address.

Request example

POST: /v1.0/iot-03/idaas-prod/spaces/1400335346549391440/organizations/Acode/accounts/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",
                "user_name": "username",
                "mobile": "182679xx616",
                "remark": "Remarks",
                "gmt_modified": "1622775600000",
                "uid": "052533b7bf1d41c78505e421daa3f29a",
                "space_id": "1400335346549391440",
                "email": "sfeqfeqfrrqrq@turqrqrqrya.com"
            }
        ],
        "page_size": 20
    },
    "t": 1629272469492,
    "success": true
}

Error code

For more information, see error code.