Retrieve outbound rule

GET /show
Retrieve outbound rule
Path parameters
  • access_token

    string

    required

    token to be passed as a header.

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    Outbound rule's ID.

    format : int64

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

    Show child attributes
  • from_extension_groups

    array

    Extensions number of the specific groups will be applied this rule.
    Show child attributes
  • 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.

    format : int64

  • name

    string

    Outbound rule's name.
  • routes

    array

    Show child attributes
  • 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.

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    Outbound rule's ID.

    format : int64

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.

    minLength: 64

    maxLength: 64

Request body
application/json
  • office_hours

    object

    required

    Show child attributes
  • 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.

    format : int64

  • 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.

    minLength: 64

    maxLength: 64

Request body
application/json
  • office_hours

    object

    required

    Show child attributes
  • 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.

    format : int64

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.

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.

    format : int32

  • 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.

    enum : ['DEFAULT', 'OPTIONAL']

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

    Show child attributes
  • sort_by

    string

Sample Response

                      
{
    "pagesize": 10,
    "count": 100,
    "pagination": 8,
    "sort_by": "DEFAULT"
}