List contact groups

GET /group/list
List contact groups
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    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/contacts/group/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagesize

    integer

  • count

    integer

  • contactGroups

    array

    Show child attributes
  • pagination

    integer

  • sort_by

    string

Sample Response

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

Retrieve contact group

GET /group/show
Retrieves the properties of an contact group.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    contact ID

    format : int64

Sample Request

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

Responses

200
Successful operation
application/json
  • description

    string

    description of contact group.
  • name

    string

    name of contact group.
  • extension_groups

    array

    extension groups belong contact group.
    Show child attributes
  • id

    integer

    unquie id.

    format : int64

Sample Response

                      
{
    "id": 1234
}
                      
                    

Add a new contact group to the system.

POST /group/create
Create a new contact group.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • description

    string

    required

    description of contact group.
  • name

    integer

    required

    unquie id.

    format : int64

  • extension_groups

    array

    required

    extension groups belong contact group.

Sample Request

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

Responses

200
Created contact group
application/json
  • id

    integer

    unquie id.

    format : int64

Sample Response

                      
{
    "id": 1234
}
                      
                    

List contact

GET /list
List a collection of contact.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • contact_grpid

    integer

    required

    The id of the contact group.

    format : int64

  • sort_by

    string

    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/contacts/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagesize

    integer

  • count

    integer

  • extensions

    array

    Show child attributes
  • pagination

    integer

  • sort_by

    string

Sample Response

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

Retrieve contact

GET /show
Retrieves the settings of an contact.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    contact ID

    format : int64

Sample Request

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

Responses

200
Successful operation
application/json
  • type

    string

    type of contact.

    enum : ['PortSIP', 'UNKNOWN']

  • other

    string

    phone number of contact.
  • company

    string

    company of contact.
  • mobile_phone2

    string

    phone number of contact.
  • last_name

    string

    Last name of contact.
  • home_fax

    string

    phone number of contact.
  • pager

    string

    pager of contact.
  • business_fax

    string

    phone number of contact.
  • business

    string

    phone number of contact.
  • home_phone2

    string

    phone number of contact.
  • email

    string

    email of contact.
  • first_name

    string

    First name of contact.
  • id

    integer

    unquie id.

    format : int64

  • mobile_phone

    string

    phone number of contact.
  • home_phone

    string

    phone number of contact.
  • business2

    string

    phone number of contact.

Sample Response

                      
{
    "id": 1234
}
                      
                    

Update contact group.

POST /group/update
Update contact group
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • description

    string

    required

    description of contact group.
  • id

    integer

    required

    unquie id.

    format : int64

  • name

    string

    required

    name of contact group.
  • extension_groups

    array

    required

    extension groups belong contact group.

Sample Request

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

Responses

200
Update contact group

Sample Response

                      
                      
                    

Delete an contact

POST /destroy
Delete a certain contact.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    unquie id.

    format : int64

Sample Request

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

Responses

404
User not found
200
Successful operation
400
Invalid extension id supplied

Sample Response

                      
                      
                    

Udpate contact

POST /update
Modify the settings of an contact.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    type of contact.

    enum : ['PortSIP', 'UNKNOWN']

  • other

    string

    required

    phone number of contact.
  • company

    string

    required

    company of contact.
  • mobile_phone2

    string

    required

    phone number of contact.
  • last_name

    string

    required

    Last name of contact.
  • home_fax

    string

    required

    phone number of contact.
  • pager

    string

    required

    pager of contact.
  • business_fax

    string

    required

    phone number of contact.
  • business

    string

    required

    phone number of contact.
  • home_phone2

    string

    required

    phone number of contact.
  • email

    string

    required

    email of contact.
  • first_name

    string

    required

    First name of contact.
  • id

    integer

    required

    unquie id.

    format : int64

  • mobile_phone

    string

    required

    phone number of contact.
  • home_phone

    string

    required

    phone number of contact.
  • business2

    string

    required

    phone number of contact.

Sample Request

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

Responses

200
update contact

Sample Response

                      
                      
                    

Destroy an contact group

POST /group/destroy
Destroy a certain contact group.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    unquie id.

    format : int64

Sample Request

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

Responses

404
User not found
200
Successful operation
400
Invalid extension number supplied

Sample Response

                      
                      
                    

Add a new contact to the system.

POST /create
Create a new extension. Only tenant or admin user has access to this API.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • type

    string

    required

    type of contact.

    enum : ['PortSIP', 'UNKNOWN']

  • contact_grpid

    integer

    required

    unquie id.

    format : int64

  • company

    string

    required

    company of contact.
  • other

    string

    required

    phone number of contact.
  • mobile_phone2

    string

    required

    phone number of contact.
  • last_name

    string

    required

    Last name of contact.
  • home_fax

    string

    required

    phone number of contact.
  • pager

    string

    required

    pager of contact.
  • business_fax

    string

    required

    phone number of contact.
  • business

    string

    required

    phone number of contact.
  • home_phone2

    string

    required

    phone number of contact.
  • email

    string

    required

    email of contact.
  • first_name

    string

    required

    First name of contact.
  • mobile_phone

    string

    required

    phone number of contact.
  • home_phone

    string

    required

    phone number of contact.
  • business2

    string

    required

    phone number of contact.

Sample Request

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

Responses

200
Created contact
application/json
  • id

    integer

    unquie id.

    format : int64

Sample Response

                      
{
    "id": 1234
}