Get Groups in Space

Last Updated on : 2024-06-29 02:11:00download

Based on the space ID, get a list of groups in the specified space.

API address

GET: /v2.1/cloud/thing/group

Request parameter

Parameter nameTypeINRequiredDescription
space_idStringquerytrueThe ID of the specified space.
page_noIntegerquerytrueThe current page number.
page_sizeIntegerquerytrueThe number of entries to be returned per page.

Return parameter

Parameter nameTypeDescription
resultJsonObjectThe returned result of the specified group.
successBooleanIndicates whether the API is called successfully. Valid values:
  • true: The API call succeeded.
  • false: The API call failed.
tLongThe timestamp.
tidStringThe link ID.

Description of result

Parameter nameTypeDescription
data_listListThe list of data.
countIntegerThe total number of returned entries.
page_sizeIntegerThe number of entries to be returned per page.
page_noIntegerThe current page number.

Description of data_list

Parameter nameTypeDescription
group_idLongThe group ID.
group_nameStringThe name of the specified group.
space_idStringThe ID of the space to which the specified group belongs.
icon_urlStringThe icon of the specified group. A product picture is used by default.
create_timeLongThe time when a group is created.
update_timeLongThe time when a group is updated.

Request example

GET: /v2.1/cloud/thing/group?page_no=1&page_size=10&space_id=16702****

Return example

{
    "tid": "3d9023fc021911efbe7a366d87620758",
    "result": {
        "data_list": [
            {
                "icon_url": "https://images.tuyacn.com/smart/solution/142004/673976648441****.png",
                "create_time": 1713944885,
                "group_name": "testUpdateGroup****",
                "update_time": 1713944885,
                "group_id": "1393****",
                "space_id": "16702****"
            }
        ],
        "count": 1,
        "page_no": 1,
        "page_size": 10
    },
    "t": 1713949290836,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.