Objectif Lune PlanetPress Connect - 2019.1 Instruction Manual

REST API Cookbook with Working Examples
Version:2019.1
REST API Cookbook with Working Examples Version 2019.1 Last Revision:2019-05-21
Objectif Lune, Inc. 2030 Pie-IX, Suite 500 Montréal, QC, Canada, H1V 2C8
+1 (514) 875-5863
www.objectiflune.com
All trademarks displayed are the property of their respective owners.
© Objectif Lune, Inc. 1994-2019. All rights reserved. No part of this documentation may be reproduced, transmitted or distributed outside of Objectif Lune Inc. by any means whatsoever without the express written permission of Objectif Lune Inc. Objectif Lune Inc. disclaims responsibility for any errors and omissions in this documentation and accepts no responsibility for damages arising from such inconsistencies or their further consequences of any kind. Objectif Lune Inc. reserves the right to alter the information contained in this documentation without notice.
Page 4

Table of Contents

Table of Contents 5
Welcome to the PlanetPress Connect REST API Cookbook 12
Technical Overview 13
Workflow & Workflow Processes 14
Data Mapping 15 Content Creation 16 Job Creation 17 Output Creation 18
All-In-One 19 Input Files 21 Data Entities 22
Data Set & Data Record Entities 22
Content Set & Content Item Entities 23
Job Set & Job Entities 24 Workflow Operations 26
Asynchronous Operations 26
Synchronous Operations 27 JSON Structures 28
Common Structures 29
Specific Structures 35
Working Examples 102
Getting Started 103
Requirements & Installation 104
Structure of the Working Examples 106
HTML Input Placeholders & Multiple Value Fields 108
Display of Working Example Results 109
Using the Working Examples with Server Security 110 Server Security & Authentication 111
Authenticating with the Server 112 Working with the File Store 117
Uploading a Data File to the File Store 118
Uploading a Data Mapping Configuration to the File Store 123
Uploading a Design Template to the File Store 129
Page 5
Uploading a Job Creation Preset to the File Store 135
Uploading an Output Creation Preset to the File Store 141 Working with the Entity Services 147
Finding Specific Data Entities in the Server 148
Finding all the Data Sets in the Server 180
Finding the Data Records in a Data Set 183
Finding all the Content Sets in the Server 187
Finding the Content Items in a Content Set 190
Finding all the Job Sets in the Server 195
Finding the Jobs in a Job Set 198 Working with the Workflow Services 201
Running a Data Mapping Operation 202
Running a Data Mapping Operation (Using JSON) 209
Running a Data Mapping Operation for PDF/VT File (to Data Set) 216
Running a Data Mapping Operation for PDF/VT File (to Content Set) 222
Running a Content Creation Operation for Print 228
Running a Content Creation Operation for Print By Data Record (Using JSON) 234
Running a Content Creation Operation for Email By Data Record (Using JSON) 241
Creating Content for Web By Data Record 251
Creating Content for Web By Data Record (Using JSON) 257
Running a Job Creation Operation (Using JSON) 263
Running an Output Creation Operation 269
Running an Output Creation Operation (Using JSON) 276
Running an Output Creation Operation By Job (Using JSON) 284
Running an All-In-One Operation (Using JSON) 292
REST API Reference 308
Authentication Service 318
Service Handshake 319
Authenticate/Login to Server 320
Service Version 322 Content Creation Service 323
Service Handshake 325
Process Content Creation 326
Process Content Creation (By Data Record) (JSON) 328
Process Content Creation (By Data) (JSON) 330
Create Preview PDF 332
Create Preview PDF (By Data Record) 334
Page 6
Create Preview PDF (By Data) (JSON) 336
Get All Operations 338
Get Progress of Operation 339
Get Result of Operation 341
Cancel an Operation 343
Service Version 344 Content Item Entity Service 345
Service Handshake 346
Get Data Record for Content Item 347
Get Content Item Properties 349
Update Content Item Properties 351
Update Multiple Content Item Properties 353
Service Version 355 Content Set Entity Service 356
Get All Content Sets 357
Get Content Items for Content Set 358
Get Page Details for Content Set 360
Delete Content Set Entity 362
Get Content Set Properties 364
Update Content Set Properties 366
Service Version 368 Data Record Entity Service 369
Service Handshake 370
Add Data Records 371
Get Data Record Values 373
Update Data Record Values 375
Get Data Record Properties 377
Update Data Record Properties 379
Get Multiple Data Record Values 381
Get Multiple Data Record Values (JSON) 383
Update Multiple Data Record Values 385
Update Multiple Data Record Properties 387
Service Version 389 Data Set Entity Service 390
Get All Data Sets 391
Get Data Records for Data Set 392
Delete Data Set Entity 393
Page 7
Get Data Set Properties 395
Update Data Set Properties 397
Service Version 399 Data Mapping Service 400
Service Handshake 401
Process Data Mapping 402
Process Data Mapping (JSON) 404
Process Data Mapping (PDF/VT to Data Set) 407
Process Data Mapping (PDF/VT to Content Set) 409
Get All Operations 411
Get Progress of Operation 412
Get Result of Operation 414
Cancel an Operation 416
Service Version 417 Document Entity Service 418
Service Handshake 419
Get Document Metadata Properties 420
Update Document Metadata Properties 422
Service Version 424 Document Set Entity Service 425
Service Handshake 426
Get Documents for Document Set 427
Get Document Set Metadata Properties 429
Update Document Set Metadata Properties 431
Service Version 433 Content Creation (Email) Service 434
Service Handshake 435
Process Content Creation (By Data Record) (JSON) 436
Process Content Creation (By Data) (JSON) 438
Get All Operations 440
Get Progress of Operation 441
Get Result of Operation 443
Cancel an Operation 445
Service Version 447 Entity Service 448
Service Handshake 449
Find Data Entity 450
Page 8
Service Version 452 File Store Service 453
Service Handshake 454
Download Managed File or Directory 455
Delete Managed File or Directory 457
Upload Data Mapping Configuration 459
Upload Job Creation Preset 461
Upload Data File 463
Upload Design Template 465
Upload Output Creation Preset 467
Service Version 469 Content Creation (HTML) Service 470
Service Handshake 471
Process Content Creation (By Data Record) 472
Process Content Creation (By Data Record) (JSON) 474
Process Content Creation (By Data) (JSON) 476
Process Content Creation (No Data) 478
Get Template Resource 480
Service Version 482 Job Creation Service 483
Service Handshake 484
Process Job Creation 485
Process Job Creation (JSON) 487
Process Job Creation (JSON Job Set Structure) 489
Get All Operations 491
Get Progress of Operation 492
Get Result of Operation 494
Cancel an Operation 496
Service Version 497 Job Entity Service 498
Service Handshake 499
Get Content Items for Job 500
Get Job Segments for Job 502
Get Job Metadata Properties 503
Update Job Metadata Properties 505
Get Job Properties 507
Update Job Properties 509
Page 9
Update Multiple Job Properties 511
Service Version 512 Job Segment Entity Service 513
Service Handshake 514
Get Document Sets for Job Segment 515
Get Job Segment Metadata Properties 517
Update Job Segment Metadata Properties 519
Service Version 521 Job Set Entity Service 522
Get All Job Sets 523
Get Jobs for Job Set 524
Delete Job Set Entity 525
Get Job Set Metadata Properties 527
Update Job Set Metadata Properties 529
Get Job Set Properties 531
Update Job Set Properties 533
Service Version 535 Output Creation Service 536
Service Handshake 537
Process Output Creation 538
Process Output Creation (JSON) 540
Process Output Creation (By Job) (JSON) 542
Run +PReS Enhance Workflow Configuration 544
Get All Operations 546
Get Progress of Operation 547
Get Result of Operation 549
Get Result of Operation (as Text) 551
Cancel an Operation 553
Service Version 554 All-In-One Service 555
Service Handshake 556
Process All-In-One (JSON) 557
Process All-In-One (Adhoc Data) 559
Get All Operations 563
Get Progress of Operation 564
Get Result of Operation 566
Get Result of Operation (as Text) 568
Page 10
Cancel an Operation 570
Service Version 571
Copyright Information 572
Legal Notices and Acknowledgements 573
Page 11

