Communication Management API
Get Contact List
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object<result> | Body | Return result |
result description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| family_name | String | Body | Family name |
| sip_group | String | Body | SIP group account |
| devices | []Object<device> | Body | Device information |
| accounts | []Object<account> | Body | Account information |
| akuvox_devices | []Object<akuvox_device> | Body | Akuvox device information |
| ciphertext | String | Body | Ciphertext, dependent on SDK |
device description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| device_id | String | Body | Device ID |
| device_name | String | Body | Device name |
| mac | String | Body | MAC |
| sip | String | Body | SIP |
account description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| account_id | String | Body | Account ID |
| account_name | String | Body | Account name |
| first_name | String | Body | First name |
| last_name | String | Body | Last name |
| String | Body | ||
| sip | String | Body | SIP |
| main_sip | String | Body | Main SIP |
akuvox_device description
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| device_name | String | Body | Device name |
| mac | String | Body | MAC |
| sip | String | Body | SIP |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_contact_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}
Success Return Example
Status Code: 200
{
"success": true,
"timestamp": 1540869200562,
"result": {
"family_name": "my home",
"sip_group": "1251318313",
"ciphertext": "7b3d75f5a8cfa959167852468fca08a3",
"devices": [
{
"device_id": "d1d54e460365949109ec306dc6e37679b",
"device_name": "51",
"mac": "0C110532D242",
"sip": "123132312"
}
],
"accounts": [
{
"account_id": "a1d54e460365949109ec306dc6e37679b",
"account_name": "demo@akubela.com",
"first_name": "tom",
"last_name": "fly",
"email": "demo@akubela.com",
"sip": "423143312",
"main_sip": "423143312"
}
],
"akuvox_devices": [
{
"device_name": "door",
"mac": "0C110532D246",
"sip": "223132812"
}
]
}
}
Failure Return Example
Report Communication Message
Request URL
POST /api/v1.0/invoke/open-ability/method/user-commands
Request Parameter
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| Content-Type | String | Header | Yes | Content type, the value is application/json |
| Accept | String | Header | Yes | Accept, the value is application/json |
| Authorization | String | Header | Yes | Bearer authorization, access token |
| command | String | Body | Yes | Command name |
| id | String | Body | Yes | Command ID |
| param | Object<param> | Body | Yes | Command parameter |
param description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| residence_id | String | Body | Yes | Residence ID |
| communication_messages | []Object<communication_message> | Body | Yes | Communication message information |
communication_message description
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| communicate_id | String | Body | Yes | Communicate ID |
| timestamp | Integer | Body | Yes | Timestamp |
| from | String | Body | Yes | Sender ID, account ID or device ID |
| to | String | Body | Yes | Receiver ID, Residence ID or account ID |
| format | String | Body | Yes | Format, text or voice |
| content | String | Body | Yes | Content, text context or voice filename |
| duration | Integer | Body | No | Voice duration time (s) |
Return Parameter
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| Content-Type | String | Header | Content type, the value is application/json |
| success | Boolean | Body | Whether the request is successful or not? true: success false: failure |
| timestamp | Integer | Body | Timestamp |
| result | Object | Body | Return result |
Request Example
POST /api/v1.0/invoke/open-ability/method/user-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "report_communication_message",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"communication_messages": [
{
"communicate_id": "c6e3861d5d4ca4dcd8e76d84f1ecd49b9",
"timestamp": 193239428274,
"from": "a1d54e460365949109ec306dc6e37679b",
"to": "a42bdd7f6cb5ad478f3471539c2547b42",
"format": "voice",
"content": "f92c1118be3524f84bf59051cc1255f3d",
"duration": 15
}
]
}
}
Success Return Example
Status Code: 200
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}