Retrieve inbound rule

GET /show
Retrieve inbound rule
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The tenant id of the tenant or admin user. Admin user has access to details for his account and other tenantusers, whilst tenant user has access to his account info only.

    format : int64

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/inbound_rules/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • type

    string

    If it is set to DID, inbound rule will be configured based on the callee ID. If it is set to CID, inbound rule will be configured based on the caller ID.

    enum : ['DID', 'CID']

  • number_mask

    string

    Mask number for inbound rule.
  • enabled

    boolean

    Enabled or not.
  • name

    string

    Inbound rule name.
  • id

    integer

    Inbound rule ID.

    format : int64

  • office_hours

    object

    Show child attributes
  • forward

    object

    Show child attributes
  • providers

    array

    Show child attributes

Sample Response

                      
{}
                      
                    

Destroy inbound rule

POST /destroy
Destroy inbound rule
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    Inbound rule ID.

    format : int64

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/inbound_rules/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Successful operation
400
Invalid inbound rule ID supplied

Sample Response

                      
                      
                    

Update inbound rule

POST /update
Update inbound rule
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    If it is set to DID, inbound rule will be configured based on the callee ID. If it is set to CID, inbound rule will be configured based on the caller ID.

    enum : ['DID', 'CID']

  • number_mask

    string

    required

    Mask number for inbound rule.
  • enabled

    boolean

    required

    Enabled or not.
  • forward

    object

    required

    Show child attributes
  • providers

    array

    required

  • office_hours

    object

    required

    Show child attributes
  • id

    integer

    required

    Inbound rule ID.

    format : int64

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/inbound_rules/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

Create inbound rule

POST /create
Add a new inbound rule. Please make sure you have at least one provider created before creating a new inbound rule.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    If it is set to DID, inbound rule will be configured based on the callee ID. If it is set to CID, inbound rule will be configured based on the caller ID.

    enum : ['DID', 'CID']

  • number_mask

    string

    required

    Mask number for inbound rule.
  • forward

    object

    required

    Show child attributes
  • enabled

    boolean

    required

    Enabled or not.
  • office_hours

    object

    required

    Show child attributes
  • name

    string

    required

    Inbound rule name.
  • providers

    array

    required

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/inbound_rules/create \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Created inbound rule
application/json
  • id

    integer

    Inbound rule ID.

    format : int64

Sample Response

                      
{}
                      
                    

Retrieve a collection of inbound rules

GET /list
Retrieve a collection of inbound 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/inbound_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"
}