Welcome to the PlanetPress Connect REST API Cookbook

This guide is aimed at technically experienced users who wish to learn and use the REST API available in PlanetPress Connect version 2019.1.
The PlanetPress Connect REST API consists of many services that expose access to a number of areas including workflow, data entity management and file store operations.
These services can be used to perform various interactions with the PlanetPress Connect server such as:
l Upload and manage data files, data mapping configurations and design templates in the
file store
l Create, manage and find data entities internal to the PlanetPress Connect server
l Create and monitor processing operations within the workflow
The REST API also supports added security to restrict unauthorized access to the services.
This guide is broken down into three sections:
l Technical Overview – Overview of the concepts and structures used in PlanetPress
Connect and the REST API
l Working Examples – Working examples of the PlanetPress Connect REST API in action
(HTML5 & JavaScript/jQuery)
l REST API Reference – A complete reference to the PlanetPress Connect REST API and
services
It is recommended that the technical overview section be read first, followed by the working examples, using the REST API reference for greater detail on implementing any specific example.
Page 12

Technical Overview

This section provides an overview of the concepts and structures used within PlanetPress Connect and the REST API.
l Workflow & Workflow Processes
l Input Files
l Data Entities
l Workflow Operations
l JSON Structures
Page 13

Workflow & Workflow Processes

The primary workflow in PlanetPress Connect consists of four major processes that each require a number of inputs, and once executed, produce a particular form of output. These processes are: data mapping, content creation, job creation and output creation.
There is an additional workflow process, named All-In-One, which embodies all four major workflow processes in a singular process.
The following diagram illustrates the primary workflow in PlanetPress Connect:
Typically an individual workflow process (shown above in blue) will take one or more input files as input (shown above in green), and will produce either intermediary output in the form of a data entity (shown above in red), or final output in the form of print, web, or email based content (depending on the context of the content produced) (shown above in yellow).
Input files to a workflow process include files such as data files, data mapping configurations
and design templates. In most cases an input file needs to be uploaded to the server file store before it can be used in a workflow process. A file that has been uploaded to the file store is known as a managed file, and managed files can be referenced via a unique identifier or name.
A data entity is simply a structured data artefact, produced as a result of an instance of a workflow process known as a workflow operation. Data entities are stored internally to the server and can also be referenced via a unique identifier.
Where a certain process depends on the output of the process before it, the data entity or entities produced by the earlier process are used as an input to that process.
Page 14

Data Mapping

The data mapping process involves taking a data file or source, applying a data mapping configuration to it, and producing a structured set of data or data records (a data set). This process can also produce a data set or content set from a PDF/VTfile using its internal meta data instead of a data mapping configuration.
The following diagram illustrates the default workflow for the data mapping process:
The following diagram illustrates the alternative workflow for the data mapping process when using PDF/VT data files specifically:
Page 15

Content Creation

The content creation process involves taking either a data set or one or more data records (from a data set), combining them with a suitable design template, and producing one or more sets of content (content sets). If the content is for the Email or Web context then output can be produced at this stage.
The following diagram illustrates the workflow for the content creation process:
Page 16

Job Creation

The job creation process involves taking one or more content sets and applying a job creation preset for organizing, sorting and grouping them into a set of logical jobs (a job set). This includes the application of data filtering and finishing options.
The following diagram illustrates the workflow for the job creation process:
Page 17

Output Creation

The output creation process involves taking either a job set or one or more jobs (from a job set), applying an output creation preset, and producing the print output (Print context).
The following diagram illustrates the workflow for the output creation process:
Page 18

All-In-One

The All-In-One process embodies all four major workflow processes (data mapping, content
creation, job creation and output creation) in a singular process. It can be configured to run one
or more of the four processes, as long as the processes specified result in a logical sequence or workflow.
Depending on it's configuration, the All-In-One process can produce either a data set, content sets, a job set or print output (Print context).
The following diagram illustrates the potential inputs, outputs and workflows for the All-In-One process:
The following table lists the available processes, input combinations and expected outputs for the All-In-One process:
Page 19
Processes Input Combination Expected
Output
Data Mapping Only Data File + Data Mapping Configuration Data Set
Data Mapping + Content Creation
Content Creation Only Data Records + Design Template Content Set(s)
Data Mapping + Content Creation + Job Creation
Content Creation + Job Creation
Content Creation + Job Creation + Output Creation
Output Creation Only Jobs + Output Creation Preset Print Output
Data File + Data Mapping Configuration + Design Template
Data File + Data Mapping Configuration + Design Template
Data Records + Design Template Job Set
Data Records + Design Template + Output Creation Preset
Content Set(s)
Job Set
Print Output
Data Mapping + Content Creation + Job Creation + Output Creation
Data Mapping + Content Creation + Job Creation + Output Creation
Data File + Data Mapping Configuration + Design Template + Output Creation Preset
Data File + Data Mapping Configuration + Design Template + Job Creation Preset + Output Creation Preset
Print Output
Print Output
Page 20

Input Files

Input files are used as input to a specific workflow process. The following table lists the types of input files used in the PlanetPress Connect workflow:
Name Relevant Workflow
File Name Examples
Process
Data File Data Mapping l Promo-EN-10.csv
l Promo-EN-10000.csv
l PDFVT-Data.pdf
Data Mapping Configuration
Data Mapping l Promo-EN.OL-datamapper
l Transact-EN.OL-
datamapper
Design Template Content Creation l letter-ol.OL-template
l invoice-ol-transpromo.OL-
template
Job Creation Preset Job Creation l Promo-EN-JC-Config.OL-
jobpreset
Output Creation Preset Output Creation l FX4112_Hold_Config.OL-
outputpreset
l Promo-EN-OC-Config.OL-
outputpreset
Page 21

