Vodia PBX API (version 58.0 and above)

Auto Attendant

GET (Auto Attendant's settings)

GET

1) Info of the entire list of Auto Attendants and their unique IDs

rest/domain/domain_name/attendants

Parameters

Field Type Description
domain_name String Name of the existing domain.

Success (200 OK)

Example Request:

curl -u admin:password GET -D - http://192.168.1.194:8080/rest/domain/localhost/attendants
[ { name: "100", display: "AA", calls: 0 }, { name: "121", display: "Anecdote", calls: 0 }, { name: "334", display: "Romeo Juliet", calls: 0 }, { name: "120", display: "", calls: 0 }, { name: "5", display: "", calls: 0 } ]

2) Info of a SINGLE attendant account

rest/domain/domain_name/user_settings/attendant_id

Parameters

Field Type Description
domain_name String Name of the existing domain.
attendant_id Int / String Unique ID (name or number) of the auto attendant account

Success (200 OK)

Example Request:

curl -u admin:password -D - https://192.168.1.194/rest/domain/localhost/user_settings/100
{ action: "", admin: "", answer_wait: "2", code_0: "440", code_1: "441", code_2: "442", code_3: "443", code_4: "1000", code_5: "", code_6: "", code_7: "", code_8: "", code_9: "", completion: "match", def_file: "Welcome Voice message AMPC.WAV", def_gap: "5", display: "AA", excluded: "", first_lang: "en", flag: "", from_header: "id", gap_0: "", gap_1: "", gap_2: "", gap_3: "", gap_4: "", gap_5: "", gap_6: "", gap_7: "", gap_8: "", gap_9: "", hangup: "", input_0: "1", input_1: "###", input_2: "3", input_3: "4#", input_4: "5", input_5: "", input_6: "", input_7: "", input_8: "", input_9: "", limited: "440 444", min_digits: "4", moh: "6", name_confirm: "false", name_trigger: "9", night: "", operator: "", parameter: "", play_def: "true", prompt_0: "aa_sales", prompt_1: "aa_support", prompt_2: "aa_complain", prompt_3: "aa_roomservice", prompt_4: "aa_operator", prompt_5: "aa_frontdesk", prompt_6: "aa_repair", prompt_7: "aa_housekeep", prompt_8: "aa_frontdesk", prompt_9: "", record_code: "", record_ext: "", sd: "true", se: "true", second_lang: "en", sl: "true", special_key: "true", timeout: "20", verify: "false", wavfile: "", wc1: "", wc2: "", wc3: "", wc4: "", wc5: "", welcome_loop: "", wf1: "recordings/att1_10.wav", wf2: "recordings/att2_10.wav", wf3: "recordings/att3_10.wav", wf4: "recordings/att4_10.wav", wf5: "recordings/att5_10.wav", acdani: "", ani: "", cdr_time: "", credit: "", dial_plan: "1", dialog_state: "", dialog_subscribe: "", dialog_version: "", disabled: "false", email_cdr: "", epid: "", location: "", max_call_duration: "", max_cdrs: "", need_license: "", param1: "", param2: "", param3: "", rb: "", rf: "", view_settings: "", visible: "", alias: [ "100" ] }
Response Code Description
Success 200 OK
Invalid ID supplied 400 Only authenticated Admins can access the data
Permission Denied 403 Authentication denied for the user credentials entered
Not Found 404 The id of the User was not found or there are errors in the URL.

CREATE Auto Attendant(s)

post
/rest/domain/domain_name/addacc

Example Request:

curl -u admin:password -D - https://192.168.1.194/rest/domain/localhost/addacc -X POST -d "{ 'type':'attendants', 'accounts':'221' }"

Response:

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.

UPDATE Auto Attendant(s)

post
/rest/domain/domain_name/user_settings/attendant_id

Parameters

Field Type Description
domain_name String Name of the existing domain.
attendant_id Int / String Unique ID (name or number) of the auto attendant account

Example Request:

curl -u admin:password -D - http://127.0.0.1:8080/rest/domain/localhost/user_settings/100 -X POST -d "{ 'type':'attendants', 'account':'100', 'code_0':'433', 'code_1':'445', 'code_2':'446', 'code_3':'440', 'display':'AA_Vodia', 'hangup':'5', 'min_digits':'2', 'name_trigger':'ter', 'prompt_8':'2', 'welcome_loop':'1', 'ani':'899054', 'name_confirm':'false', 'special_key':'false', 'verify':'true', 'alias':'3344' }"

Response:

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.

DELETE Auto Attendant(s)

The Auto attendant account number in the API call below can be obtained using the GET for an entire Auto attendant'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 admin:password -D - http://127.0.0.1:8080/rest/domain/localhost/domain_action -X POST -d "{ 'type':'accounts', 'action':'delete_selected', 'selected':'446 100 120' }"

2) Delete, single account at a time.

post
/rest/domain/domain_name/addacc/attendant_id

Parameters

Field Type Description
domain_name String Name of the existing domain.
account_id Int Account number to be deleted

Request:

curl -u admin:password -D - http://127.0.0.1:8080/rest/domain/localhost/addacc/100 -X DELETE -d "{'type':'attendants','account':'100'}"

Response:

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.