GET Calling Card account's settings
GET
1) (Info of the entire list of the Calling cards)
rest/domain/domain_name/callingcards
Parameters
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
Success (200 OK)
Example:
Request:
curl -u username:password GET -D - http://192.168.1.194:8080/rest/domain/localhost/orbits
[ { name: "call", display: "Card" }, { name: "extra", display: "Call" } ]
2) (Info of a SINGLE calling card account)
rest/domain/domain_name/user_settings/calling_card_id
Parameters
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
calling_card_id | Int / String | Unique ID (name or number) of the Calling card account |
Success (200 OK)
Example:
Request:
curl -u username:password -D - https://192.168.1.194:8080/rest/domain/localhost/user_settings/call
{ autodial: "", balthres: "", block_cid: "", callback: "", display: "Card", intern: "", num_id: "", acdani: "", ani: "", cdr_time: "", credit: "", dial_plan: "", dialog_state: "", dialog_subscribe: "", dialog_version: "", disabled: "", email_cdr: "", epid: "", location: "", max_call_duration: "", max_cdrs: "", need_license: "", param1: "", param2: "", param3: "", rb: "", rf: "", view_settings: "", visible: "", alias: [ "call" ] }
Response | Code | Description |
---|---|---|
Success | 200 | OK |
Invalid ID supplied | 400 | Only authenticated Admins can access the data |
Permission Denied | 403 | Forbidden |
Not Found | 404 | The id of the User was not found or there are errors in the URL. |
CREATE calling card(s)
post
/rest/domain/domain_name/addacc
Example:
Request:
curl -u username:password -D - http://192.168.1.194:8080/rest/domain/localhost/addacc -X POST -d "{ 'type':'callingcards', 'account':'vodia' }"
UPDATE calling card(s)
post
/rest/domain/domain_name/user_settings/calling_card_id
Parameters
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
calling_card_id | Int / String | Unique ID (number or string) of the Calling card account |
Example:
Request:
curl -u username:password -D - http://192.168.1.194:8080/rest/domain/localhost/user_settings/call -X POST -d "{ 'autodial':'nanpa', 'balthres':'5.00', 'display':'Card', 'ani':'989009090', 'dial_plan':'2', 'dialog_subscribe':'444 445', 'email_cdr':'', 'block_cid':'true', 'callback':'true', 'intern':'true', 'alias':['call'] }"
DELETE calling card(s)
Example:
The calling card's account id in the API call can be obtained using the GET
for the entire calling card account's list
There are 2 ways of deleting an entry.
1) Delete, multiple accounts (extension, auto-attendant, agent-groups etc. together) at once.
post
/rest/domain/domain_name/domain_action
Example:
Request:
curl -u username:password -D - http://127.0.0.1:8080/rest/domain/localhost/domain_action -X POST -d "{ 'type':'accounts', 'action':'delete_selected', 'selected':'kree vodia' }"
2) Delete, single account at a time.
post
/rest/domain/domain_name/addacc/calling_card_id
Parameters used
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
calling_card_id | Int / String | Unique ID (String or number) of the calling card account to be deleted. |
Request:
curl -u username:password -D - http://127.0.0.1:8080/rest/domain/localhost/addacc/vodia -X DELETE
No extra parameters are needed to be specified, to delete a single calling card account.
If multiple calling card accounts are to be deleted, then the API has to be run multiple times with corresponding calling card account IDs.
Response for all Create, Update or Delete requests:
Response | Code | Description |
---|---|---|
Success | 200 | OK |
Invalid ID supplied | 400 | Only authenticated a Admins can access the data |
Permission Denied | 403 | Forbidden |
Not Found | 404 | The id of the User was not found or there are errors in the URL. |