Search Address Book ​
GET /api/addressbook
Searching for Address Book contacts can be achieved via multiple criteria, as outlined by the fields below. You can search using just one field, or multiple to further narrow down the search results. In order to search for Address Book contacts, you must specify the Self Destruct and Address Book API Key which can be found on the screen Administration -> Passwordstate Administration -> System Settings -> API tab.
- AddressBookID
- FirstName
- Surname
- EmailAddress
- Company
Powershell
# Search by AddressBookID
$PasswordstateURL = $PasswordstateBaseURL + '/api/addressbook/?AddressBookID=<value>'
# Search by FirstName
$PasswordstateURL = $PasswordstateBaseURL + '/api/addressbook/?FirstName=<value>'
# Search by FirstName and Surname
$PasswordstateURL = $PasswordstateBaseURL + '/api/addressbook/?FirstName=<value>&Surname=<value>'
# Searching by EmailAddress
$PasswordstateURL = $PasswordstateBaseURL + '/api/addressbook/?EmailAddress=<value>'
# Searching by Company
$PasswordstateURL = $PasswordstateBaseURL + '/api/addressbook/?Company=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateURL -Header @{ "APIKey" = "$APIKey" }Json
# Response
HTTP/1.1 200
[
{
"AddressBookID":"33",
"FirstName":"Graham",
"Surname":"Sanders",
"EmailAddress":"gsanders@gmail.com",
"Company":"Sanders Pty Ltd",
"BusinessPhone":"",
"PersonalPhone":"",
"Street":"",
"City":"",
"State":"",
"Zipcode":"",
"Country":"United States",
"Notes":"",
"PassPhrase":"Pas$Fraze1865",
"GlobalContact":"True"
}
]