Query Collections

Overview

You can use the q parameter to query and filter a collection resource. The q parameter declares a query specification expression in MongoDB format.

ClosedURL Format for Collection Resource Parameters

Query Parameters and Operators

CPQ Supports the following parameters and operators for applicable REST API services:

Query Parameters

The following query parameters can be used in CPQ queries.

Query Parameter Description

q

Declares a query specification expression in MongoDB format. See MongoDB Query Specifications for more information.

Example

?q={createdBy:'Matt'}

excludeFieldTypes

Specifies a comma-separated list of fields to be excluded in the response.

ClosedView valid field types:

Example

?excludeFieldTypes=fileAttachment,readOnlyTextOrHtml

fields

Force-active fields are always included in the response.

Example

?fields=node,eventDate,applicationVersion

finder

Used as a predefined finder to search the collection.

Format: ?finder=<finderName>;<VarName>=<variableValue>

Example

?finder=findByKeyword;keyword=Customer

onlyData

The resource item payload will be filtered in order to contain only data (no links section, for example).

Example

?onlyData=true


ClosedComparison Operators

ClosedLogical Operators

Closed$like Operator Support for q Parameter

Related Topics

Related Topics Link IconSee Also