Retrieve outbound rule
GET
/show
Retrieve outbound rule
Path parameters
-
access_token
string
required
token to be passed as a header. -
id
integer
required
Outbound rule's ID.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/outbound_rules/show \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
office_hours
object
-
from_extension_groups
array
Extensions number of the specific groups will be applied this rule. -
number_prefix
string
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule. -
enabled
boolean
-
number_length
integer
NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule. -
id
integer
Outbound rule's ID. -
name
string
Outbound rule's name. -
routes
array
-
from_extension
string
Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.
Sample Response
{}
Destroy outbound rule
POST
/destroy
Destroy media server
Path parameters
-
access_token
string
required
token to be passed as a header.
Request body
application/json
-
id
integer
required
Outbound rule's ID.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/outbound_rules/destroy \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Successful operation.
400
Invalid username supplied.
Sample Response
Update outbound rule
POST
/update
Update outbound rule
Path parameters
-
access_token
string
required
token to be passed as a header.
Request body
application/json
-
office_hours
object
required
-
from_extension_groups
array
required
Extensions number of the specific groups will be applied this rule. -
number_prefix
string
required
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule. -
enabled
boolean
required
-
from_extension
string
required
Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule. -
id
integer
required
Outbound rule's ID. -
name
string
required
Outbound rule's name. -
routes
array
required
-
number_length
integer
required
NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/outbound_rules/update \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Successful operation
Sample Response
Create outbound rule
POST
/create
Add a new outbound rule. Please make sure you have at least one provider created
before creating a new outbound rule.
Path parameters
-
access_token
string
required
token to be passed as a header.
Request body
application/json
-
office_hours
object
required
-
from_extension_groups
array
required
Extensions number of the specific groups will be applied this rule. -
number_prefix
string
required
Prefix of callee ID. Calls started with this prefix will be applied this outbound rule. -
enabled
boolean
required
-
from_extension
string
required
Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule. -
name
string
required
Outbound rule's name. -
routes
array
required
-
number_length
integer
required
NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.
Sample Request
curl -v -X POST http://127.0.0.1:8990/api/outbound_rules/create \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
-d '{}'
Responses
200
Created outbound rule
application/json
-
id
integer
Outbound rule's ID.
Sample Response
{}
Retrieve a collection of outbound rules.
GET
/list
Retrieve a collection of outbound rules.
Path parameters
-
access_token
string
required
token to be passed as a header. -
pagination
integer
required
The pagination of paging. -
pagesize
integer
required
The size of paging. -
sort_by
string
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
curl -v -X GET http://127.0.0.1:8990/api/outbound_rules/list \
-H "Content-Type: application/json" \
-H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
Responses
200
Successful operation
application/json
-
pagesize
integer
-
count
integer
-
pagination
integer
-
rules
array
-
sort_by
string
Sample Response
{
"pagesize": 10,
"count": 100,
"pagination": 8,
"sort_by": "DEFAULT"
}