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 Name Header Value
AptifyAuthorization <Authentication Provider> <TokenId>

 

Parameters

Parameter Query Parameter Description Example
viewId No Id of view. 44
Type Yes Type of View request: map,ftp,dbp,drilldown,multientitygrid,viewbyname,hierarchy,view or calender. Viewbyname
ViewName Yes Name of the View.Used when Type is viewbyname. AllEvents
viewEntityName Yes Name 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

Filter Yes Additional condition for view. Syntax is similar as SQL WHERE clause.

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

PROMPTDATA Yes Pipe-delimited field names and values for prompted views.

FirstName=’John’|

LastName=’Doe’
$top Yes Maximum number of rows returned (up to 500). 5
$skip Yes No. 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 Code Meaning
200 OK; View data in response body
404 Not 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 
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.