Data Entities

There are many data entity types used by PlanetPress Connect, but not all data entities can be accessed through the REST API. The main data entities to be aware of when working with the API are:
l Data Sets
l Data Records
l Content Sets
l Content Items
l Job Sets
l Jobs

Data Set & Data Record Entities

The data set is the artefact produced by a data mapping operation. It holds the data that was mapped out of the input data file. A data mapping operation produces a single data set, which contains as many data records as there are documents.
Each data record contains a collection of data values. The data records in the data set form the master record, or document record, which typically contains document recipient information. The master record can also contain a collection of data tables, which form the detail records that hold data such as invoice line items.
Each data table contains a collection of data records, where each data record contains a collection of data values and a collection of data tables, and so on.
Page 22
The following diagram illustrates the basic relationship between these entities in the context of the data mapping process:
The data set and data record entities (shown above in blue) are accessible via the Data Set
Entity and Data Record Entity services.

Content Set & Content Item Entities

The content set is the artefact produced by a content creation operation. It holds all the pages that were produced by the operation. A content creation operation produces one or more content sets, which contain as many content items as there were data records given at the start of the operation.
Because the data records used may have different data set owners, a content set cannot be linked to a single data set, but rather content items are linked to data records. A content item is further divided into content sections and content pages.
The following diagram illustrates the basic relationship between these entities in the context of the content creation process:
Page 23
The content set and content item entities (shown above in blue) are accessible via the Content
Set Entity and Content Item Entity services.

Job Set & Job Entities

The job set is the artefact produced by a job creation operation. It consists of a hierarchical structure that divides documents into various structures and it basically decides which documents are to be printed and in what order.
A job creation operation creates a single job set which contains a series of containers where every level contains one or more of the next level down: jobs, job segments, document sets, documents and document pages. The last level in the chain, the document pages, contains a single content item. Hence, at the job creation level, a document may consist of one or more content items.
The following diagram illustrates the basic relationship between these entities in the context of the job creation process:
The job set and job entities (shown above in blue) are accessible via the Job Set Entity and
Job Entity services. The job segment, document set and document entities (also shown above
in blue) are accessible via the Job Segment Entity, Document Set Entity and Document Entity services.
In summary, the following diagram illustrates the basic relationship between all data entities in
Page 24
the overall context of the primary workflow in PlanetPress Connect:
Page 25

Workflow Operations

Each individual process in the overall workflow can potentially be a long running operation.
Accordingly, there are two types of workflow operations possible in the PlanetPress Connect REST API:
l Asynchronous – the operation is initiated, monitored, and the result returned using
multiple requests (Default)
l Synchronous – the operation is initiated and the result returned using a single request

Asynchronous Operations

Asynchronous workflow operations require the submission of an initial HTTP request to initiate the operation. Then additional requests are required to monitor progress and retrieve the final result. All the required detail is included in the HTTP response headers of the initial request, including the URIs that should be used for further processing.
A successful request will return a response that will include the headers listed in the following table:
Header Description
operationId The unique id of the operation being processed
Link Contains multiple link headers which provide details on which URI to use to
retrieve further information on the operation:
l Header with rel="progress" – The URL to use to check the progress of
the operation
l Header with rel="result" – The URL to use to retrieve the result of the
operation
l Header with rel="cancel" – The URL to use to cancel the operation
A request made to the progress URI during processing will return a progress percentage value of 0 to 100, and finally the value of ‘done’ once the operation has completed.
Page 26
A request made to the cancel URI during processing will immediately cancel the operation.
A request made to the result URI after processing has completed will return the final result of the operation.
This is the default workflow operation type, and this approach is used across most workflow based services as demonstrated in the Working with the Workflow Services page of the
Working Examples section.

Synchronous Operations

Synchronous workflow operations initiate the operation and retrieve the final result in a single request.
There are no additional operation related headers returned, and there is no option to either monitor progress or cancel a running operation.
This approach is only used by specific methods found in the All-In-One workflow service.
Page 27

JSON Structures

The PlanetPress 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:
l Common Structures – JSON structures that are commonly used throughout the REST API
l Specific Structures – JSON structures that are used by a specific resource method or
service in the REST API
Page 28

Common Structures

Common JSON structures used in the PlanetPress Connect REST API include the following:
l JSON Identifier
l JSON Identifier List
l JSON Name/Value List (Properties Only)
l JSON Name/Value List
l JSON Name/Value Lists
Page 29
JSON Identifier
Describes an identifier for a single data entity in PlanetPress Connect.
Structure
The structure consists of an object with a single name/value pair:
l identifier – the data entity identifier (type of number)
Example
The following is an example of this structure:
{
"identifier": 12345
}
Page 30
JSON Identifier List
Describes a list of identifiers for multiple data entities in PlanetPress Connect.
Structure
The structure consists of an object with a single name/value pair:
l identifiers – an array of data entity identifiers (type of number)
Example
The following is an example of this structure:
{
"identifiers": [ 12345, 23456, 34567 ]
}
Page 31
JSON Name/Value List (Properties Only)
Describes a list of properties (each as a name/value pair).
Structure
The structure consists of an array of objects each with the following name/value pairs:
l name – the name of the property (type of string)
l value – the value of the property (type of string)
Example
The following is an example of this structure:
[
{
"name": "start",
"value": "2015-01-01 00:00:00T-0500" }, {
"name": "end",
"value": "2015-12-31 23:59:59T-0500" }
]
Page 32
JSON Name/Value List
Describes a list of properties (each as a name/value pair) for a data entity of a specific ID.
Structure
The structure consists of an object with the following name/value pairs:
l id – the data entity identifier (type of number)
l properties – the data entity properties, consisting of an array of objects each with the
following name/value pairs:
l name – the name of the property (type of string)
l value – the value of the property (type of string)
Example
The following is an example of this structure:
{
"id": 12345, "properties": [
{
"name": "start",
"value": "2015-01-01 00:00:00T-0500" }, {
"name": "end",
"value": "2015-12-31 23:59:59T-0500" }
]
}
Page 33
JSON Name/Value Lists
Describes multiple lists of properties (as name/value pairs) for data entities of a specific ID.
Structure
The structure consists of an array of JSON Name/Value List structure objects.
Example
The following is an example of this structure:
[
{
"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" }
]
}
]
Page 34

Specific Structures

