JSON Search Parameters
Describes a set of complex search criteria broken into search, sorting and grouping rules. This structure is used specifically with the Entity service as input to the Find Data Entity resource method.
Search rules can be added to a search rules list and can be used to match data entities based on specific criteria. This rules list also specifies an operator which determines whether all rules or only one rule in the list is required to be matched.
Search rules can be based on data record values, data entity properties, finishing options, document length, template names and whether an entity's identifier is contained or not contained in a list of identifiers.
Rule groups can also be added to this search rules list, and each rule group contains it's own sub list of search rules and its' own rule operator. Rule groups can also be added to the search rule list of an existing rule group which allows for the construction of complex search criteria.
Sorting rules can be also added to a sort rules list and (depending on the data entity type) can be used to sort data entity entries in the search results by either data record values or data entity properties.
Every sort rule added will expand the value of the sort key of each entry listed in the resulting JSON Identifier Lists (with Sort Key) structure.
Grouping rules can be also added to a group rules list and (depending on the data entity type) can be used to group data entity entries in the search results by either data record values or data entity properties.
Every group rule added can expand the number of sub lists contained in the resulting JSON Identifier Lists (with Sort Key) structure.
Certain search, sorting or grouping rules can only be used with specific data entity types.
See the Finding Specific Data Entities in the Server page of the Working Examples section for further detail on the available rule combinations.
Structure
The structure consists of an object
with the following name/value pairs:
-
entity
– the data entity type (value of eitherDATARECORDS
,DATASETS
,CONTENTITEMS
,CONTENTSETS
,JOBS
orJOBSETS
) (type ofstring
) -
search
– search criteria, consisting of anobject
with the following name/value pairs: -
operator
– the search rule operator for the base list of rules (value of eitherAND
orOR
) (type ofstring
) -
rules
– a base list of search rules, consisting of anarray
ofobjects
each with a specific rule sub-structure depending on the type of rule -
sort
– a list of sorting rules, consisting of anarray
ofobjects
each with the following name/value pairs: -
name
– the name of the data value field or data entity property to sort by (type ofstring
) -
order
– the order that matches to this rule are sorted by (value of eitherASC
orDESC
) (type ofstring
) -
type
– the type of sorting rule (value of eithervalue
orproperty
) (type ofstring
) -
numeric
– whether the data value field is a of a numeric type (type ofboolean
) -
group
– a list of grouping rules, consisting of anarray
ofobjects
each with the following name/value pairs: -
name
– the name of the data value field or data entity property to group by (type ofstring
) -
order
– the order that matches to this rule are grouped by (value of eitherASC
orDESC
) (type ofstring
) -
type
– the type of grouping rule (value of eithervalue
orproperty
) (type ofstring
) -
numeric
– whether the data value field is a of a numeric type (type ofboolean
)
Sorting rule objects
with a type
value of value
also contain the following additional name/value pair:
Grouping rule objects
with a type
value of value
also contain the following additional name/value pair:
The search rule sub-structure consists of an object
with rule specific groupings of name/value pairs as follows.
-
type
– the type of search rule (value ofvalue
) (type ofstring
) -
name
– the name of the data field (type ofstring
) -
value
– the value of the data field (type ofstring
, orarray
ofstrings
whencondition
is value of eitherIN
orNOT IN
) -
condition
– the comparison condition (value of eitherEQUAL
,NOTEQUAL
,LESS
,GREAT
,LESSEQUAL
,GREATEQUAL
,STARTSWITH
,ENDSWITH
,CONTAINS
,LIKE
,NLIKE
,IN
orNOT IN
) (type ofstring
) -
type
– the type of search rule (value ofproperty
) (type ofstring
) -
name
– the name of the data entity property (type ofstring
) -
value
– the value of the data entity property (type ofstring
, orarray
ofstrings
whencondition
is value of eitherIN
orNOT IN
) -
condition
– the comparison condition (value of eitherEQUAL
,NOTEQUAL
,LESS
,GREAT
,LESSEQUAL
,GREATEQUAL
,STARTSWITH
,ENDSWITH
,CONTAINS
,LIKE
,NLIKE
,IN
orNOT IN
) (type ofstring
) -
type
– the type of search rule (value of eitherIN
orNOT IN
) (type ofstring
) -
identifiers
– anarray
of data entity identifiers (type ofnumber
) -
type
– the type of search rule (value offinishing
) (type ofstring
) -
medianame
– the name of the media used (type ofstring
) -
condition
– the comparison condition (value of eitherEQUAL
orNOTEQUAL
) (type ofstring
) -
type
– the type of search rule (value offinishing
) (type ofstring
) -
duplex
– whether the page sheet is duplex (type ofboolean
) -
type
– the type of search rule (value offinishing
) (type ofstring
) -
frontcoating
– the front coating of the media used (value of eitherUNSPECIFIED
,NONE
,COATED
,GLOSSY
,HIGH_GLOSS
,INKJET
,MATTE
,SATIN
orSEMI_GLOSS
) (type ofstring
) -
backcoating
– the back coating of the media used (value of eitherUNSPECIFIED
,NONE
,COATED
,GLOSSY
,HIGH_GLOSS
,INKJET
,MATTE
,SATIN
orSEMI_GLOSS
) (type ofstring
) -
condition
– the comparison condition (value of eitherEQUAL
orNOTEQUAL
) (type ofstring
) -
type
– the type of search rule (value offinishing
) (type ofstring
) -
bindingstyle
– the binding style of the media used (value of eitherNONE
,DEFAULT
,STAPLED
,GLUED
,STITCHED
,ADHESIVE
,SPINETAPING
,RING
,WIREDCOMB
,PLASTICCOMB
orCOIL
) (type ofstring
) -
bindingedge
– the binding edge of the media used (value of eitherDEFAULT
,LEFT
,RIGHT
,TOP
orBOTTOM
) (type ofstring
) -
bindingtype
– the binding type of the media used (value of eitherDEFAULT
,SADDLE
,SIDE
orCORNER
) (type ofstring
) -
bindingangle
– the binding angle of the media used (value of eitherDEFAULT
,VERTICAL
,HORIZONTAL
orANGLE
) (type ofstring
) -
condition
– the comparison condition (value of eitherEQUAL
orNOTEQUAL
) (type ofstring
) -
type
– the type of search rule (value ofdoclength
) (type ofstring
) -
value
– the number of pages in document (type ofnumber
) -
condition
– the comparison condition (value of eitherEQUAL
,NOTEQUAL
,LESS
,GREAT
,LESSEQUAL
orGREATEQUAL
) (type ofstring
) -
type
– the type of search rule (value oftemplatename
) (type ofstring
) -
template
– the name of the design template used for document (type ofstring
) -
condition
– the comparison condition (value of eitherEQUAL
orNOTEQUAL
) (type ofstring
) -
operator
– the search rule operator for sub-list of rules in rule group (value of eitherAND
orOR
) (type ofstring
) -
rules
– a sub-list of search rules, consisting of anarray
ofobjects
each with a certain rule sub-structure depending on the type of rule
Search rule objects
with a type
value of value
contain the following name/value pairs:
Search rule objects
with a type
value of property
contain the following name/value pairs:
Search rule objects
with a type
value of either IN
or NOT IN
contain the following name/value pairs:
Search rule objects
with a type
value of finishing
contain only one of the following sub-groups of name/value pairs:
Search rule objects
with a type
value of doclength
contain the following name/value pairs:
Search rule objects
with a type
value of templatename
contain the following name/value pairs:
Search rule group objects
contain the following name/value pairs:
Example
The following is an example of this structure:
{
"entity": "CONTENTITEMS",
"search": {
"operator": "AND",
"rules": [
{
"type": "value",
"value": "FR",
"name": "Country"
},
{
"operator": "OR",
"rules": [
{
"type": "finishing",
"frontcoating": "HIGH_GLOSS",
"backcoating": "HIGH_GLOSS",
"condition": "EQUAL"
},
{
"type": "finishing",
"bindingstyle": "DEFAULT",
"bindingedge": "DEFAULT",
"bindingtype": "DEFAULT",
"bindingangle": "VERTICAL",
"condition": "EQUAL"
}
]
}
]
},
"sort": [
{
"name": "LastName",
"order": "ASC",
"numeric": false,
"type": "value"
}
],
"group": [
{
"name": "Gender",
"order": "ASC",
"numeric": false,
"type": "value"
}
]
}