Agent Groups

Vodia PBX API (version 58.0 and above)

GET (Getting the Agent Group's list)

GET

1) (Info of the entire list of the Agent Groups)

rest/domain/domain_name/acds

Parameters

Field Type Description
domain_name String Name of the existing domain.

Success (200 OK)

Example:

Request:

curl -u admin: GET -D - http://192.168.1.194:8080/rest/domain/localhost/acds
[ { name: "1000", display: "Agent Group", agents: [ ], calls: 0 }, { name: "5555", display: "Agent_2", agents: [ ], calls: 0 } ]

2) (Info of a SINGLE Agent Group)

rest/domain/domain_name/user_settings/agent_group_id

Parameters

Field Type Description
domain_name String Name of the existing domain.
agent_group_id Int / String Unique ID (name or number) of the Agent group

Success (200 OK)

Example:

Request:

curl -u admin: -D - https://192.168.1.194:8080/rest/domain/localhost/user_settings/1000
{ acd_anonymous_dest: "", add_adr: "", add_cmc: "", admin: "", agents: "444 442 445", algorithm: "list", all_agents: "444 442 445", all_logged_out: "", all_unregistered: "", allow_callback: "*", announce_callback: "true", connect: "false", contyp: "always", delay: "5", deny_callback: "", display: "Agent Group", distribution: "", ecc: "", ecf: "", escagents: "", esctime: "", flag: "", from_header: "name", gap_time: "5", im: "", ipos: "false", jump: "444 442 445", key0: "", key1: "", key2: "", key3: "", key4: "", key5: "", key6: "", key7: "", key8: "", key9: "", keyf: "", last_state: "", lastwait: "4:1494602736.966 15:1494603206.155 7:1494603309.911 33:1498745430.7", logout: "false", manager: "", max_call_action: "", max_call_dest: "", maxcall: "", melody: "custom1", minstaff: "0", moh: "", multicall: "false", muting: "20", ncf: "true", night: "", offer_callback: "0", policy: "", posthres: "0", primary_logged_out: "", prio: "", readpos: "false", readrec: "never", readwait: "0", rec: "false", recover_time: "1", redirect: "", ringback: "true", soap_welcome: "", speed_limit: "1", timeout: "", usage: "2 26 41 1 34 47 45", wait_dest: "", wait_time: "", wavfile0: "", wavfile1: "", wavfile2: "", wavfile3: "", wavfile4: "", wavfile5: "", wavfile6: "", wavfile7: "", wavfile8: "", wavfile9: "", wuc: "", acdani: "", ani: "", cdr_time: "", credit: "", dial_plan: "", dialog_state: "", dialog_subscribe: "", dialog_version: "", disabled: "", email_cdr: "sy@vodia.com", epid: "", location: "", max_call_duration: "", max_cdrs: "", need_license: "", param1: "", param2: "", param3: "", rb: "", rf: "", view_settings: "", visible: "", alias: [ "1000" ] }
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.

POST (Create, Update and Delete the Attributes of the Webpage)

post

 

Create

/rest/domain/domain_name/addacc
Example:

Request:

curl -u admin: -D - http://192.168.1.194:8080/rest/domain/localhost/addacc -X POST -d "{ 'type':'acds', 'account':'5566' }"

 

Update

/rest/domain/domain_name/user_settings/agent_group_id

Parameters

Field Type Description
domain_name String Name of the existing domain.
agent_group_id Int / String Unique ID (number or string) of the Agent group
Example:

Request:

curl -u admin: -D - http://192.168.1.194:8080/rest/domain/localhost/user_settings/5566 -X POST -d "{'agents':'440 442', 'algorithm':'list', 'contyp':'always', 'delay':'20', 'display':'Agent_2', 'flag':'222', 'from_header':'id', 'ipos':'false', 'jump':'445 777', 'manager':'444', 'minstaff':'0', 'night':'555', 'primary_logged_out':'445', 'ani':'543543543', 'connect':'false', 'logout':'false', 'multicall':'true', 'ncf':'true', 'rec':'false', 'alias':['5555'] }"

 

Delete

Example:

The Agent group's account number in the API call can be obtained using the GET for the entire Agent Group's list

There are 2 ways of deleting an entry.

1) Delete, multiple accounts (extension, auto-attendant, agent-groups etc. together) at once.

/rest/domain/domain_name/domain_action

Example:

Request:

curl -u admin: -D - http://127.0.0.1:8080/rest/domain/localhost/domain_action -X POST -d "{ 'type':'accounts', 'action':'delete_selected', 'selected':'444 445 agent_2' }"

2) Delete, single account at a time.

/rest/domain/domain_name/addacc/agent_group_id

Parameters used

Field Type Description
domain_name String Name of the existing domain.
agent_group_id Int / String Unique ID (String or number) of the agent group account to be deleted.

Request:

curl -u admin: -D - http://127.0.0.1:8080/rest/domain/localhost/addacc/5566 -X DELETE

No extra parameters are needed to be specified, to delete a single agent group account.

If multiple agent group accounts are to be deleted, then the API has to be run multiple times with corresponding agent group IDs.

Response for 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.

 

GET (Getting the Agent Group's Calls)

GET

Get the CDR for a specific ACD group.

rest/user/user@domain/acdcalls?acd=acd

Parameters

Field Type Description
user String User account requesting the CDR
domain String Name of the existing domain.
acd String Name of the ACD

Success (200 OK)

Example:

Request:

curl -u admin: -D - 'http://192.168.1.194:8080/rest/user/40@localhost/acdcalls?acd=123'

GET (Getting the Agent Group's CDR)

GET

Get the CDR for a specific ACD group.

rest/user/user@domain/acdcdr?acd=acd

Parameters

Field Type Description
user String User account requesting the CDR
domain String Name of the existing domain.
acd String Name of the ACD
page String Requested page. If there is no page argument, the system will return the number of records for the query.
size String Page size (default 50)
day String Restrict the query to a specific day. The day must be in the format YYYYMMDD.

Success (200 OK)

Example:

Request:

curl -u admin: -D - 'http://192.168.1.194:8080/rest/user/40@localhost/acdcdr?acd=123&page=1'