If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Search For Records with Aptify Services API

 

While Aptify Views can be created with filters and prompts, sometimes all that is requires is an ad hoc search against an Entity.  The Aptify Link Box Data endpoint provides ad hoc search for an Entity.  This endpoint is used by the Aptify Link Box UI control to provide its search functionality.  By default, the search is a “begins with” search on the Name field of the Entity and, if a numeric search term is provided, an exact match on the Entity ID.  The information included in the search results includes the ID field and all Fields that are marked “Default In View”.   Other search criteria can be defined for the Entity, including support for Full Text Index searches.  Also, the fields returned in the search results can also be defined by Entity in metadata.  Finally, additional filters can also be passed in to the service endpoint.  The basic use case has been defined below.

The Aptify Link Box Data endpoint uses the GET action.

In order to receive search results, you must send the AptifyAuthorization header.

Parameters

ParameterQuery Param?DescriptionExample
EntityNameYesThe name of the Entity to searchPersons
valueYesThe ID or partial value of the "Is Name Field" field to search forBaldwin, Aiesha
PageSizeYesThe number of results to return, starting from the first result (defaults to 100).10

Headers

In order to receive search results, you must send the AptifyAuthorization header.

Header NameHeader Value
AptifyAuthorization<AuthType> <TokenId>
Endpoint Example
 https://<service base>/LinkBoxData?entityname=Persons&value=Baldwin&PageSize=2

Sample Response Body

A JSON array object is returned based on search result. In this example, the call returns two records from the Persons entity that include ‘Baldwin’ in the name.

Note that if we set the value to ‘Baldwin, Aiesha’ then only the call would only return the first result (since there is only one record found that match the name provided).

Sample Search Data
[
	{
		"ID": "1",
		"_NameField": "Baldwin, Aiesha/Danube Partners",
		"_recordCount": "2",
		"_recordRank": "3",
		"NameWCompany": "Baldwin, Aiesha/Danube Partners",
		"FirstName": "Aiesha",
		"LastName": "Baldwin",
		"Company": "Danube Partners",
		"Title": "Numero Uno Tester",
		"AddressLine1": "1789 Tester Dr.",
		"City": "Palo Alto",
		"State": "CA",
		"ZipCode": "94301",
		"Country": "United States",
		"PhoneAreaCode": "650 ",
		"Phone": "750-9187 ",
		"PhoneExtension": " ",
		"Email1": "Aiesha.Baldwin@demodata.aptify.com",
		"PrimaryFunction": "Marketing ",
		"MemberType": "Non-Member",
		"CompanyMemberType": "Corporate Member",
		"Photo": "5166",
		"StatusName": "Active "
	},
	{
		"ID": "2478",
		"_NameField": "Baldwin, Alexandra/Rattlesnake Canyon Grocery",
		"_recordCount": "2",
		"_recordRank": "3",
		"NameWCompany": "Baldwin, Alexandra/Rattlesnake Canyon Grocery",
		"FirstName": "Alexandra",
		"LastName": "Baldwin",
		"Company": "Rattlesnake Canyon Grocery",
		"Title": "Information Technology Associate",
		"AddressLine1": "2817 Milton Dr.",
		"City": "Albuquerque",
		"State": "NM",
		"ZipCode": "87110",
		"Country": "United States",
		"PhoneAreaCode": "",
		"Phone": "",
		"PhoneExtension": "",
		"Email1": "Baldwin_Alexandra@demodata.aptify.com",
		"PrimaryFunction": "Information Technology ",
		"MemberType": "Individual Member",
		"CompanyMemberType": "Non-Member",
		"Photo": "",
		"StatusName": "Active "
	}
]

HTTP Status Codes

Status CodeMeaning
200OK; View data in response body
404Not Authenticated

Copyright © 2014-2019 Aptify - Confidential and Proprietary