Criteria Object

Administration

An additional "criteria" object is now available when invoking a REST call on a resource action. Administrators can provide criteria parameters in the request body to retrieve specific content and limit the size of the response.

Note: When creating parameter query to filter results, attributes that are also data columns should be used.

Criteria Query Parameters
Parameter Description

actions

An array of action names, whose state is requested in the state object response.

Example

"actions": ["save","print"]

childDefs

 

An array of child query definitions that specifies query requests for child resources.

  • name - The alias name of the child resource for this query
  • recursive - This Boolean parameter specifies whether the child resource is recursively expanded.
  • queryDef - A query definition object for the child resource.

Example

"childDefs": [
   {
      "name":"transactionLines",
      "recursive":false,
      "queryDef": {
         "state" true,
         "fields":["lineField1","lineField2]
      }
   }
] 

excludeFieldTypes

This parameter allows exclusion of specified attribute types from the response.

ClosedView valid field types:

excludeFieldTypes and fields parameters cannot be used together in the same request body.

Example

"excludeFieldTypes": ["customerId","sequenceNumber"]

expand

This parameter can be used to expand a child resource.

When expand and childef parameters are both used for the same child resource, the childDef parameter takes precedence.

"expand": ["transactionLines","accounts"]

expandedDomains

An array of field names that returns expanded domains in the state object response. The field's domain object will be expanded to include an availableElements array.

Example

"expandedDomains": ["menuAttr1","menuAttr2"]

fields

An array of field names to be returned. The fields array values determine the "attributes" in the response's state object.

Example

"fields": ["field1","field2"]

groups

An array of group names, whose state is requested in the state object response.
For example: group can correspond to UI tabs, and return the aggregated state information for all fields contained within the UI tab.

Example

"groups": ["tab_123","tab_234"]

orderby

An array of field names to specify the order of items returned in the response, each field name could optionally be followed by asc or desc. The default is "asc".

Example

"orderby": ["listPrice:asc","totalPrice:desc"]

q

This string declares a query specification expression in MongoDB format.

"q": "{'_part_number':{$eq:'part100'}}"

state

This Boolean parameter specifies whether to include the state property.
By default, this value is set to false and the state property is not included.

Example

"state": false

totalResults

This Boolean parameter specifies whether to calculate the totalResults property.
By default, the value is set to false indicating that totalResults is not calculated.

Example

"totalResults": false

Related Topics

Related Topics Link IconSee Also