PBX API : GET /Colleagues/

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

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

GET Parameters

Required Parameters

NameDescription

Optional Parameters:

NameDefaultPossible valuesDescription

fields

All

dn
id
name
extension
officePhone
mobilePhone
faxNumber
email
pbxDn
role
groupDn
language
dialplan
faxDialplan
department

A list of fields that should be returned

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

start0

{from 0 to n}

Offset rows returned

count

1500{from 1 to n}How many rows to return

sort

dn

dn
id
name
extension
officePhone
mobilePhone
faxNumber
email
pbxDn
role
groupDn
language
dialplan
faxDialplan
department

Sort field
dir

DESC

ASC
DESC

Type of sorting

search

empty{search word}

Search words
If searchFields is not specify , searching by following fields:
name
extension
officePhone
mobilePhone
faxNumber
email

searchFields

name
extension
officePhone
mobilePhone
faxNumber
email

id
name
extension
officePhone
mobilePhone
faxNumber
email
pbxDn
role
groupDn
language
dialplan
faxDialplan
department

Field to be searched, there may be several.

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

 

filter[$key]empty

filter[id]
filter[name]
filter[extension]
filter[officePhone]
filter[mobilePhone]
filter[faxNumber]
filter[email]
filter[pbxDn]
filter[role]
filter[groupDn]
filter[language]
filter[dialplan]
filter[faxDialplan]
filter[department]

Filtering by any field

Response example:

GET http://{PBX}/api/v1/Colleagues/?start=1000&count=2
{
  "type": "result",
  "result": {
    "total": "5023",
    "records": [
      {
        "dn":"uid=2951881,o=com0,dc=wildix",
        "id":"2951881",
        "name":"Gift Frolund",
        "extension":"27973",
        "officePhone":"",
        "mobilePhone":"+38093527973",
        "faxNumber":"+38063527973",
        "email":"gift_frolund@example.com",
        "pbxDn":"pbxid=000c29044037,dc=wildix",
        "role":"user",
        "groupDn":"gid=14082460,o=com0,dc=wildix",
        "language":"en",
        "dialplan":"users",
        "faxDialplan":"users",
        "department":"Blood Raven"
      },
      {
        "dn":"uid=1092202,o=com0,dc=wildix",
        "id":"1092202",
        "name":"Katsuyuki Dulli",
        "extension":"27974",
        "officePhone":"",
        "mobilePhone":"+38093527974",
        "faxNumber":"+38063527974",
        "email":"katsuyuki_dulli@example.com",
        "pbxDn":"pbxid=000c29044037,dc=wildix",
        "role":"user",
        "groupDn":"gid=14082460,o=com0,dc=wildix",
        "language":"en",
        "dialplan":"users",
        "faxDialplan":"users",
        "department":"Gold corp"
      }
    ]
  }
}

Example:

CLI CURL
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?fields=name"
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?fields=id,name,extension"
count
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?count=5"
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?count=1000&start=500"
sort
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?sort=id"
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?sort=id&dir=ASC"
search
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?search=320"
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?search=320&searchFields=name,extension,mobilePhone"
Filter
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?filter[role]=usersort=id&count=3&dir=DESC"
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?filter[extension][]=333&filter[extension][]=544"
curl -X GET --globoff -u user:pass --url "http://{PBX}/api/v1/Colleagues/?filter[name]=user4"