Domains

GET (Getting the Domain's list)

GET

1) Info of the entire list of domains and their unique IDs.

rest/system/domaininfo

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/system/domaininfo
[ { id: 1, name: "localhost", alias: [ "localhost", "test", "pbx", "wohoooo" ], country: "1", extensions: 5, accounts: 25, visible: true, registrations: 40, regs: 2 }, { id: 2, name: "local2", alias: [ "local2" ], country: "", extensions: 2, accounts: 4, visible: true, registrations: 0, regs: 0 } ]

2) Info of a SINGLE domain

rest/domain/domain_name/users

Parameters

Field Type Description
domain_name String Name of the existing domain.
trunk_number Int Unique ID number generated

Success (200 OK)

Example:

Request:

curl -u admin: -D - http://192.168.1.194:8080/rest/domain/localhost/users
[ { id: "8", name: "1002", alias: [ "1002" ], ani: [ "+11234567899" ], displayname: "Hunt", disabled: false, license: true, visible: true, usertype: "hunts" }, { id: "10", name: "100", alias: [ "100" ], ani: [ "654" ], displayname: "AA", disabled: false, license: true, visible: true, usertype: "attendants" }, { id: "12", name: "222", alias: [ "222" ], ani: [ ], displayname: "", disabled: false, license: true, visible: true, usertype: "srvflags" }, { id: "14", name: "800", alias: [ "800" ], ani: [ ], displayname: "conf", disabled: false, license: true, visible: true, usertype: "conferences" }, { id: "22", name: "hi", alias: [ "hi" ], ani: [ ], displayname: "CallCentric", disabled: false, license: true, visible: true, usertype: "colines" }, { id: "24", name: "2020", alias: [ "2020" ], ani: [ ], displayname: "IVRs", disabled: false, license: true, visible: true, usertype: "ivrnodes" }, { id: "27", name: "333", alias: [ "333" ], ani: [ ], displayname: "", disabled: false, license: true, visible: true, usertype: "srvflags" }, { id: "28", name: "111", alias: [ "111" ], ani: [ ], displayname: "", disabled: false, license: true, visible: true, usertype: "srvflags" }, { id: "32", name: "1122", alias: [ "1122" ], ani: [ "657546754" ], displayname: "train", disabled: false, license: true, visible: true, usertype: "orbits" }, { id: "34", name: "440", alias: [ "440" ], ani: [ "+15467890000" ], displayname: "James Brolin", disabled: false, license: true, visible: true, usertype: "extensions", euse: "" }, { id: "36", name: "1000", alias: [ "1000" ], ani: [ ], displayname: "Agent Group", disabled: false, license: true, visible: true, usertype: "acds" }, { id: "45", name: "442", alias: [ "442" ], ani: [ ], displayname: "Jon Favreau", disabled: false, license: true, visible: true, usertype: "extensions", euse: "" }, { id: "47", name: "444", alias: [ "444" ], ani: [ ], displayname: "Tom Crosby", disabled: false, license: true, visible: true, usertype: "extensions", euse: "" }, { id: "160", name: "121", alias: [ "121" ], ani: [ ], displayname: "AA Sales Vodia", disabled: false, license: true, visible: true, usertype: "attendants" }, { id: "185", name: "120", alias: [ "120" ], ani: [ ], displayname: "", disabled: false, license: true, visible: true, usertype: "attendants" }, { id: "198", name: "777", alias: [ "777" ], ani: [ ], displayname: "Tony Stark", disabled: false, license: true, visible: true, usertype: "extensions", euse: "" }, { id: "200", name: "221", alias: [ "221" ], ani: [ ], displayname: "AA Test Vodia", disabled: false, license: true, visible: true, usertype: "attendants" }, { id: "204", name: "gtrh", alias: [ "gtrh" ], ani: [ ], displayname: "AA Support", disabled: false, license: true, visible: true, usertype: "attendants" }, { id: "208", name: "1003", alias: [ "1003" ], ani: [ ], displayname: "Hunt_2", disabled: false, license: true, visible: true, usertype: "hunts" }, { id: "214", name: "5555", alias: [ "5555" ], ani: [ "543543543" ], displayname: "Agent_2", disabled: false, license: true, visible: true, usertype: "acds" }, { id: "218", name: "extra", alias: [ "extra" ], ani: [ ], displayname: "Call", disabled: false, license: true, visible: true, usertype: "callingcards" }, { id: "220", name: "666", alias: [ "666" ], ani: [ ], displayname: "tyu", disabled: false, license: true, visible: true, usertype: "srvflags" }, { id: "221", name: "801", alias: [ "801" ], ani: [ ], displayname: "Paging", disabled: false, license: true, visible: true, usertype: "hoots" }, { id: "222", name: "909", alias: [ "909" ], ani: [ ], displayname: "Paging New", disabled: false, license: true, visible: true, usertype: "hoots" }, { id: "223", name: "445", alias: [ "445" ], ani: [ ], displayname: "Penny Higgs", disabled: false, license: true, visible: true, usertype: "extensions", euse: "" } ]
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/system/domains
Example:

Request:

curl -u username:password -D - http://192.168.1.194:8080/rest/system/domains -X POST -d "['Vodia','Alias_Name']"

Update

/rest/domain/domain_name/config
Example:

Request:

curl -u admin: -D - http://192.168.1.194:8080/rest/domain/Vodia/config -X POST -d "{ 'admins':[{'name':'sachin','email':'sa@yahoo.com','phone':'456567','password':'1234'}], 'max_extensions':'20' }"

Delete

/rest/system/domain/domain_name (Single Domain deletion)
/rest/system/domain/domain_name%2Cdomain_name%2Cdomain_name (Multiple Domain deletion)
Example:

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

If multiple domains have to be deleted at once, multiple API calls have to be sent, with varying domain names.

Request (for deleting single domain):

curl -u admin: -D - http://192.168.1.194:8080/rest/system/domain/vodia -X DELETE

Request (for deleting multiple domains):

curl -u admin: -D - http://192.168.1.194:8080/rest/system/domain/vodia%2Cnew_domain -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.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.