Specific JSON structures used in the PlanetPress Connect REST API include the following:
l JSON Identifier (Managed File)
l JSON Identifier (with Output Parameters)
l JSON Identifier List (with Output Parameters)
l JSON Record Content List
l JSON Record Content Lists
l JSON Record Content List (Explicit Types)
l JSON Record Content Lists (Explicit Types)
l JSON Record Content List (Fields Only)
l JSON Record Content Lists (Fields Only)
l JSON New Record List
l JSON New Record Lists
l JSON Record Data List
l JSON Content Item Identifier List
l JSON Data Record Identifier
l JSON Data Record Identifier List (with Parameters)
l JSON Identifier List (with Email Parameters)
l JSON Record Data List (with Email Parameters)
l JSON HTML Parameters List
l JSON Job Set Structure
l JSON All-In-One Configuration
l JSON Page Details Summary
l JSON Page Details List
l JSON Data Mapping Validation Result
l JSON Search Parameters
l JSON Identifier Lists (with Sort Key)
l JSON Operations List
Page 35
JSON Identifier (Managed File)
Describes an identifier or named identifier for a single managed file in PlanetPress Connect.
Structure
The structure consists of an object with a single name/value pair:
l identifier – the managed file identifier (type of number) or named identifier (type of
string)
Example
The following are examples of this structure:
{
"identifier": 12345
}
{
"identifier": "Promo-EN-1000.csv"
}
Page 36
JSON Identifier (with Output Parameters)
Describes an identifier for a single job set entity, along with additional parameters used specifically in an output creation operation.
Structure
The structure consists of an object with the following name/value pairs:
l identifier – the job set entity identifier (type of number)
l createOnly – parameter to specify if output is to be only created in the server and not sent
to it's final destination (type of boolean)
Example
The following is an example of this structure:
{
"identifier": 12345, "createOnly": true
}
Page 37
JSON Identifier List (with Output Parameters)
Describes a list of identifiers for multiple job entities, along with additional parameters used specifically in an output creation operation.
Structure
The structure consists of an object with the following name/value pairs:
l identifiers – an array of job entity identifiers (type of number)
l createOnly – parameter to specify if output is to be only created in the server and not sent
to it's final destination (type of boolean)
Example
The following is an example of this structure:
{
"identifiers": [ 12345, 23456, 34567 ], "createOnly": true
}
Page 38
JSON Record Content List
Tip
A data record entity (in the root or master 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.
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.
Structure
The structure consists of an object with the following name/value pairs:
l id – the data record entity identifier (type of number)
l fields – a list of data fields in the data record entity, consisting of an array of objects
each with the following name/value pairs:
l name – the name of the data field (type of string)
l value – the value of the data field (type of string)
l records – a list of any nested data record entities, consisting of an array of objects each
with the following name/value pairs:
l id – the data record entity identifier (type of number)
l table – the data record entity data table name (type of string)
l parentrecordid – the data record entity identifier of parent entity (type of number)
l fields – a list of data fields in the data record entity, consisting of an array of
objects each with the following name/value pairs:
Page 39
l name – the name of the data field (type of string)
l value – the value of the data field (type of string)
Specific to data record entities that are children of a data set entity (data record entities in the root or master data table), two additional name/value pairs are included:
l table – the data record entity data table name (value of record) (type of string)
l datasetid – the data set entity identifier of parent entity (type of number)
If a data record entity contains boundary information (set from the data source during data mapping), then an additional name/value pair is also included:
l boundaries – the boundaries for the data record, consisting of an object with the
following name/value pairs:
l start – the starting boundary value for the data record (type of number)
l end – the ending boundary value for the data record (type of number)
Specific to nested data record entities that are children of a data record entity, two additional name/value pairs are included:
l table – the data record entity data table name (type of string)
l parentrecordid – the data record entity identifier of parent entity (type of number)
Example
The following are examples of this structure:
{
"id": 12345, "table": "record", "datasetid": 34567, "fields": [
{
"name": "ID", "value": "CU00048376"
}, {
"name": "Gender", "value": "M."
Page 40
}, {
"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",
Page 41
"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"
}, {
Page 42
"name": "InvTotal", "value": "1596.38"
} ], "records": [
{
"id": 45678, "table": "detail", "parentrecordid": 23456, "fields": [
] }, {
"id": 45679,
"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" }
{
"name": "ItemNumber",
"value": "PSM005" }, {
"name": "ItemDesc",
Page 43
"value": "Upgrade (Starter to Web)" }, {
"name": "ItemUnitPrice",
"value": "495.00" }, {
"name": "ItemOrdered",
"value": "1" } {
"name": "ItemTotal",
"value": "495.00" }
]
}
]
}
{
"id": 12345, "table": "record", "boundaries": {
"start": 0,
"end": 4 }, "datasetid": 34567, "fields": [
{
"name": "ID",
"value": "CU00048376" }, {
"name": "Gender",
"value": "M." }, {
"name": "FirstName",
"value": "Benjamin" }, {
"name": "LastName",
"value": "Verret"
Page 44
}
]
}
Page 45
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.
Structure
The structure consists of an array of JSON Record Content List structure objects.
Example
The following is an example of this structure:
[
{
"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,
Page 46
"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" }
]
}
]
Page 47
JSON Record Content List (Explicit Types)
Tip
A data record entity (in the root or master 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.
Describes a list of data fields (as name/value pairs), a data table schema, nested data records (if any), along with a number of additional properties for a data record entity of a specific ID.
Unlike a JSON Record Content List structure, this structure includes a data table schema (of data column/field data types) and uses specific JSON types to represent the value of data fields in the data record.
Structure
The structure consists of an object with the following name/value pairs:
l id – the data record entity identifier (type of number)
l schema – the data table schema for the data record entity, consisting of an object with the
following name/value pairs:
l columns – a list of the data columns/fields in the data table schema and their
corresponding data types, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data type of the data field (value of either
BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT, DATETIME or CURRENCY) (type of string)
l tables – a list of any nested data tables in the data record entity, consisting of an
Page 48
object with one or more name/value pairs:
l <name> – the name (name) of the data table and the data table schema for the
data record entities it contains, consisting of an object with the following name/value pair:
l columns – a list of the data columns/fields in the data table schema and
their corresponding data types, consisting of an object with one or more
name/value pairs:
l <name> – the name (name) and data type of the data field (value of
either BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT, DATETIME or
CURRENCY) (type of string)
l fields – a list of the data fields in the data record entity and their corresponding data
values, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data value of the data field (type of either string,
number, or boolean)
l tables – a list of any nested data tables in the data record entity, consisting of an object
with one or more name/value pairs:
l <name> – the name (name) of the data table and a list the data record entities it
contains, consisting of an array of objects each with the following name/value pairs:
l id – the data record entity identifier (type of number)
l fields – a list of the data fields in the data record entity and their
corresponding data values, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data value of the data field (type of either
string, number, or boolean)
Specific to data record entities that are children of a data set entity (data record entities in the root or master data table), an additional name/value pair is included:
l datasetid – the data set entity identifier of parent entity (type of number)
If a data record entity contains boundary information (set from the data source during data mapping), then an additional name/value pair is also included:
l boundaries – the boundaries for the data record, consisting of an object with the
following name/value pairs:
Page 49
l start – the starting boundary value for the data record (type of number)
l end – the ending boundary value for the data record (type of number)
Example
The following are examples of this structure:
{
"schema": {
"columns": {
"ID": "STRING", "Gender": "STRING", "FirstName": "STRING", "LastName": "STRING", "ExtraData": "STRING"
} }, "id": 12345, "datasetid": 34567, "fields": {
"ID": "CU00048376",
"Gender": "M.",
"FirstName": "Benjamin",
"LastName": "Verret",
"ExtraData": "" }
}
{
"schema": {
"columns": {
"ItemNumber": "STRING", "ItemDesc": "STRING", "ItemUnitPrice": "CURRENCY", "ItemOrdered": "INTEGER", "ItemTotal": "CURRENCY", "ExtraData": "STRING"
} }, "id": 45678, "fields": {
"ItemNumber": "PSM002",
Page 50
"ItemDesc": "PSM Production (unlimited)",
"ItemUnitPrice": "495.00",
"ItemOrdered": 2,
"ItemTotal": "990.00",
"ExtraData": "" }
}
{
"schema": {
"columns": {
"ID": "STRING", "Date": "DATETIME", "DueDate": "DATETIME", "InvNumber": "STRING", "Gender": "STRING", "FirstName": "STRING", "LastName": "STRING", "TotalOrdered": "INTEGER", "InvSubTotal": "CURRENCY", "InvTaxTotal": "CURRENCY", "InvTotal": "CURRENCY",
"ExtraData": "STRING" }, "tables": {
"detail": {
"columns": {
"ItemNumber": "STRING", "ItemDesc": "STRING", "ItemUnitPrice": "CURRENCY", "ItemOrdered": "INTEGER", "ItemTotal": "CURRENCY", "ExtraData": "STRING"
}
} }
},
"id": 23456, "datasetid": 12345, "fields": {
"ID": "CU00048376", "Date": 1332594000000, "DueDate": 1335189600000,
Page 51
"InvNumber": "INV9441991", "Gender": "M.", "FirstName": "Benjamin", "LastName": "Verret", "TotalOrdered": 3, "InvSubTotal": "1485.00", "InvTaxTotal": "111.38", "InvTotal": "1596.38", "ExtraData": ""
}, "tables": {
"detail": [
{
"id": 45678, "fields": {
"ItemNumber": "PSM002", "ItemDesc": "PSM Production (unlimited)", "ItemUnitPrice": "495.00", "ItemOrdered": 2, "ItemTotal": "990.00", "ExtraData": ""
} }, {
"id": 45679,
"fields": {
"ItemNumber": "PSM005", "ItemDesc": "Upgrade (Starter to Web)", "ItemUnitPrice": "495.00", "ItemOrdered": 1, "ItemTotal": "495.00", "ExtraData": ""
} }
]
}
}
{
"schema": {
"columns": {
"ID": "STRING", "Gender": "STRING",
Page 52
"FirstName": "STRING", "LastName": "STRING", "ExtraData": "STRING"
} }, "id": 12345, "datasetid": 34567, "boundaries": {
"start": 0,
"end": 4 }, "fields": {
"ID": "CU00048376",
"Gender": "M.",
"FirstName": "Benjamin",
"LastName": "Verret",
"ExtraData": "" }
}
Page 53
JSON Record Content Lists (Explicit Types)
Describes multiple lists of data field values (as name/value pairs), a data table schema, nested data records (if any), along with a number of additional properties for data record entities of a specific ID.
Structure
The structure consists of an array of JSON Record Content List (Explicit Types) structure
objects.
Example
The following is an example of this structure:
[
{
"schema": {
"columns": {
"ItemNumber": "STRING", "ItemDesc": "STRING", "ItemUnitPrice": "CURRENCY", "ItemOrdered": "INTEGER", "ItemTotal": "CURRENCY", "ExtraData": "STRING"
} }, "id": 45678, "fields": {
"ItemNumber": "PSM002",
"ItemDesc": "PSM Production (unlimited)",
"ItemUnitPrice": "495.00",
"ItemOrdered": 2,
"ItemTotal": "990.00",
"ExtraData": "" }
}, {
"schema": {
"columns": {
"ItemNumber": "STRING", "ItemDesc": "STRING",
Page 54
"ItemUnitPrice": "CURRENCY", "ItemOrdered": "INTEGER", "ItemTotal": "CURRENCY", "ExtraData": "STRING"
} }, "id": 45679, "fields": {
"ItemNumber": "PSM005",
"ItemDesc": "Upgrade (Starter to Web)",
"ItemUnitPrice": "495.00",
"ItemOrdered": 1,
"ItemTotal": "495.00",
"ExtraData": "" }
}
]
Page 55
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.
Structure
The structure consists of an object with the following name/value pairs:
l id – the data record entity identifier (type of number)
l fields – a list of data fields in the data record entity, consisting of an array of objects
each with the following name/value pairs:
l name – the name of the data field (type of string)
l value – the value of the data field (type of string)
Example
The following is an example of this structure:
{
"id": 12345, "fields": [
{
"name": "FirstName",
"value": "Benjamin" }, {
"name": "LastName",
"value": "Verret" }
]
}
Page 56
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.
Structure
The structure consists of an array of JSON Record Content List (Fields Only) structure objects.
Example
The following is an example of this structure:
[
{
"id": 12345, "fields": [
{
"name": "FirstName",
"value": "Benjamin" }, {
"name": "LastName",
"value": "Verret" }
] }, {
"id": 23456,
"fields": [
{
"name": "FirstName",
"value": "Dianne" }, {
"name": "LastName",
"value": "Straka" }
]
}
]
Page 57
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.
Structure
The structure consists of an object with the following name/value pairs:
l records – a list of the new data records to be added, consisting of an array of objects
each with the following name/value pairs:
l fields – a list of data fields for the data record, consisting of an array of objects
each with the following name/value pairs:
l name – the name of the data field (type of string)
l value – the value of the data field (type of string)
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:
l datasetid – the data set entity identifier of parent entity (type of number)
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:
l recordid – the data record entity identifier of parent entity (type of number)
l table – the data record entity data table name (type of string)
Example
The following are examples of this structure:
{
"datasetid": 12345, "records": [
{
"fields": [
{
"name": "ID", "value": "CU00048376"
},
Page 58
{
"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": [
Page 59
}, {
{
"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"
Page 60
}
]
}
]
}
Page 61
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.
Structure
The structure consists of an array of JSON New Record List structure objects.
Example
The following is an example of this structure:
[
{
"datasetid": 12345, "records": [
{
"fields": [
{
"name": "ID",
"value": "CU00048376" }, {
"name": "Gender",
"value": "M." }, {
"name": "FirstName",
"value": "Benjamin" }, {
"name": "LastName",
"value": "Verret" }
] }, {
"fields": [
{
"name": "ID",
Page 62
}, {
"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"
Page 63
}
] }, {
"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" }
]
}
]
}
]
Page 64
JSON Record Data List
Describes a list of data fields (as name/value pairs), a data table schema and nested data records (if any) for one or more data records.
This structure is used specifically by the Content Creation and Content Creation (HTML) services when creating content directly without the prerequisite of the data mapping process.
Structure
The structure consists of an object with the following name/value pair:
l data – the data for the data record or data records, consisting of either an object or an
array of one or more objects respectively with the following name/value pairs:
l schema – the data table schema for the data record, consisting of an object with the
following name/value pairs:
l columns – a list of the data columns/fields in the data table schema and their
corresponding data types, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data type of the data field (value of either
BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT, DATETIME or CURRENCY)
(type of string)
l tables – a list of any nested data tables in the data record, consisting of an
object with one or more name/value pairs:
l <name> – the name (name) of the data table and the data table schema
for the data records it contains, consisting of an object with the following name/value pair:
l columns – a list of the data columns/fields in the data table schema
and their corresponding data types, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data type of the data field
(value of either BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT,
DATETIME or CURRENCY) (type of string)
l fields – a list of the data fields in the data record and their corresponding data
values, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data value of the data field (type of either
string, number, or boolean)
Page 65
l tables – a list of any nested data tables in the data record, consisting of an object
with one or more name/value pairs:
l <name> – the name (name) of the data table and a list the data records it
contains, consisting of an array of objects each with the following name/value pairs:
l id – a required/default fixed value of 0 for all data records (type of
number)
l fields – a list of the data fields in the data record and their
corresponding data values, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data value of the data field (type of
either string, number, or boolean)
Example
The following are examples of this structure:
{
"data": {
"schema": {
"columns": {
"ID": "STRING", "Gender": "STRING", "FirstName": "STRING", "LastName": "STRING"
} }, "fields": {
"ID": "CU00048376",
"Gender": "M.",
"FirstName": "Benjamin",
"LastName": "Verret" }
}
}
{
"data": {
"schema": {
"columns": {
Page 66
},
"tables": {
}
},
"fields": {
"ID": "CU00048376",
"Date": 1332594000000,
"DueDate": 1335189600000,
"InvNumber": "INV9441991",
"Gender": "M.",
"FirstName": "Benjamin",
"LastName": "Verret",
"TotalOrdered": 3,
"InvSubTotal": "1485.00",
"InvTaxTotal": "111.38",
"InvTotal": "1596.38" }, "tables": {
"detail": [
"ID": "STRING", "Date": "DATETIME", "DueDate": "DATETIME", "InvNumber": "STRING", "Gender": "STRING", "FirstName": "STRING", "LastName": "STRING", "TotalOrdered": "INTEGER", "InvSubTotal": "CURRENCY", "InvTaxTotal": "CURRENCY", "InvTotal": "CURRENCY"
"detail": {
"columns": {
"ItemNumber": "STRING", "ItemDesc": "STRING", "ItemUnitPrice": "CURRENCY", "ItemOrdered": "INTEGER", "ItemTotal": "CURRENCY"
}
}
{
"id": 0, "fields": {
"ItemNumber": "PSM002",
Page 67
"ItemDesc": "PSM Production (unlimited)", "ItemUnitPrice": "495.00", "ItemOrdered": 2, "ItemTotal": "990.00"
} }, {
"id": 0,
"fields": {
"ItemNumber": "PSM005", "ItemDesc": "Upgrade (Starter to Web)", "ItemUnitPrice": "495.00", "ItemOrdered": 1, "ItemTotal": "495.00"
} }
]
}
}
}
{
"data": [
{
"schema": {
"columns": {
"ID": "STRING",
"Gender": "STRING",
"FirstName": "STRING",
"LastName": "STRING" }
}, "fields": {
"ID": "CU00048376", "Gender": "M.", "FirstName": "Benjamin", "LastName": "Verret"
} }, {
"schema": {
"columns": {
"ID": "STRING",
Page 68
"Gender": "STRING", "FirstName": "STRING", "LastName": "STRING"
} }, "fields": {
"ID": "CU01499303",
"Gender": "Miss",
"FirstName": "Dianne",
"LastName": "Straka" }
}
]
}
Page 69
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 or job entity.
Structure
The structure consists of an object with the following name/value pairs:
l identifiers – the data entity identifier pairs, consisting of an array of objects each with
the following name/value pairs:
l item – the content item entity identifier (type of number)
l record – the data record entity identifier (type of number)
Example
The following is an example of this structure:
{
"identifiers": [
{
"item": 12345, "record": 54321
}, {
"item": 23456, "record": 65432
}, {
"item": 34567, "record": 76543
}
]
}
Page 70
JSON Data Record Identifier
Describes a single data record entity identifier for a specific content item entity.
Structure
The structure consists of an object with a single name/value pair:
l record – the data record entity identifier (type of number)
Example
The following is an example of this structure:
{
"record": 12345
}
Page 71
JSON Data Record Identifier List (with Parameters)
Describes a list of identifiers for multiple data entities (specifically data record entities), along with additional parameters.
It is used specifically with the Data Record Entity service as input to the Get Multiple Data Record Values (JSON) resource method. The value of the explicitTypes parameter determines if the result returned is either a JSON Record Content Lists or JSON Record
Content Lists (Explicit Types) structure.
Structure
The structure consists of an object with the following name/value pairs:
l recordids – an array of data record entity identifiers (type of number)
l recursive – parameter to specify if all data tables within each data record should be
recursed and the values of any nested data records retrieved also (type of boolean)
l explicitTypes – parameter to specify if both data record values and data types are to be
retrieved (type of boolean)
Example
The following is an example of this structure:
{
"recordids": [ 12345, 23456, 34567 ], "recursive": true, "explicitTypes": false
}
Page 72
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.
Structure
The structure consists of an object with the following name/value pairs:
l identifiers – an array of data record entity identifiers (type of number)
l host – the network address or name of the SMTP mail server through which emails will
be sent. If required, a server port value can also be specified (type of string)
l user – the user name to authenticate with (if using authentication) (type of string)
l password – the password to authenticate with (if using authentication) (type of string)
l sender – the email address to be shown as the sender in the email output (type of string)
l useAuth – parameter to specify if authentication is to be used with the mail server (type of
boolean)
l useStartTLS – parameter to specify if Transport Layer Security (TLS) is to be used when
sending emails (type of boolean)
l useSender – parameter to specify if the sender address will be used as the receiver
address for all emails in the output (type of boolean)
l 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)
l 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
The following is an example of this structure:
{
"identifiers": [
12345,
23456 ], "host": "mail.company.com:587", "user": "johns", "password": "password5",
Page 73
"sender": "john.smith@company.com", "useAuth": true, "useStartTLS": false, "useSender": true, "attachWebPage": true, "attachPdfPage": true
}
Page 74
JSON Record Data List (with Email Parameters)
Describes a list of data fields (as name/value pairs), a data table schema and nested data records (if any) for one or more data records, along with additional parameters used specifically in an content creation operation for email.
This structure is used specifically by the Content Creation (Email) service when creating content directly without the prerequisite of the data mapping process.
Structure
The structure consists of an object with the following name/value pairs:
l data – the data for the data record or data records, consisting of either an object or an
array of one or more objects respectively with the following name/value pairs:
l schema – the data table schema for the data record, consisting of an object with the
following name/value pairs:
l columns – a list of the data columns/fields in the data table schema and their
corresponding data types, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data type of the data field (value of either
BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT, DATETIME or CURRENCY)
(type of string)
l tables – a list of any nested data tables in the data record, consisting of an
object with one or more name/value pairs:
l <name> – the name (name) of the data table and the data table schema
for the data records it contains, consisting of an object with the following name/value pair:
l columns – a list of the data columns/fields in the data table schema
and their corresponding data types, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data type of the data field
(value of either BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT,
DATETIME or CURRENCY) (type of string)
l fields – a list of the data fields in the data record and their corresponding data
values, consisting of an object with one or more name/value pairs:
Page 75
l <name> – the name (name) and data value of the data field (type of either
string, number, or boolean)
l tables – a list of any nested data tables in the data record, consisting of an object
with one or more name/value pairs:
l <name> – the name (name) of the data table and a list the data records it
contains, consisting of an array of objects each with the following name/value pairs:
l id – a required/default fixed value of 0 for all data records (type of
number)
l fields – a list of the data fields in the data record and their
corresponding data values, consisting of an object with one or more name/value pairs:
l <name> – the name (name) and data value of the data field (type of
either string, number, or boolean)
l host – the network address or name of the SMTP mail server through which emails will
be sent. If required, a server port value can also be specified (type of string)
l user – the user name to authenticate with (if using authentication) (type of string)
l password – the password to authenticate with (if using authentication) (type of string)
l sender – the email address to be shown as the sender in the email output (type of string)
l useAuth – parameter to specify if authentication is to be used with the mail server (type of
boolean)
l useStartTLS – parameter to specify if Transport Layer Security (TLS) is to be used when
sending emails (type of boolean)
l useSender – parameter to specify if the sender address will be used as the receiver
address for all emails in the output (type of boolean)
l 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)
l 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
The following is an example of this structure:
Page 76
{
"data": [
{
"schema": {
"columns": {
"ID": "STRING", "Gender": "STRING", "FirstName": "STRING", "LastName": "STRING", "Email": "STRING"
} }, "fields": {
"ID": "CU00048376",
"Gender": "M.",
"FirstName": "Benjamin",
"LastName": "Verret",
"Email": "b.verret@drupa.ol.com.com" }
}, {
"schema": {
"columns": {
"ID": "STRING", "Gender": "STRING", "FirstName": "STRING", "LastName": "STRING", "Email": "STRING"
} }, "fields": {
"ID": "CU01499303",
"Gender": "Miss",
"FirstName": "Dianne",
"LastName": "Straka",
"Email": "d.straka@drupa.ol.com.com" }
} ], "host": "mail.company.com", "user": "johns", "password": "password5", "sender": "john.smith@company.com",
Page 77
"useAuth": true, "useStartTLS": false, "useSender": true, "attachWebPage": true, "attachPdfPage": true
}
Page 78
JSON HTML Parameters List
Describes a list of parameters used specifically in the creation of web content.
Structure
The structure consists of an object with the following name/value pairs:
l section – the section within the Web context of the template to use (type of string)
l inline – the inline mode to be used in the creation of content (value of either NONE, CSS or
ALL) (type of string)
Example
The following is an example of this structure:
{
"section": "Section 1", "inline": "ALL"
}
Page 79
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.
Structure
The structure consists of an object with the following name/value pairs:
l jobs – the job entities within the job set, consisting of an array of objects each with the
following name/value pairs:
l segments – the job segment entities within a job, consisting of an array of objects
each with the following name/value pairs:
l documentsets – the document set entities within a job segment, consisting of
an array of objects each with the following name/value pairs:
l documents – the document entities within a document set, consisting of
an array of objects each with the following name/value pairs:
l documentpages – the document pages within a document,
consisting of an array of objects each with a single name/value pair:
l contentitem – the identifier of the content item entity within a
document page (type of number)
Example
The following is an example of this structure:
{
"jobs": [
{
"segments": [
{
"documentsets": [
{
"documents": [
{
"documentpages": [
{
"contentitem": 1234
Page 80
}, {
"contentitem": 2345
}
] }, {
"documentpages": [
{
"contentitem": 3456
}
] }
]
}
]
}
] }, {
"segments": [
{
"documentsets": [
{
"documents": [
{
"documentpages": [
{
"contentitem": 4567
}
]
}
]
}
]
}
] }
]
}
Page 81
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.
Structure
The structure consists of an object with the following name/value pairs:
l datamining – data mapping configuration parameters, consisting of an object with the
following name/value pairs:
l identifier – the managed file identifier (type of number) or named identifier (type of
string) of the data file
l config – the managed file identifier (type of number) or named identifier (type of
string) of the data mapping configuration
l contentcreation – content creation configuration parameters, consisting of an object
with the following name/value pairs:
l identifiers – an array of data record entity identifiers (type of number) (optional for
configurations containing data mapping parameters)
l config – the managed file identifier (type of number) or named identifier (type of
string) of the input design template
l jobcreation – job creation configuration parameters, consisting of an object with the
following name/value pairs:
l config – the managed file identifier (type of number) or named identifier (type of
string) of the job creation preset (optional)
l outputcreation – output creation configuration parameters, consisting of an object with
the following name/value pairs:
l identifiers – an array of job entity identifiers (type of number) (optional for
configurations containing content creation parameters)
l config – the managed file identifier (type of number) or named identifier (type of
Page 82
string) of the output creation preset
l 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:
l printRange – print range configuration parameters, consisting of an object with a single
name/value pair:
l printRange – the range of records in the data file to output (type of string)
Specific to the use of all processes, but with the omission of the config job creation configuration parameter, an additional data mapping parameter can be added to the
datamining object:
l persistDataset – parameter to specify if data record entities are to be created/persisted in
the server during the data mapping process (type of boolean)
Example
The following are examples of this structure:
{
"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
Page 83
}, "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
}
}
{
"datamining": {
"identifier": "Promo-EN-1000.csv", "config": "Promo-EN.OL-datamapper", "persistDataset": false
}, "contentcreation": {
"config": "letter-ol.OL-template"
}, "jobcreation": {},
Page 84
"outputcreation": {
"config": "5678", "createOnly": false
}
}
Page 85
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.
Structure
The structure consists of an object with the following name/value pairs:
l pages – a list of the total pages per media, consisting of an array of objects each with the
following name/value pairs:
l count – the number of pages using the specific media (type of number)
l media – media specific properties, consisting of an object with the following
name/value pairs:
l name – the name of the media (type of string)
l size – the size of the media (type of string)
l width – the width of the media (type of string)
l height – the height of the media (type of string)
Example
The following is an example of this structure:
{
"pages": [
{
"count": 200,
"media": {
"name": "Plain A4 Paper", "size": "A4", "width": "210mm", "height": "297mm"
} }, {
"count": 108,
"media": {
Page 86
"name": "Plain Letter Paper", "size": "Letter", "width": "8.5in", "height": "11in"
} }
]
}
Page 87
JSON Page Details List
Describes a list of 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.
Structure
The structure consists of an array of objects each with the following name/value pairs:
l id – the content item entity identifier (type of number)
l pages – a list of the pages per media, consisting of an array of objects each with the
following name/value pairs:
l count – the number of pages using the specific media (type of number)
l media – media specific properties, consisting of an object with the following
name/value pairs:
l name – the name of the media (type of string)
l size – the size of the media (type of string)
l width – the width of the media (type of string)
l height – the height of the media (type of string)
Example
The following is an example of this structure:
[
{
"id": 12345, "pages": [
{
"count": 2, "media": {
"name": "Plain A4 Paper", "size": "A4", "width": "210mm", "height": "297mm"
}
Page 88
},
{
"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"
} }
]
}
]
Page 89
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).
Structure
The structure consists of an object with the following name/value pairs:
l result – the overall result of the data mapping operation (value of either ERROR or OK) (type
of string)
l recordcount – the number of data records in the data file (type of number)
l errors – a list of errors that occurred during the mapping process, consisting of an array
of objects each with the following name/value pairs:
l record – the number of the erroneous record in the data file (type of number)
l reason – the mapping error/reason for this particular record (type of string)
Example
The following is an example of this structure:
{
"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: \"\""
}
]
}
Page 90
JSON Search Parameters
Note
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.
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.
Page 91
Structure
The structure consists of an object with the following name/value pairs:
l entity – the data entity type (value of either DATARECORDS, DATASETS, CONTENTITEMS,
CONTENTSETS, JOBS or JOBSETS) (type of string)
l search – search criteria, consisting of an object with the following name/value pairs:
l operator – the search rule operator for the base list of rules (value of either AND or
OR) (type of string)
l 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
l sort – a list of sorting rules, consisting of an array of objects each with the following
name/value pairs:
l name – the name of the data value field or data entity property to sort by (type of
string)
l order – the order that matches to this rule are sorted by (value of either ASC or DESC)
(type of string)
l 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:
l numeric – whether the data value field is a of a numeric type (type of boolean)
l group – a list of grouping rules, consisting of an array of objects each with the following
name/value pairs:
l name – the name of the data value field or data entity property to group by (type of
string)
l order – the order that matches to this rule are grouped by (value of either ASC or
DESC) (type of string)
l 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:
l numeric – whether the data value field is a of a numeric type (type of boolean)
Page 92
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:
l type – the type of search rule (value of value) (type of string)
l name – the name of the data field (type of string)
l value – the value of the data field (type of string, or array of strings when
condition is value of either IN or NOT IN)
l 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:
l type – the type of search rule (value of property) (type of string)
l name – the name of the data entity property (type of string)
l value – the value of the data entity property (type of string, or array of strings
when condition is value of eitherIN or NOT IN)
l 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:
l type – the type of search rule (value of either IN or NOT IN) (type of string)
l identifiers – an array of data entity identifiers (type of number)
Search rule objects with a type value of finishing contain only one of the following sub- groups of name/value pairs:
l type – the type of search rule (value of finishing) (type of string)
l medianame – the name of the media used (type of string)
l condition – the comparison condition (value of either EQUAL or NOTEQUAL) (type of
string)
Page 93
l type – the type of search rule (value of finishing) (type of string)
l duplex – whether the page sheet is duplex (type of boolean)
l type – the type of search rule (value of finishing) (type of string)
l 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)
l 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)
l condition – the comparison condition (value of either EQUAL or NOTEQUAL) (type of
string)
l type – the type of search rule (value of finishing) (type of string)
l 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)
l bindingedge – the binding edge of the media used (value of either DEFAULT, LEFT,
RIGHT, TOP or BOTTOM) (type of string)
l bindingtype – the binding type of the media used (value of either DEFAULT, SADDLE,
SIDE or CORNER) (type of string)
l bindingangle – the binding angle of the media used (value of either DEFAULT,
VERTICAL, HORIZONTAL or ANGLE) (type of string)
l 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:
l type – the type of search rule (value of doclength) (type of string)
l value – the number of pages in document (type of number)
l condition – the comparison condition (value of either EQUAL, NOTEQUAL, LESS, GREAT,
LESSEQUAL or GREATEQUAL) (type of string)
Page 94
Search rule objects with a type value of templatename contain the following name/value pairs:
l type – the type of search rule (value of templatename) (type of string)
l template – the name of the design template used for document (type of string)
l condition – the comparison condition (value of either EQUAL or NOTEQUAL) (type of
string)
Search rule group objects contain the following name/value pairs:
l operator – the search rule operator for sub-list of rules in rule group (value of either
AND or OR) (type of string)
l 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
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",
Page 95
"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"
} ]
}
Page 96
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.
Structure
The structure consists of an array of object arrays, with each object containing the following name/value pairs:
l identifier – the data entity identifier (type of number)
l sortkey – the data entity sort key (type of string)
Example
The following is an example of this structure:
[
[
{
"identifier": 1604,
"sortkey": "NB|Vilma" }, {
"identifier": 1282,
"sortkey": "NF|Lenard" }, {
"identifier": 1443,
"sortkey": "NF|Lenard" }, {
"identifier": 1000,
"sortkey": "SK|Cathleen" },
Page 97
{
"identifier": 1121,
"sortkey": "SK|Rachel" }
]
]
Page 98
JSON Operations List
Note
See the Workflow Operations page of the Technical Overview section for further detail on workflow operations.
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.
Structure
The structure consists of an array of objects each with the following name/value pairs:
l id – the workflow operation identifier (type of string)
l type – the workflow operation type (value of either DataMiningRestService,
ContentCreationRestService, EmailExportRestService, JobCreationRestService, OutputCreationRestService or PrintRestService) (type of string)
l subTask – the workflow operation sub-task name (type of string)
l startTime – the workflow operation starting time stamp (value of milliseconds since
midnight of January 1, 1970 UTC) (type of number)
l 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:
l template – the name of the design template being used for content creation (type of
string)
Example
The following is an example of this structure:
Page 99
[
{
"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"
Page 100
Loading...