Query Organization Information

Last Updated on : 2023-07-06 08:23:41download

Query the organization object information on pages.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
space_idStringuritrueThe ID of a specified space.

Description of body

Parameter nameTypeINRequiredDescription
codeStringbodyfalseThe identifier of a specified organization.
codesListbodyfalseThe list of organization identifiers.
nameStringbodyfalseThe name of a specified organization.
parent_codeStringbodyfalseThe identifier of a specified parent organization.
remarkStringbodyfalseThe remarks of a specified organization.
statusIntegerbodyfalseIndicates whether the organization is enabled. Valid values:
  • 0: enabled.
  • 1: not enabled.
page_numberIntegerbodyfalseThe current page number.
page_sizeIntegerbodyfalseThe number of items per page.

Description of codes

Parameter nameTypeINRequiredDescription
codeStringbodyfalseThe identifier of a specified organization.

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

Description of results

Parameter nameTypeDescription
codeStringThe identifier of a specified organization.
nameStringThe name of a specified organization.
parent_codeStringThe identifier of a specified parent organization.
owner_uidStringThe user ID of the organization owner.
space_idStringThe ID of a specified space.
statusIntegerIndicates whether the organization is enabled. Valid values:
  • 0: enabled.
  • 1: not enabled.
remarkStringThe identifier of a specified organization.

Request example

POST: /v1.0/iot-03/idaas/spaces/1400335346549391440/organizations/actions/query
{ "page_number": 10, "page_size": 20, "code": "1400335346598629930", }

Return example

{
    "result": {
        "total_count": 1,
        "total_pages": 1,
        "page_number": 1,
        "results": [
            {
                "gmt_create": "1622775600000",
                "parent_name": "testParentOrgName",
                "code": "1400335346598629930",
                "remark": "testRemark",
                "gmt_modified": "1622775600000",
                "owner_uid": "1400335346599528750",
                "name": "testOrgName",
                "parent_code": "1400335346598629666",
                "space_id": "1400727198159081506",
                "status": 0
            }
        ],
        "page_size": 20
    },
    "t": 1629272469492,
    "success": true
}

Error code

For more information, see error code.