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

Aptify Views with Aptify Services API

The Aptify Views endpoint executes an Aptify View by Name (recommended) or ID, and provides the results in the response. Views are created in the Aptify interface and can be made available to the Aptify Views service endpoint.  The Aptify Views endpoint uses the GET action.

Headers

In order to receive View data, you must send the AptifyAuthorization header.

Header NameHeader Value
AptifyAuthorization<Authentication Provider> <TokenId>

Parameters

ParameterQuery ParameterDescriptionExample
viewIdNoId of view.44
TypeYesType of View request: map,ftp,dbp,drilldown,multientitygrid,viewbyname,hierarchy,view or calender.Viewbyname
ViewNameYesName of the View.Used when Type is viewbyname.AllEvents
viewEntityNameYesName of the Entity that the View is attached to.For viewbyname, both the view and ViewEntityName are used to determine the View to execute.

Meetings

FilterYesAdditional condition for view. Syntax is similar as SQL WHERE clause.

FirstName=’John’ AND Last Name=’Doe’

PROMPTDATAYesPipe-delimited field names and values for prompted views.

FirstName=’John’|

LastName=’Doe’
$topYesMaximum number of rows returned (up to 500).5
$skipYesNo. of rows to leave out of result. (Default is 0).5

 

Parameters for Type =viewbyname

Record IDs can differ across different Aptify databases (Development, Test and Production) while Names stay the same.  For this reason, using viewbyname Type is the preferred method in most cases.

Tabular View data is represented as JSON array of JSON Objects, where each object contains row data. The Object properties will be column of view and there for vary from view to view.

 

Endpoint Example
https://<service base>/AptifyViews?Type=viewbyname&viewname=AllEvents&viewentityname=Meetings&PromptData=2
Sample Response Body
{
	count: "2"
	columnwidthresize: "FALSE"
	result: 
		{
			ID: 1
			MeetingID: 1
			ProductID_Name: "Meeting Product 1"
			StartDate: "YYYY-MM-DDTHH:MM:SS"
			EndDate: " YYYY-MM-DDTHH:MM:SS"
			row_number: 1
		}
 		{
			ID: 2
			MeetingID: 2
			ProductID_Name: "Meeting Product 2"
			StartDate: "YYYY-MM-DDTHH:MM:SS"
			EndDate: "YYYY-MM-DDTHH:MM:SS"
			row_number: 2
		}
}

The row data object will always include the ID and row_number properties. Other properties will be available based on the Fields that are included in the View.  ID represents the Record Id and row_number is the rows position in the View results, starting with the number 1. 

 

Sample Empty Response
{
count: "0"
columnwidthresize: "FALSE"
result: []
}

HTTP Status Codes

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

 

Example: Retrieving All Member Types

The following example shows the syntax for retrieving all member types:

Retrieving All Member Types Syntax
https://[servername]/AptifyServicesAPI/services//AptifyViews?Type=viewbyname&viewname=All%20Member%20Types&viewentityname=Member%20Types 

Copyright © 2014-2019 Aptify - Confidential and Proprietary