Retrieve transport

GET /show
Retrieve transport by it's unique ID.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The unique ID of the transport.

    format : int64

Sample Request

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

Responses

200
Successful operation
application/json
  • certificate_verification_method

    string

    Indicates if PBX wishes (Optional) or requires (Mandatory) TLS clients to present a client certificate.

    enum : ['NONE', 'OPTIONAL', 'MANDATORY']

  • port

    integer

    Transport port. API will be failed if the specified port is already in use.
  • protocol

    string

    enum : ['UDP', 'TCP', 'TLS', 'WS', 'WSS']

  • status

    boolean

    Status of transport: true (activated) or false (deactivated)
  • private_key_file

    string

    Filename of private certificate for TLS or WSS transport protocol.
  • root_certificate_file

    string

    Filename of root certificate for TLS or WSS protocol.
  • password_for_private_key_file

    string

    Password of private certificate.
  • certificate_file

    string

    Filename of certificate for TLS or WSS transport protocol. The certificate file MUST be PEM-encoded with X.509.
  • id

    integer

    The unique ID of transport.

    format : int64

Sample Response

                      
{
    "id": 1234
}
                      
                    

List transports'status

POST /status
Destroy transport
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • transports

    array

    required

    transport protocol array

Sample Request

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

Responses

200
Successful operation
400
Invalid transport supplied

Sample Response

                      
                      
                    

Destroy transport

POST /destroy
Destroy transport
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The unique ID of transport.

    format : int64

Sample Request

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

Responses

200
Successful operation
400
Invalid transport ID supplied

Sample Response

                      
                      
                    

Create transport

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

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • port

    integer

    required

    Transport port. API will be failed if the specified port is already in use.
  • certificate_verification_method

    string

    required

    Indicates if PBX wishes (Optional) or requires (Mandatory) TLS clients to present a client certificate.

    enum : ['NONE', 'OPTIONAL', 'MANDATORY']

  • protocol

    string

    required

    enum : ['UDP', 'TCP', 'TLS', 'WS', 'WSS']

  • private_key_file

    string

    required

    Filename of private certificate for TLS or WSS transport protocol.
  • root_certificate_file

    string

    required

    Filename of root certificate for TLS or WSS protocol.
  • password_for_private_key_file

    string

    required

    Password of private certificate.
  • certificate_file

    string

    required

    Filename of certificate for TLS or WSS transport protocol. The certificate file MUST be PEM-encoded with X.509.

Sample Request

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

Responses

200
Created transport
application/json
  • id

    integer

    The unique ID of transport.

    format : int64

Sample Response

                      
{
    "id": 1234
}
                      
                    

Retrieve a collection of transports

GET /list
Retrieve a collection of transports
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/transports/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagesize

    integer

  • transports

    array

    Show child attributes
  • count

    integer

  • pagination

    integer

  • sort_by

    string

Sample Response

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