Last Updated on : 2023-01-12 07:15:07download
| Request method | API | Description |
|---|---|---|
| GET | /v1.0/iot-02/building/access-control-channels | Get a list of entrances and exits where access control devices are installed. |
| POST | /v1.0/iot-02/building/access-control-channels/actions/issue-commands | Send commands to entrances and exits. |
| POST | /v1.0/iot-02/building/access-controls/actions/edit-channels | Edit entrances and exits. |
API description
Get a list of entrances and exits where access control devices are installed.
API endpoint
GET /v1.0/iot-02/building/access-control-channels
Request parameter
| Parameter name | Type | Parameter type | Description | Required |
|---|---|---|---|---|
| projectId | String | body | The project ID. | No |
| accessControlName | String | body | The name of the specified access control device. | No |
| ipAddress | String | body | The IP address. | No |
| deviceMac | String | body | The MAC address of the specified device. | No |
| cid | String | body | The CID of the specified device. | No |
| deviceSn | String | body | The serial number of the specified device. | No |
| deviceStatus | Integer | body | Indicates the online status of the device. Valid values:
|
No |
| accessControlChannelName | String | body | The name of the specified entrance and exit. | No |
| roomId | String | body | The area ID. | No |
| containSub | boolean | body | Specifies whether to include a subordinate area. | No |
| page | Integer | body | The total number of returned pages. | No |
| pageSize | Integer | body | The number of items returned on each page. | No |
Return parameter
| Parameter name | Type | Description |
|---|---|---|
| code | Integer | The response code. For more information, see the error code section. It is empty if the request is successful. |
| success | Boolean | Indicates whether the operation is successful. Valid values:
|
| msg | String | The message that is returned if the request failed. The response is empty if the request succeeded. |
| t | Long | The returned 13-digit timestamp. |
| result | Object | The returned result. |
Description of result
{
"total": "int",
"list": [
{
"projectId": "String // The project ID",
"accessControlId": "String // The ID of the specified access control device",
"accessControlChannelId": "String // The ID of the specified entrance and exit",
"accessControlChannelName": "String //The name of the specified entrance and exit",
"accessControlName": "String // The name of the specified access control device",
"accessControlChannelNo": "String // The channel number",
"roomId": "String // The ID of the specified area where the access control device is installed",
"positionPath": "String // The location of an access control entrance and exit",
"deviceId": "String // The device ID",
"deviceStatus": "int // The device status"
}
]
}
Sample request
{
"accessControlChannelName": "The name of the specified entrance and exit",
"containSub": "Specifies whether to include a subordinate area",
"accessControlName": "The name of the specified access control device",
"ipAddress": "The IP address",
"deviceMac": "The MAC address of the device",
"pageSize": "The number of items returned on each page",
"page": "The total number of returned pages"
"projectId": "The project ID",
"deviceSn": "The serial number of the specified device",
"roomId": "The area ID",
"cid": "The CID of the specified device",
"deviceStatus": "Indicates the online status of the device. 0: The device is offline. 1: The device is online."
}
Sample response
{
"total": "int",
"list": [
{
"list": "The device status"
}
]
}
API description
Send commands to entrances and exits.
API endpoint
POST /v1.0/iot-02/building/access-control-channels/actions/issue-commands
Request parameter
| Parameter name | Type | Parameter type | Description | Required |
|---|---|---|---|---|
| projectId | String | body | The project ID. | No |
| accessControlChannelIds | String[] | body | The channel ID. | No |
| commandType | Integer | body | The command type. 1: remote unlocking. |
No |
| deviceId | String | body | The device ID. | No |
| channelNums | String[] | body | The channel number. | No |
Return parameter
| Parameter name | Type | Description |
|---|---|---|
| code | Integer | The response code. For more information, see the error code section. It is empty if the request is successful. |
| success | Boolean | Indicates whether the operation is successful. Valid values:
|
| msg | String | The message that is returned if the request failed. The response is empty if the request succeeded. |
| t | Long | The returned 13-digit timestamp. |
| result | Object | The returned result. |
Description of result
boolean{}
Sample request
{
"commandType": "The command type (1: remote unlocking)",
"channelNums": "The channel number",
"accessControlChannelIds": "The channel ID",
"projectId": "The project ID",
"deviceId": "The device ID"
}
Sample response
boolean{}
API description
Edit entrances and exits.
API endpoint
POST /v1.0/iot-02/building/access-controls/actions/edit-channels
Request parameter
| Parameter name | Type | Parameter type | Description | Required |
|---|---|---|---|---|
| projectId | String | body | The project ID. | No |
| accessControlId | String | body | The ID of a specified access control device. | No |
| accessControlChannelId | String | body | The ID of the specified entrance and exit. | No |
| accessControlChannelNo | String | body | The channel number of the specified entrance and exit. | No |
| accessControlChannelName | String | body | The name of the specified entrance and exit. | No |
| roomId | String | body | The ID of the specified area where the access control device is installed. | No |
Return parameter
| Parameter name | Type | Description |
|---|---|---|
| code | Integer | The response code. For more information, see the error code section. It is empty if the request is successful. |
| success | Boolean | Indicates whether the operation is successful. Valid values:
|
| msg | String | The message that is returned if the request failed. The response is empty if the request succeeded. |
| t | Long | The returned 13-digit timestamp. |
| result | Object | The returned result. |
Description of result
boolean{}
Sample request
{
"accessControlChannelName": "The name of the specified entrance and exit",
"accessControlChannelId": "The ID of the specified entrance and exit",
"accessControlChannelNo": "The channel number of the specified entrance and exit",
"projectId": "The project ID",
"accessControlId": "The ID of the specified access control device",
"roomId": "The ID of the specified area where the access control device is installed"
}
Sample response
boolean{}
Error codes
The following table lists common error codes for the API calls. For more error codes, see Global Error Codes.
| Error codes | Description |
|---|---|
| 500 | A system error has occurred while processing your request. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback