ListAddressbokkContacts

The ListAddressbookContacts command returns with the details of the contacts from a selected address book. The contacts can be also filtered by many options that you can set as a parameter.

Request parameters

Parameter name Example value Description Mandatory
AddressbookName address_book_1 The name of the addressbook which will be queried for addressbook contacts (use the ListAddressbookNames command to get addressbook names). yes
Email email@address.com Filter by e-mail address no
FullName John Doe Filter by full name. no
PageNumber 0 The page number which specifies the source page which will be queried for addressbook entries. The default value is 0. no
PhoneNumber +36 20 555 6666 Filter by phone number. no
RowsPerPage 20 Specifies how many contacts the response will contain at maximum. The default value is 20. no
Username admin The username of the account. The username and password parameters are used to authenticate the user. yes
Password abc123 Specifies the password. The username and password parameters are used to authenticate the user. yes

Response parameters

Parameter name Example value Description Mandatory
Code 200 Returns the status code of the response. yes
Contacts Between the <Contact> nodes the details of a contact is shown. There are as many pairs of <Contact> nodes as many contacts were filtered. The parameters shown between the <Contact> nodes are: Name, PhoneNumber and Email. yes
Message Command successfully executed Returns the description of the response code. yes
TotalRecords 50 The total number of contacts found in the specified addressbook after filtering. yes
NotificationName CallConnected Name of the notification request type. no

Example request and response

URL request

http://127.0.0.1:9509/api?command=ListAddressbookContacts&AddressbookName=address_book_1&RowsPerPage=20&PageNumber=0&FullName=&Email=&PhoneNumber=&Username=HTTP_User_1&Password=qwe123

Response

<?xml version="1.0"?>
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Code>200</Code>
  <Message>Command successfully executed</Message>
  <TotalRecords>3</TotalRecords>
  <Contacts>
    <Contact>
      <Name>Niko Terrell</Name>
      <PhoneNumber>+36 20 555 9999</PhoneNumber>
      <Email>niko_terrell@mail.com</Email>
    </Contact>
    <Contact>
      <Name>John Doe</Name>
      <PhoneNumber>+36 20 555 7777</PhoneNumber>
      <Email>john_doe@mail.com</Email>
    </Contact>
    <Contact>
      <Name>Luke Ward</Name>
      <PhoneNumber>+36 20 555 8888</PhoneNumber>
      <Email>luke_ward@mail.com</Email>
    </Contact>
  </Contacts>
</Response>

More information