Get the group list of an account
https://cnapi.sciener.com/v3/group/listWithLockNum
Returns only groups containing electronic keys or locks, the number of ungrouped electronic keys is returned with groupId=0.
Sort by group name
1 Request example
javascript
curl --location -g --request GET 'https://cnapi.sciener.com/v3/group/listWithLockNum?clientId=fd2ff35ee3d8424c8665c07b7b9a7f45&accessToken=780f7671b6e6be3010d9787f19207aca&date=1625025703000'2 Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| keyRight | Int | N | Whether to return only the group to which the ekey with administrative privileges belongs: no pass returns all, 1-returns those with administrative privileges, 0-returns ordinary user ekeys |
| date | Long | Y | Current time (timestamp in millisecond) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| list | JSONArray | list of records |
The objects in the list
| Parameter | Type | Description |
|---|---|---|
| groupId | Int | Group ID, 0 means not grouped |
| name | String | Group name(When groupId is 0, the group name is empty) |
| lockNum | Int | Lock number |
{
"list": [
{
"groupId": 1342,
"name":"The 4th floor",
"lockNum": 2
}
]
}