Extensions
The current collection shows all the methods available to get or put extensions information.
AUTHORIZATION Bearer Token
GET /extensions
http://{{host}}/api/v2/extensions
Get all extensions and its devices from the PBX filtered by tenant.
AUTHORIZATION Bearer Token
This request is using Bearer Token from folder Extensions.
HEADERS
app-key |
{{api-key}}
Application key to authenticate requests |
tenant |
{{tenant}}
Filter by tenant |
Example Request
/extensions
|
GET /api/v2/extensions HTTP/1.1 Host: {{host}} app-key: {{api-key}} tenant: {{tenant}} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
{ "status": "success", "data": [ { "extension_id": 1, "extension": "100", "name": "Jhone Doe", "language": "en", "email": null, "class_of_service_id": 1, "dial_profile_id": 1, "call_limit": 0, "internal_cid": "\"Jhone Doe\" <100>", "external_cid": "\"Jhone Doe\" <100>", "emergency_cid": "\"Jhone Doe\" <100>", "ringtime": 0, "nospy": false, "enabled_pa": false, "answermode": "disable", "mailbox": "100@vitalpbx-voicemail", "accountcode": null, "features_password": "*56437", "sendcid": false, "generate_hints": false, "hot_desking": false, "secretary": null, "music_group_id": 2, "rec_on_demand": false, "internal_rec": true, "outgoing_rec": true, "incoming_rec": true, "dictate_enable": false, "dictate_format": "ogg", "dictate_auto_send": false, "fax_enabled": false, "fax_auto_send": false, "absent_secretary": false, "lock": false, "call_waiting": false, "pinless": false, "dynamic_routing": false, "tenant_id": 1, "context": "cos-all", "has_analog_devices": false, "devices": [ { "device_id": "3", "extension_id": "3", "profile_id": "1", "user": "100", "secret": "100", "description": "Jhone Doe", "ring_device": "yes", "technology": "sip", "assigned_exten": "100", "tenant_id": "1", "device_name": "100" } ], "queues_info": { "queues": [ 1 ], "queues_name": [ "Q500" ], "queues_penalty": [ "0" ] } } ] } |
|
Date: Tue, 28 May 2019 18:23:01 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 X-Powered-By: PHP/5.4.16 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: application/json |
GET /extensions/{id}
http://{{host}}/api/v2/extensions/{{extension-id}}
Get specific extension from server filtered by extension id.
AUTHORIZATION Bearer Token
This request is using Bearer Token from folder Extensions
HEADERS
app-key |
{{api-key}}
Application key to authenticate requests |
tenant |
{{tenant}}
Filter by tenant |
Example Request
/extensions
|
GET /api/v2/extensions HTTP/1.1 Host: {{host}} app-key: {{api-key}} tenant: {{tenant}} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
{ "status": "success", "data": [ { "extension_id": 1, "extension": "100", "name": "Jhone Doe", "language": "en", "email": null, "class_of_service_id": 1, "dial_profile_id": 1, "call_limit": 0, "internal_cid": "\"Jhone Doe\" <100>", "external_cid": "\"Jhone Doe\" <100>", "emergency_cid": "\"Jhone Doe\" <100>", "ringtime": 0, "nospy": false, "enabled_pa": false, "answermode": "disable", "mailbox": "100@vitalpbx-voicemail", "accountcode": null, "features_password": "*56437", "sendcid": false, "generate_hints": false, "hot_desking": false, "secretary": null, "music_group_id": 2, "rec_on_demand": false, "internal_rec": true, "outgoing_rec": true, "incoming_rec": true, "dictate_enable": false, "dictate_format": "ogg", "dictate_auto_send": false, "fax_enabled": false, "fax_auto_send": false, "absent_secretary": false, "lock": false, "call_waiting": false, "pinless": false, "dynamic_routing": false, "tenant_id": 1, "context": "cos-all", "has_analog_devices": false, "devices": [ { "device_id": "3", "extension_id": "3", "profile_id": "1", "user": "100", "secret": "100", "description": "Jhone Doe", "ring_device": "yes", "technology": "sip", "assigned_exten": "100", "tenant_id": "1", "device_name": "100" } ], "queues_info": { "queues": [ 1 ], "queues_name": [ "Q500" ], "queues_penalty": [ "0" ] } } ] } |
|
Date: Tue, 28 May 2019 18:23:01 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 X-Powered-By: PHP/5.4.16 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: application/json |
GET /extensions/{id}/devices
http://{{host}}/api/v2/extensions/{{extension-id}}/devices
Retrive all devices for a specific extension
AUTHORIZATION Bearer Token
This request is using Bearer Token from folder Extensions
HEADERS
app-key |
{{api-key}} |
tenant |
{{tenant}} |
Example Request
200 – Devices retrieve
|
GET /api/v2/extensions/{{extension-id}}/devices HTTP/1.1 Host: {{host}} app-key: {{api-key}} tenant: {{tenant}} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
{ "status": "success", "message": null, "data": [ { "device_id": "2", "extension_id": "2", "profile_id": "1", "user": "dev-101", "secret": "QG4nKqN#BQnNzu", "description": "Agent 01", "ring_device": "yes", "technology": "sip", "assigned_exten": null, "tenant_id": "1", "device_name": "dev-101" } ] } |
|
Date: Fri, 29 Nov 2019 23:19:01 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 X-Powered-By: PHP/5.4.16 Content-Length: 267 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json |
GET /extensions/{id}/queues
http://{{host}}/api/v2/extensions/{{extension-id}}/queues
Retrive queues info for an specific extension
AUTHORIZATION Bearer Token
This request is using Bearer Token from folder Extensions
HEADERS
app-key |
{{api-key}} |
tenant |
{{tenant}} |
Example Request
200 – Queues Info Retrieved
|
GET /api/v2/extensions/{{extension-id}}/queues HTTP/1.1 Host: {{host}} app-key: {{api-key}} tenant: {{tenant}} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
{ "status": "success", "message": null, "data": { "queues_id": [ 1, 2 ], "queues_name": [ "Q500", "Q501" ], "queues_penalty": [ "0", "0" ] } } |
|
Date: Fri, 29 Nov 2019 23:15:43 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 X-Powered-By: PHP/5.4.16 Content-Length: 119 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json |
GET /extensions/{id}/cdr_summary
http://{{host}}/api/v2/extensions/{{extension-id}}/cdr_summary
Get cdr summary from a specific extension
AUTHORIZATION Bearer Token
This request is using Bearer Token from folder Extensions
HEADERS
app-key |
{{api-key}} |
tenant |
{{tenant}} |
Example Request
200 – CDR Summary
|
GET /api/v2/extensions/{{extension-id}}/cdr_summary HTTP/1.1 Host: {{host}} app-key: {{api-key}} tenant: {{tenant}} |
|
{ "status": "success", "data": { "local": "45", "incoming": "29", "outgoing": "4", "transit": "0" } } |
|
Date: Wed, 29 May 2019 16:54:22 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 X-Powered-By: PHP/5.4.16 Content-Length: 176 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json |
GET /extensions/{id}/voicemail_records
http://{{host}}/api/v2/extensions/{{extension-id}}/voicemail_records
Return all the voicemail records for an specific extension
AUTHORIZATION Bearer Token
This request is using Bearer Token from folder Extensions
HEADERS
app-key |
{{api-key}} |
tenant |
{{tenant}} |
Example Request
200 – Voicemail Recordings
|
GET /api/v2/extensions/{{extension-id}}/voicemail_records HTTP/1.1 Host: {{host}} app-key: {{api-key}} tenant: {{tenant}} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
{ "status": "success", "data": { "INBOX": { "date": "1565987730", "clid": "Demo<1519>", "priority": "2", "vmorig": "2000", "duration": "9", "recfile": "/static/43b4298b09648469/voicemail/2000/INBOX/msg0000.wav", "filename": "msg0000.txt" }, "Old": { "date": "1513443087", "clid": "X-Lite<7502>", "priority": "2", "vmorig": "2000", "duration": "8", "recfile": "/static/43b4298b09648469/voicemail/2000/Old/msg0000.wav", "filename": "msg0000.txt" } } } |
|
Date: Fri, 16 Aug 2019 20:48:20 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 X-Powered-By: PHP/5.4.16 Content-Length: 421 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json |
Voicemail