Vodia PBX API (version 58.0 and above)

CO Lines

GET (Getting the list of all CO Lines)

GET

1) Info of the entire list of CO Lines.

rest/domain/domain_name/colines

Parameters

Field Type Description
domain_name String Name of the existing domain.

Success (200 OK)

Example Request:

curl -u username:password GET -D - https://127.0.0.1/rest/domain/vodia/colines
[ { name: "8808", trunk: "1", type: "", user: "", display: "CallCentric", calls: 0 } ]

2) Info of a SINGLE CO Lines

rest/domain/domain_name/user_settings/co_line_account_number

Parameters

Field Type Description
domain_name String Name of the existing domain.
co_line_account_number Int CO Line account number

Success (200 OK)

Example Request:

curl -u username:password -D - https://127.0.0.1/rest/domain/vodia/user_settings/8808
{ ih: "", in: "", iv: "", leg: "", oh: "", on: "", ov: "", trunk: "1", ts: "", type: "", user: "", acdani: "", acturl_call: "", acturl_cleardnd: "", acturl_clearwakeup: "", acturl_connect: "", acturl_dnd: "", acturl_emergency: "", acturl_mailbox: "", acturl_missedwakeup: "", acturl_newcall: "", acturl_roomcleaned: "", acturl_wakeupcall: "", ani: "", anonymous_spam_score: "", 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: "", spam_threshold: "", view_settings: "", visible: "", alias: [ "8808" ] }
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.

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

post

Create

/rest/domain/domain_name/addacc

Example Request:

curl -u username:password -D - http://127.0.0.1/rest/domain/vodia/addacc -X POST -d "{'type':'colines','account':'8800'}"

Update

/rest/domain/domain_name/user_settings/co_line_account_number

Example Request:

curl -u username:password -D - https://127.0.0.1/rest/domain/vodia/user_settings/8800 -X POST -d "{ 'ih': 'to','in':'Dock','iv':'432','on': 'Port','ov': '234','trunk': '2'}"

Delete

/rest/domain/domain_name/addacc/service_flag_account_number (Single or Multiple co line account number deletion)
Example:

The domain name in the API call below can be obtained using the GET for entire domain list

If multiple co line account have to be deleted at once, multiple API calls have to be sent, with varying co line account numbers.

Request (for deleting single co line account):

curl -u username:password -D - http://127.0.0.1/rest/domain/vodia/addacc/8800 -X DELETE

Response for Create, Update and 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.