PBX API : GET /Phonebooks/

To get a phone books, make an HTTP GET request with basic authorization, resource URI:

http(s)://{PBX}/api/v1/Phonebooks/

GET Parameters

Required Parameters

NameDescription

Optional Parameters:

NameDefaultPossible valuesDescription

fields

All

id
name
type
hash
owner_id
sync_set
sync_interval
sync_params

A list of fields that should be returned

Maybe using with comma "," for listing all required fields

sync_params - only for admins

start0 Offset rows returned

count

100 How many rows to return

sort

nameid
name
type
hash
owner_id
sync_set
sync_interval
sync_params
Sort field
dir

ASC

ASC
DESC
Type of sorting

search

  

Search words
If searchFields is not specify , searching by following fields:
name

searchFields

nameid
name
type
hash
owner_id
sync_set
sync_interval
sync_params

Field to be searched, there may be several.

Maybe using with comma "," for listing all required fields

filter[$key]emptyfilter[id]
filter[name]
filter[type]
filter[hash]
filter[owner_id]
filter[sync_set]
filter[sync_interval]
filter[sync_params]
Filtering by any field also can use range [from][to] for filtering

Example:

GET http://{PBX}/api/v1/Phonebooks/?start=1&count=2&sort=id&dir=ASC
 {

    "type":"result",
    "result":{
        "total":6,
        "records":[{
            "id":1,
            "name":"default",
            "type":2,
            "hash":"",
            "owner_id":0,
            "sync_set":0,
            "sync_interval":0
        },{
            "id":2,
            "name":"LDAP",
            "type":3,
            "hash":"62a3db98a6a1f10cea44d1aa05d6dd0d",
            "owner_id":0,
            "sync_set":0,
            "sync_interval":0
        }]
    }
}