GET (Getting the Park Orbit's list)
GET
1) (Info of the entire list of the Park Orbits)
rest/domain/domain_name/orbits
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/orbits
[ { name: "1122", display: "", calls: [ ] }, { name: "park", display: "Orbit", calls: [ ] } ]
2) (Info of a SINGLE Park Orbit)
rest/domain/domain_name/user_settings/park_orbit_id
Parameters
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
park_orbit_id | Int / String | Unique ID (name or number) of the Park orbit |
Success (200 OK)
Example:
Request:
curl -u admin: -D - https://192.168.1.194:8080/rest/domain/localhost/user_settings/1122
{ destination: "", moh: "", msg: "long", name: "", reminder: "20", 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: [ "1122" ] }
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':'orbits', 'account':'Park' }"
Update
/rest/domain/domain_name/user_settings/park_orbit_id
Parameters
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
park_orbit_id | Int / String | Unique ID (number or string) of the Park Orbit |
Example:
Request:
curl -u admin: -D - http://192.168.1.194:8080/rest/domain/localhost/user_settings/Park -X POST -d "{ 'msg':'long', 'name':'train', 'reminder':'40', 'ani':'657546754', 'alias':['Park'] }"
Delete
Example:
The Park Orbit's account number in the API call can be obtained using the GET
for the entire Park Orbit'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':'Park' }"
2) Delete, single account at a time.
/rest/domain/domain_name/addacc/park_orbit_id
Parameters used
Field | Type | Description |
---|---|---|
domain_name | String | Name of the existing domain. |
park_orbit_id | Int / String | Unique ID (String or number) of the park orbit account to be deleted. |
Request:
curl -u admin: -D - http://127.0.0.1:8080/rest/domain/localhost/addacc/Park -X DELETE
No extra parameters are needed to be specified, to delete a single park orbit account.
If multiple park orbit accounts are to be deleted, then the API has to be run multiple times with corresponding park orbit 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. |