JSON Structures
The PReS Connect REST API uses various JSON structures to describe certain inputs and outputs to resource methods.
These structures can be broken down into the following categories:
- Common - Structures that are commonly used throughout the REST API
- Specific - Structures that are used by a specific resource method or service in the REST API
Common Structures
Common JSON structures used in the PReS Connect REST API include the following:
JSON Identifier
Describes an identifier for a single data entity or managed file in PReS Connect.
The structure consists of an object with a single name/value pair:
Example:{
"identifier": 12345
}
JSON Identifier (Named)
Describes a named identifier for a single managed file in PReS Connect.
The structure consists of an object with a single name/value pair:
Example:{
"identifier": "Promo-EN-1000.csv"
}
JSON Identifier List
Describes a list of identifiers for multiple data entities in PReS Connect.
The structure consists of an object with a single name/value pair:
Example:{
"identifiers": [ 12345, 23456, 34567 ]
}
JSON Name/Value List (Properties Only)
Describes a list of properties (each as a name/value pair).
The structure consists of an array of objects each with the following name/value pairs:
Example:[
{
"name": "start",
"value": "2015-01-01 00:00:00T-0500"
},
{
"name": "end",
"value": "2015-12-31 23:59:59T-0500"
}
]
JSON Name/Value List
Describes a list of properties (each as a name/value pair) for a data entity of a specific ID.
The structure consists of an object with the following name/value pairs:
-
id - the data entity identifier (type of number )
-
properties - the data entity properties, consisting of an array of objects each with the following name/value pairs:
Example:{
"id": 12345,
"properties": [
{
"name": "start",
"value": "2015-01-01 00:00:00T-0500"
},
{
"name": "end",
"value": "2015-12-31 23:59:59T-0500"
}
]
}
JSON Name/Value Lists
Describes multiple lists of properties (as name/value pairs) for data entities of a specific ID.
The structure consists of an array of JSON Name/Value List structure objects .
Example:[
{
"id": 12345,
"properties": [
{
"name": "start",
"value": "2015-01-01 00:00:00T-0500"
},
{
"name": "end",
"value": "2015-12-31 23:59:59T-0500"
}
]
},
{
"id": 23456,
"properties": [
{
"name": "start",
"value": "2015-01-01 00:00:00T-0500"
},
{
"name": "end",
"value": "2015-12-31 23:59:59T-0500"
}
]
}
]
Specific Structures
Specific JSON structures used in the PReS Connect REST API include the following:
JSON Identifier (with createOnly flag)
Describes an identifier for a single job set entity, along with additional parameters used specifically in an output creation operation.
The structure consists of an object with the following name/value pairs:
Example:{
"identifier": 12345,
"createOnly": true
}
JSON Identifier List (with createOnly flag)
Describes a list of identifiers for multiple job entities, along with additional parameters used specifically in an output creation operation.
The structure consists of an object with the following name/value pairs:
Example:{
"identifiers": [ 12345, 23456, 34567 ],
"createOnly": true
}
JSON Record Content List
Describes a list of data fields (as name/value pairs), nested data records (if any), along with a number of additional properties for a data record entity of a specific ID.
A data record entity (in the record data table) can contain one or more data tables that each contain one or more data record entities (nested data record entities).
A nested data record entity can itself contain one or more data tables that each contain one or more nested data record entities, and so on for potentially multiple levels of nested data tables and data record entities.
A data record entity that contains a data table of nested data record entities is considered to be the parent of the data record entities contained in that data table (which are considered to be the children).
See the Data Entities page of the Technical Overview section for further detail on data set and data record entities.
The structure consists of an object with the following name/value pairs:
-
id - the data record entity identifier (type of number )
-
fields - a list of data fields in the data record entity, consisting of an array of objects each with the following name/value pairs:
-
records - a list of any nested data record entities, consisting of an array of objects each with the following name/value pairs:
-
id - the data record entity identifier (type of number )
-
table - the data record entity data table name (type of string )
-
parentrecordid - the data record entity identifier of parent entity (type of number )
-
fields - a list of data fields in the data record entity, consisting of an array of objects each with the following name/value pairs:
Specific to data record entities that are children of a data set entity (data record entities in the record data table), two additional name/value pairs are included:
Specific to nested data record entities that are children of a data record entity, two additional name/value pairs are included:
Examples:{
"id": 12345,
"table": "record",
"datasetid": 34567,
"fields":[
{
"name": "ID",
"value": "CU00048376"
},
{
"name": "Gender",
"value": "M."
},
{
"name": "FirstName",
"value": "Benjamin"
},
{
"name": "LastName",
"value": "Verret"
}
]
}
{
"id": 45678,
"table": "detail",
"parentrecordid": 23456,
"fields": [
{
"name": "ItemNumber",
"value": "PSM002"
},
{
"name": "ItemDesc",
"value": "PSM Production (unlimited)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "2"
},
{
"name": "ItemTotal",
"value": "990.00"
}
]
}
{
"id": 23456,
"table": "record",
"datasetid": 12345,
"fields": [
{
"name": "ID",
"value": "CU00048376"
},
{
"name": "Date",
"value": "2012-03-29T13:00Z"
},
{
"name": "DueDate",
"value": "2012-04-28T14:00Z"
},
{
"name": "InvNumber",
"value": "INV9441991"
},
{
"name": "Gender",
"value": "M."
},
{
"name": "FirstName",
"value": "Benjamin"
},
{
"name": "LastName",
"value": "Verret"
}
{
"name": "TotalOrdered",
"value": "3"
},
{
"name": "InvSubTotal",
"value": "1485.00"
},
{
"name": "InvTaxTotal",
"value": "111.38"
},
{
"name": "InvTotal",
"value": "1596.38"
}
],
"records": [
{
"id": 45678,
"table": "detail",
"parentrecordid": 23456,
"fields": [
{
"name": "ItemNumber",
"value": "PSM002"
},
{
"name": "ItemDesc",
"value": "PSM Production (unlimited)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "2"
},
{
"name": "ItemTotal",
"value": "990.00"
}
]
},
{
"id": 45679,
"table": "detail",
"parentrecordid": 23456,
"fields": [
{
"name": "ItemNumber",
"value": "PSM005"
},
{
"name": "ItemDesc",
"value": "Upgrade (Starter to Web)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "1"
}
{
"name": "ItemTotal",
"value": "495.00"
}
]
}
]
}
JSON Record Content Lists
Describes multiple lists of data field values (as name/value pairs), nested data records (if any), along with a number of additional properties for data record entities of a specific ID.
The structure consists of an array of JSON Record Content List structure objects .
Example:[
{
"id": 45678,
"table": "detail",
"parentrecordid": 23456,
"fields": [
{
"name": "ItemNumber",
"value": "PSM002"
},
{
"name": "ItemDesc",
"value": "PSM Production (unlimited)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "2"
},
{
"name": "ItemTotal",
"value": "990.00"
}
]
},
{
"id": 45679,
"table": "detail",
"parentrecordid": 23456,
"fields": [
{
"name": "ItemNumber",
"value": "PSM005"
},
{
"name": "ItemDesc",
"value": "Upgrade (Starter to Web)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "1"
}
{
"name": "ItemTotal",
"value": "495.00"
}
]
}
]
JSON Record Content List (Fields Only)
Describes a list of data field values (as name/value pairs) for a data record, used to update an existing data record entity of a specific ID.
The structure consists of an object with the following name/value pairs:
-
id - the data record entity identifier (type of number )
-
fields - a list of data fields in the data record entity, consisting of an array of objects each with the following name/value pairs:
Example:{
"id": 12345,
"fields": [
{
"name": "FirstName",
"value": "Benjamin"
},
{
"name": "LastName",
"value": "Verret"
}
]
}
JSON Record Content Lists (Fields Only)
Describes multiple lists of data field values (as name/value pairs) for a data record, used to update existing data record entities of a specific ID.
The structure consists of an array of JSON Record Content List (Fields Only) structure objects .
Example:[
{
"id": 12345,
"fields": [
{
"name": "FirstName",
"value": "Benjamin"
},
{
"name": "LastName",
"value": "Verret"
}
]
},
{
"id": 23456,
"fields": [
{
"name": "FirstName",
"value": "Dianne"
},
{
"name": "LastName",
"value": "Straka"
}
]
}
]
JSON New Record List
Describes a list of new data records (and their data field values (as name/value pairs)) to be added as data record entities to either an existing data set or data record entity of a specific ID.
The structure consists of an object with the following name/value pairs:
Specific to the adding of data records to the record data table of an existing data set entity, an additional name/value pair is included:
Specific to the adding of nested data records to a data table of an existing data record entity, two additional name/value pairs are included:
Examples:{
"datasetid": 12345,
"records": [
{
"fields": [
{
"name": "ID",
"value": "CU00048376"
},
{
"name": "Gender",
"value": "M."
},
{
"name": "FirstName",
"value": "Benjamin"
},
{
"name": "LastName",
"value": "Verret"
}
]
},
{
"fields":[
{
"name": "ID",
"value": "CU01499303"
},
{
"name": "Gender",
"value": "Miss"
},
{
"name": "FirstName",
"value": "Dianne"
},
{
"name": "LastName",
"value": "Straka"
}
]
}
]
}
{
"recordid": 12345,
"table": "detail",
"records": [
{
"fields": [
{
"name": "ItemNumber",
"value": "PSM002"
},
{
"name": "ItemDesc",
"value": "PSM Production (unlimited)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "2"
},
{
"name": "ItemTotal",
"value": "990.00"
}
]
},
{
"fields": [
{
"name": "ItemNumber",
"value": "PSM005"
},
{
"name": "ItemDesc",
"value": "Upgrade (Starter to Web)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "1"
},
{
"name": "ItemTotal",
"value": "495.00"
}
]
}
]
}
JSON New Record Lists
Describes multiple lists of new data records (and their data field values (as name/value pairs)) to be added as data record entities to either existing data set or data record entities of a specific ID.
The structure consists of an array of JSON New Record List structure objects .
Example:[
{
"datasetid": 12345,
"records": [
{
"fields": [
{
"name": "ID",
"value": "CU00048376"
},
{
"name": "Gender",
"value": "M."
},
{
"name": "FirstName",
"value": "Benjamin"
},
{
"name": "LastName",
"value": "Verret"
}
]
},
{
"fields": [
{
"name": "ID",
"value": "CU01499303"
},
{
"name": "Gender",
"value": "Miss"
},
{
"name": "FirstName",
"value": "Dianne"
},
{
"name": "LastName",
"value": "Straka"
}
]
}
]
},
{
"recordid": 12345,
"table": "detail",
"records": [
{
"fields": [
{
"name": "ItemNumber",
"value": "PSM002"
},
{
"name": "ItemDesc",
"value": "PSM Production (unlimited)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "2"
},
{
"name": "ItemTotal",
"value": "990.00"
}
]
},
{
"fields": [
{
"name": "ItemNumber",
"value": "PSM005"
},
{
"name": "ItemDesc",
"value": "Upgrade (Starter to Web)"
},
{
"name": "ItemUnitPrice",
"value": "495.00"
},
{
"name": "ItemOrdered",
"value": "1"
},
{
"name": "ItemTotal",
"value": "495.00"
}
]
}
]
}
]
JSON Content Item Identifier List
Describes a list of content item/data record entity identifier pairs (as name/value pairs) for a specific content set entity.
The structure consists of an object with the following name/value pairs:
Example:{
"identifiers": [
{
"item": 12345,
"record": 54321
},
{
"item": 23456,
"record": 65432
},
{
"item": 34567,
"record": 76543
}
]
}
JSON Data Record Identifier
Describes a single data record entity identifier for a specific content item entity.
The structure consists of an object with a single name/value pair:
Example:{
"record": 12345
}
JSON Identifier List (with Email Parameters)
Describes a list of identifiers for multiple data entities (specifically data record entities), along with additional parameters used specifically in an content creation operation for email.
The structure consists of an object with the following name/value pairs:
-
identifiers - an array of data record entity identifiers (type of number )
-
host - the network address or name of the SMTP mail server through which emails will be sent (type of string )
-
user - the user name to authenticate with (if using authentication) (type of string )
-
password - the password to authenticate with (if using authentication) (type of string )
-
sender - the email address to be shown as the sender in the email output (type of string )
-
useAuth - parameter to specify if authentication is to be used with the mail server (type of boolean )
-
useStartTLS - parameter to specify if Transport Layer Security (TLS) is to be used when sending emails (type of boolean )
-
useSender - parameter to specify if the sender address will be used as the receiver address for all emails in the output (type of boolean )
-
attachWebPage - parameter to specify if a single HTML web page (with embedded resources) of the Web context should also be created and attached to the email output (type of boolean )
-
attachPdfPage - parameter to specify if a PDF of the Print context should also be created and attached to the email output (type of boolean )
Example:{
"identifiers": [
12345,
23456
],
"host": "mail.company.com",
"user": "johns",
"password": "password5",
"sender": "john.smith@company.com",
"useAuth": true,
"useStartTLS": false,
"useSender": true,
"attachWebPage": true,
"attachPdfPage": true
}
JSON HTML Parameters List
Describes a list of parameters used specifically in the creation of web content.
The structure consists of an object with the following name/value pairs:
-
section - the section within the Web context of the template to use (type of string )
-
inline - the inline mode to be used in the creation of content (value of either NONE , CSS or ALL ) (type of string )
Example:{
"section": "Section 1",
"inline": "ALL"
}
JSON Job Set Structure
Describes a job set entity structure including the arrangement of job, job segment, document set, document and content item entities (including the specification of content item identifiers). Used specifically in a job creation operation.
The structure consists of an object with the following name/value pairs:
Example:{
"jobs": [
{
"segments": [
{
"documentsets": [
{
"documents": [
{
"documentpages": [
{
"contentitem": 111
},
{
"contentitem": 222
}
]
},
{
"documentpages": [
{
"contentitem": 456
}
]
}
]
}
]
}
]
},
{
"segments": [
{
"documentsets": [
{
"documents": [
{
"documentpages": [
{
"contentitem": 789
}
]
}
]
}
]
}
]
}
]
}
JSON All-In-One Configuration
Describes the configuration of an All-In-One operation as a series of name/value pairs representing the processes (data mapping, content creation, job creation and output creation) to be completed as part of the overall operation. The value in each pair contains the parameters for that specific process.
The structure is variable, allowing for configurations containing one or more specific processes (as name/value pairs), as long as the processes specified result in a logical sequence or workflow. Used specifically with the All-In-One service.
The structure consists of an object with the following name/value pairs:
-
datamining - data mapping configuration parameters, consisting of an object with the following name/value pairs:
-
identifier - the managed file identifier (type of number ) or named identifier (type of string ) of the data file
-
config - the managed file identifier (type of number ) or named identifier (type of string ) of the data mapping configuration
-
contentcreation - content creation configuration parameters, consisting of an object with the following name/value pairs:
-
identifiers - an array of data record entity identifiers (type of number ) (optional for configurations containing data mapping parameters)
-
config - the managed file identifier (type of number ) or named identifier (type of string ) of the input design template
-
jobcreation - job creation configuration parameters, consisting of an object with the following name/value pairs:
-
outputcreation - output creation configuration parameters, consisting of an object with the following name/value pairs:
-
identifiers - an array of job entity identifiers (type of number ) (optional for configurations containing content creation parameters)
-
config - the managed file identifier (type of number ) or named identifier (type of string ) of the output creation preset
-
createOnly - flag to specify if output is to be only created in the server and not sent to it's final destination (type of boolean )
Specific to the use of all processes (and their parameters), an additional name/value pair can be added to restrict the print output to a set of specific records in the input data:
Examples:{
"datamining":
{
"identifier": "Promo-EN-1000.csv",
"config": "Promo-EN.OL-datamapper"
},
"contentcreation":
{
"config": "letter-ol.OL-template"
},
"jobcreation":
{
"config": "4567"
},
"outputcreation":
{
"config": "5678",
"createOnly": true
},
"printRange":
{
"printRange": "1-3, 6, 10"
}
}
{
"contentcreation":
{
"identifiers": [
34567,
34568
],
"config": "letter-ol.OL-template"
},
"jobcreation": {},
"outputcreation":
{
"config": 5678,
"createOnly": false
}
}
{
"datamining":
{
"identifier": 12345,
"config": 23456
}
}
JSON Page Details Summary
Describes a summary of the page details for a specific content set entity.
Page details include the number of pages per media type, along with media specific properties including the name, size, width and height. Used specifically with the Content Set Entity service.
The structure consists of an object with the following name/value pairs:
Example:{
"pages": [
{
"count": 200,
"media": {
"name": "Plain A4 Paper",
"size": "A4",
"width": "210mm",
"height": "297mm"
}
},
{
"count": 108,
"media": {
"name": "Plain Letter Paper",
"size": "Letter",
"width": "8.5in",
"height": "11in"
}
}
]
}
JSON Page Details List
Describes a list of the the page details and identifiers for each content item contained within a specific content set entity.
Page details include the number of pages per media type, along with media specific properties including the name, size, width and height. Used specifically with the Content Set Entity service.
The structure consists of an array of objects each with the following name/value pairs:
-
id - the content item entity identifier (type of number )
-
pages - a list of the pages per media, consisting of an array of objects each with the following name/value pairs:
-
count - the number of pages using the specific media (type of number )
-
media - media specific properties, consisting of an object with the following name/value pairs:
-
name - the name of the media (type of string )
-
size - the size of the media (type of string )
-
width - the width of the media (type of string )
-
height - the height of the media (type of string )
Example:[
{
"id": 12345,
"pages": [
{
"count": 2,
"media": {
"name": "Plain A4 Paper",
"size": "A4",
"width": "210mm",
"height": "297mm"
}
},
{
"count": 1,
"media": {
"name": "Plain Letter Paper",
"size": "Letter",
"width": "8.5in",
"height": "11in"
}
}
]
},
{
"id": 23456,
"pages": [
{
"count": 2,
"media": {
"name": "Plain A4 Paper",
"size": "A4",
"width": "210mm",
"height": "297mm"
}
},
{
"count": 2,
"media": {
"name": "Plain Letter Paper",
"size": "Letter",
"width": "8.5in",
"height": "11in"
}
}
]
}
]
JSON Data Mapping Validation Result
Describes the result of a request to validate a data mapping operation, including a list of any errors that occurred (used specifically with the Data Mapping service).
The structure consists of an object with the following name/value pairs:
-
result - the overall result of the data mapping operation (value of either ERROR or OK ) (type of string )
-
recordcount - the number of data records in the data file (type of number )
-
errors - a list of errors that occurred during the mapping process, consisting of an array of objects each with the following name/value pairs:
Example:{
"result": "ERROR",
"recordcount": 105,
"errors": [
{
"record": 20,
"reason": "Document: 20 Unparseable date: \"\""
},
{
"record": 45,
"reason": "Document: 45 Unparseable date: \"\""
},
{
"record": 97,
"reason": "Document: 97 Unparseable date: \"\""
}
]
}
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.
The structure consists of an object with the following name/value pairs:
-
entity - the data entity type (value of either DATARECORDS , DATASETS , CONTENTITEMS , CONTENTSETS , JOBS or JOBSETS ) (type of string )
-
search - search criteria, consisting of an object with the following name/value pairs:
-
operator - the search rule operator for the base list of rules (value of either AND or OR ) (type of string )
-
rules - a base list of search rules, consisting of an array of objects each with a specific rule sub-structure depending on the type of rule
-
sort - a list of sorting rules, consisting of an array of objects each with the following name/value pairs:
-
name - the name of the data value field or data entity property to sort by (type of string )
-
order - the order that matches to this rule are sorted by (value of either ASC or DESC ) (type of string )
-
type - the type of sorting rule (value of either value or property ) (type of string )
Sorting rule objects with a type value of value also contain the following additional name/value pair:
-
group - a list of grouping rules, consisting of an array of objects each with the following name/value pairs:
-
name - the name of the data value field or data entity property to group by (type of string )
-
order - the order that matches to this rule are grouped by (value of either ASC or DESC ) (type of string )
-
type - the type of grouping rule (value of either value or property ) (type of string )
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.
Search rule objects with a type value of value contain the following name/value pairs:
-
type - the type of search rule (value of value ) (type of string )
-
name - the name of the data field (type of string )
-
value - the value of the data field (type of string , or array of strings when condition is value of either IN or NOT IN )
-
condition - the comparison condition (value of either EQUAL , NOTEQUAL , LESS , GREAT , LESSEQUAL , GREATEQUAL , STARTSWITH , ENDSWITH , CONTAINS , LIKE , NLIKE , IN or NOT IN ) (type of string )
Search rule objects with a type value of property contain the following name/value pairs:
-
type - the type of search rule (value of property ) (type of string )
-
name - the name of the data entity property (type of string )
-
value - the value of the data entity property (type of string , or array of strings when condition is value of eitherIN or NOT IN )
-
condition - the comparison condition (value of either EQUAL , NOTEQUAL , LESS , GREAT , LESSEQUAL , GREATEQUAL , STARTSWITH , ENDSWITH , CONTAINS , LIKE , NLIKE , IN or NOT IN ) (type of string )
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:
-
type - the type of search rule (value of finishing ) (type of string )
-
medianame - the name of the media used (type of string )
-
condition - the comparison condition (value of either EQUAL or NOTEQUAL ) (type of string )
-
type - the type of search rule (value of finishing ) (type of string )
-
frontcoating - the front coating of the media used (value of either UNSPECIFIED , NONE , COATED , GLOSSY , HIGH_GLOSS , INKJET , MATTE , SATIN or SEMI_GLOSS ) (type of string )
-
backcoating - the back coating of the media used (value of either UNSPECIFIED , NONE , COATED , GLOSSY , HIGH_GLOSS , INKJET , MATTE , SATIN or SEMI_GLOSS ) (type of string )
-
condition - the comparison condition (value of either EQUAL or NOTEQUAL ) (type of string )
-
type - the type of search rule (value of finishing ) (type of string )
-
bindingstyle - the binding style of the media used (value of either NONE , DEFAULT , STAPLED , GLUED , STITCHED , ADHESIVE , SPINETAPING , RING , WIREDCOMB , PLASTICCOMB or COIL ) (type of string )
-
bindingedge - the binding edge of the media used (value of either DEFAULT , LEFT , RIGHT , TOP or BOTTOM ) (type of string )
-
bindingtype - the binding type of the media used (value of either DEFAULT , SADDLE , SIDE or CORNER ) (type of string )
-
bindingangle - the binding angle of the media used (value of either DEFAULT , VERTICAL , HORIZONTAL or ANGLE ) (type of string )
-
condition - the comparison condition (value of either EQUAL or NOTEQUAL ) (type of string )
Search rule objects with a type value of doclength contain the following name/value pairs:
-
type - the type of search rule (value of doclength ) (type of string )
-
value - the number of pages in document (type of number )
-
condition - the comparison condition (value of either EQUAL , NOTEQUAL , LESS , GREAT , LESSEQUAL or GREATEQUAL ) (type of string )
Search rule objects with a type value of templatename contain the following name/value pairs:
-
type - the type of search rule (value of templatename ) (type of string )
-
template - the name of the design template used for document (type of string )
-
condition - the comparison condition (value of either EQUAL or NOTEQUAL ) (type of string )
Search rule group objects contain the following name/value pairs:
-
operator - the search rule operator for sub-list of rules in rule group (value of either AND or OR ) (type of string )
-
rules - a sub-list of search rules, consisting of an array of objects each with a certain rule sub-structure depending on the type of rule
Examples:{
"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"
}
]
}
JSON Identifier Lists (with Sort Key)
Describes a set of search results as a list of one or more sub lists, each containing a list of data entity identifiers along with a sorting key value for each entry.
Used specifically with the Entity service as the output from the Find Data Entity resource method, this structure groups the data entity identifiers returned into sortable sub lists of entries.
The order of the entries (including the sort key produced), and the number of sub lists returned depends on the sorting and grouping rules specified in the JSON Search Parameters structure previously submitted as input to the Find Data Entity resource method.
The structure consists of an array of object arrays , with each object containing the following name/value pairs:
Example:[
[
{
"identifier": 1604,
"sortkey": "NB|Vilma"
},
{
"identifier": 1282,
"sortkey": "NF|Lenard"
},
{
"identifier": 1443,
"sortkey": "NF|Lenard"
},
{
"identifier": 1000,
"sortkey": "SK|Cathleen"
},
{
"identifier": 1121,
"sortkey": "SK|Rachel"
}
]
]
JSON Operations List
Describes a list of workflow operations (specifically asynchronous workflow operations) actively running on the server, each containing various properties including the type of workflow operation, it's starting time and it's current progress value.
This structure is used specifically with workflow based services including the Data Mapping, Content Creation, Content Creation (Email), Job Creation, Output Creation and All-In-One services.
The structure consists of an array of objects each with the following name/value pairs:
-
id - the workflow operation identifier (type of string )
-
type - the workflow operation type (value of either DataMiningRestService , ContentCreationRestService , EmailExportRestService , JobCreationRestService , OutputCreationRestService or PrintRestService ) (type of string )
-
subTask - the workflow operation sub-task name (type of string )
-
startTime - the workflow operation starting time stamp (value of milliseconds since midnight of January 1, 1970 UTC) (type of number )
-
progress - the workflow operation progress percentage (value in range of 0 to 100 ) (type of number )
Workflow operation objects with a type value of either ContentCreationRestService or PrintRestService (usually with a subTask value of Content Creation ) can also contain the following name/value pair:
Example:[
{
"id": "1281ef9d-7a74-4448-9adf-175a0166f32e",
"type": "DataMiningRestService",
"subTask": "Extracting data 25%",
"startTime": 1482367446908,
"progress": 100
},
{
"id": "b72e2da5-39ea-48de-85cf-a2be321a71bd",
"type": "ContentCreationRestService",
"subTask": "Content Creation",
"startTime": 1482367988332,
"progress": 12,
"template": "business-card-ol"
},
{
"id": "134f55a5-85f5-41d5-a0d3-e033eda45cb5",
"type": "EmailExportRestService",
"startTime": 1482368638197,
"progress": 5
},
{
"id": "d52cf2b6-9ca7-44e6-b548-5b249dedf40d",
"type": "JobCreationRestService",
"subTask": "Job Creation",
"startTime": 1482367723483,
"progress": 77
},
{
"id": "02fa495b-ed56-47ef-ac49-e63df298b10e",
"type": "OutputCreationRestService",
"subTask": "Output Creation",
"startTime": 1482367851340,
"progress": 34
},
{
"id": "fb414be9-4ec5-463a-8429-93153db73783",
"type": "PrintRestService",
"subTask": "Content Creation",
"startTime": 1482366891203,
"progress": 65,
"template": "letter-ol"
}
]
|
|