Table of Contents

Search

  1. Preface
  2. Introduction to Business Entity Services
  3. EJB Business Entity Service Calls
  4. REST Business Entity Service Calls
  5. REST APIs for Data Director
  6. SOAP Business Entity Service Calls
  7. Cross-reference Records and BVT Calculations Services
  8. Supporting Corporate Linkage Service
  9. External Calls to Cleanse, Analyze, and Transform Data
  10. Appendix A: Using REST APIs to Add Records
  11. Appendix B: Using REST APIs to Upload Files
  12. Appendix C: Using REST APIs to Manage Reports

Query Parameters

Query Parameters

Define the query as a list of field-value pairs.
The following table describes the query parameters that you can use in the URL:
Parameter
Description
action
Required. Returns all the records of the specified business entity type in the query results. Set to
query
, and use the parameter with the
filter
parameter. When used without the
filter
parameter, the query searches for all the records of the specified business entity type.
For example, use the following query to search for all the Person business entity records:
Person?action=query
filter
Required. Specifies a list of field-value pairs separated by operators. Valid operators are AND, IN, and Range.
For example, use the following query to search for the Person records with the first name STEVE and the last name SMITH:
Person?action=query&filter=firstName='STEVE' AND lastName='SMITH'
depth
Specifies the number of child record levels to return. For example, you can specify the following levels:
  • 1. Return the root record.
  • 2. Returns the root record and its direct child records.
  • 3. Returns the root record, the direct child records, and grandchild records.
For example, use the following query to search for records with the first name STEVE and return information about the root record and its direct child records:
Person?action=query&filter=firstName='STEVE' AND lastName='SMITH'&depth=2
suppressLinks
Indicates whether the parent-child links are visible in the API response. Set the parameter to true to suppress all the parent-child links in the response. Default is false.
For example, use the following query to search for records with the first name STEVE and return a response where no parent-child links are visible:
Person?action=query&filter=firstName='STEVE'&suppressLinks=true
readSystemFields
Indicates whether to return the system fields in the result. Default is false.
fields
Specifies the fields to display in the query results.
outputView
Specifies the business entity view that you want to use to display the query results. When you configure the business entity view for the query results, include the fields that you want to display in the query results.
Order
Specifies the sort order of the query results. Use the plus (+) character as prefix to specify ascending order and the minus (-) character as prefix to specify descending order. By default, the query result is in ascending order.
When you specify more than one parameter, the result set is ordered by the parameter that is first in the list, followed by the next parameter.
resolveLookup
Retrieves the entire lookup field for a specified business entity. Set the parameter to true to load the lookup field and include it in the response. Default is false.
For example, the addressType field is a lookup field at the child level of the Person business entity.
When the resolveLookup parameter is set to false, you might receive the following REST API response:
{ "label": "LU Address Type", "addressType": "BILL" }
When the resolveLookups parameter is set to true, the REST API response includes additional details and you might receive the following REST API response:
{ "label": "LU Address Type", "addressType": "BILL", "addressTypeDisp": "BILLING" }

Operators

You can use the following operators within the filter parameter:
AND
Searches for records with all the field values listed in the filter parameter.
For example, use the following query to search for records with the first name STEVE and the last name SMITH:
Person?action=query&filter=firstName='STEVE' AND lastName='SMITH'
IN
Searches for records with any of the values listed in the filter parameter.
For example, use the following query to search for records with the first name STEVE or JOHN:
Person?action=query&filter=firstName IN [STEVE,JOHN]
Range
Searches for records within a specified range. You can specify a range for the numeric and the date data type fields.
Use the following format for the integer data type:
<business entity field name>=[fromValue,toValue]
The range is from the fromValue to the toValue. Ensure that the fromValue is lower than the toValue.
For example, use the following query to search for records in the age group 35 to 45:
Person?action=query&filter=firstName IN [STEVE,JOHN] AND age=[35,45]
Use the following format for the date data type:
<business entity field name>=[fromDate,toDate]
The range is from the fromDate to the toDate.
For example, use the following query to search for records with the date of birth between 12 June 2000 and 12 June 2015:
Person?action=query&filter=birthDate=[2000-06-12T12:30:00Z,2015-06-12T12:30:00Z]
!=
Searches for records that do not match a specified field value or range.
For example, use the following query to search for the records with the first name other than ADAM:
Person?action=query&filter=firstName!='ADAM'
For example, use the following query to search for the records with the first name other than ADAM and with the date of birth prior to 16 November 2017 and after November 16 2020.
Person?action=query&filter=firstName!='ADAM' AND birthdate!=[2017-11-16T00:00:00,2020-11-16T00:00:00]
Wildcard
You can use text and an asterisk (*) wildcard operator to specify a text pattern instead of a complete search string. You can use the asterisk wildcard operator to increase your chances of finding the records that you want. The asterisk wildcard operator is useful when you do not know the exact text or want to search for similar text.
The following table lists example search strings and explains how they function:
Example Query String
Query Behavior
John*
Queries for records that contain a value that starts with
John
. For example,
Johnson
or
Johnny
.
Jo*n
Queries for records that start with
Jo
and end with
n
. For example,
Johansson
or
Jordan
.
*
Returns all the records.

0 COMMENTS

We’d like to hear from you!