Query Room List

Last Updated on : 2022-08-11 03:46:02

Based on the unique identifier (ID) of a project, query the list of rooms under the project.

API address

GET: /v2.0/osaas/projects/{project_id}/rooms

Request parameter

Parameter nameTypeINRequiredDescription
project_idStringuritrueThe unique ID of a specified project.
requestRoomAbilityPageRequest falseThe request of querying the rooms on pages.

Description of request

Parameter nameTypeINRequiredDescription
page_noInteger falseThe page number. The page number must be greater than 0. Default value: 1.
page_sizeInteger falseThe number of items returned on each page. 0 < page_size < 1000. Default value: 20.

Return parameter

Parameter nameTypeDescription
resultRoomAbilityPageResponseThe returned result of querying the rooms on pages.

Description of result

Parameter nameTypeDescription
roomsListA list of rooms.
totalIntegerThe total number of returned items.
page_noIntegerThe page number.
page_sizeIntegerThe number of items returned on each page.

Description of rooms

Parameter nameTypeDescription
room_idStringThe unique ID of a specified room.
room_nameStringThe name of a specified room.
room_noStringThe number of a specified room.
gmt_createLongThe 13-digit timestamp of the creation time.
gmt_modifiedLongThe 13-digit timestamp of the modification time.

Request example

GET: /v2.0/osaas/projects/150188910571223***/rooms

Return example

{
    "tid": "0f6740840e4311edae057e1****",
    "result": {
        "rooms": [
            {
                "gmt_create": 1650272458625,
                "room_id": "15159786846****",
                "gmt_modified": 1650272458625,
                "room_name": "2001",
                "room_no": "2001"
            }
        ],
        "page_no": 1,
        "total": 1,
        "page_size": 10
    },
    "t": 1658991671051,
    "success": true
}

Error code

For more information, see error code.