2018.1

Table Of Contents
REST API Cookbook with
Working Examples
Version:2018.1

Summary of content (574 pages)

Options
Actions
JavaScript/jQuery fs-datamapper-upload.

  • PAGE 125

    persistent = $("#persistent").prop("checked"); var settings = { type: "POST", url: "/rest/serverengine/filestore/DataMiningConfig?persistent=" + persistent, data: file, processData: false, contentType: "application/octet-stream" }; if (named) settings.url += "&filename=" + file.name; $.ajax(settings) .done(function (response) { c.displayStatus("Request Successful"); c.displayInfo("Data Mapping Configuration '" + file.name + "' Uploaded Successfully"); c.displayResult("Managed File ID", response); }) .

  • PAGE 126

    Screenshot & Output Usage To run the example simply select the Browse button and then select the data mapping configuration you wish to upload using the selection dialog box.

  • PAGE 127

    uploaded file will be associated with (or can be referenced using) that name. Once the configuration and options are selected, simply select the Submit button to upload the configuration to the server's file store and the resulting Managed File ID for the data mapping configuration will be returned and displayed to the Results area. Discussion Firstly, we define an event handler that will run in response to the submission of the HTML form via the selection of the Submit button.

  • PAGE 128

    When the request is successful or done, a request response is received and the content of that response is passed as the function parameter response. In the example, we then display the value of this parameter which should be the new Managed File ID of the data mapping configuration in the file store. Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 129

    Uploading a Design Template to the File Store Problem You want to upload a design template to the File Store so that it can be used as part of a Content Creation operation. Solution The solution is to create a request using the following URI and method type to submit the design template to the server via the File Store REST service: Upload Design Template /rest/serverengine/filestore/template POST Example HTML5 fs-designtemplate-upload.

  • PAGE 130

    Options
    Actions
    JavaScript/jQuery fs-designtemplate-upload.

  • PAGE 131

    var settings = { type: "POST", url: "/rest/serverengine/filestore/template?persistent=" + persistent, data: file, processData: false, contentType: "application/zip" }; if (named) settings.url += "&filename=" + file.name; $.ajax(settings) .done(function (response) { c.displayStatus("Request Successful"); c.displayInfo("Design Template '" + file.name + "' Uploaded Successfully"); c.displayResult("Managed File ID", response); }) .fail(c.

  • PAGE 132

    Screenshot & Output Usage To run the example simply select the Browse button and then select the design template you wish to upload using the selection dialog box.

  • PAGE 133

    Once the template and options are selected, simply select the Submit button to upload the template to the server's file store and the resulting Managed File ID for the design template will be returned and displayed to the Results area. Discussion Firstly, we define an event handler that will run in response to the submission of the HTML form via the selection of the Submit button. When our event handler function is called, we then obtain a reference to the local design template previously selected.

  • PAGE 134

    Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 135

    Uploading a Job Creation Preset to the File Store Problem You want to upload a job creation preset to the File Store so that it can be used as part of a Job Creation operation. Solution The solution is to create a request using the following URI and method type to submit the job creation preset to the server via the File Store REST service: Upload Job Creation Preset /rest/serverengine/filestore/JobCreationConfig POST Example HTML5 fs-jcpreset-upload.

  • PAGE 136

    Options
    Actions
    JavaScript/jQuery fs-jcpreset-upload.

  • PAGE 137

    var settings = { type: "POST", url: "/rest/serverengine/filestore/JobCreationConfig?persistent=" + persistent, data: file, processData: false, contentType: "application/xml" }; if (named) settings.url += "&filename=" + file.name; $.ajax(settings) .done(function (response) { c.displayStatus("Request Successful"); c.displayInfo("Job Creation Preset '" + file.name + "' Uploaded Successfully"); c.displayResult("Managed File ID", response); }) .fail(c.

  • PAGE 138

    Screenshot & Output Usage To run the example simply select the Browse button and then select the job creation preset you wish to upload using the selection dialog box.

  • PAGE 139

    Once the preset and options are selected, simply select the Submit button to upload the preset to the server's file store and the resulting Managed File ID for the job creation preset will be returned and displayed to the Results area. Discussion Firstly, we define an event handler that will run in response to the submission of the HTML form via the selection of the Submit button. When our event handler function is called, we then obtain a reference to the local job creation preset previously selected.

  • PAGE 140

    Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 141

    Uploading an Output Creation Preset to the File Store Problem You want to upload an output creation preset to the File Store so that it can be used as part of a Output Creation operation. Solution The solution is to create a request using the following URI and method type to submit the output creation preset to the server via the File Store REST service: Upload Output Creation Preset /rest/serverengine/filestore/OutputCreationConfig POST Example HTML5 fs-ocpreset-upload.

  • PAGE 142

    Options
    Actions
    JavaScript/jQuery fs-ocpreset-upload.

  • PAGE 143

    var settings = { type: "POST", url: "/rest/serverengine/filestore/OutputCreationConfig?persistent=" + persistent, data: file, processData: false, contentType: "application/xml" }; if (named) settings.url += "&filename=" + file.name; $.ajax(settings) .done(function (response) { c.displayStatus("Request Successful"); c.displayInfo("Output Creation Preset '" + file.name + "' Uploaded Successfully"); c.displayResult("Managed File ID", response); }) .fail(c.

  • PAGE 144

    Screenshot & Output Usage To run the example simply select the Browse button and then select the output creation preset you wish to upload using the selection dialog box.

  • PAGE 145

    Once the preset and options are selected, simply select the Submit button to upload the preset to the server's file store and the resulting Managed File ID for the output creation preset will be returned and displayed to the Results area. Discussion Firstly, we define an event handler that will run in response to the submission of the HTML form via the selection of the Submit button.

  • PAGE 146

    Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 147

    Working with the Entity Services This section consists of a number of pages covering various useful working examples: 1. Finding Specific Data Entities in the Server 2. Finding all the Data Sets in the Server 3. Finding the Data Records in a Data Set 4. Finding all the Content Sets in the Server 5. Finding the Content Items in a Content Set 6. Finding all the Job Sets in the Server 7.

  • PAGE 148

    Finding Specific Data Entities in the Server Problem You want to find specific Data Entities stored within the PlanetPress Connect Server based on a set of search criteria. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Entity REST service: Find Data Entity /rest/serverengine/entity/find PUT Example HTML5 e-find-data-entity.

  • PAGE 149

    Sorting Rules
  • PAGE 151

    Actions
    rules.

  • PAGE 152

    PAGE 154

  • PAGE 156

    PAGE 157

  • PAGE 158

    JavaScript/jQuery dse-get-datarecords.js /* Data Set Entity Service - Get Data Records for Data Set Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var dataSetId = $("#dataset").val(); $.

  • PAGE 185

    c.displaySubResult("JSON Identifier List", c.jsonPrettyPrint(response)); }) .fail(c.displayDefaultFailure); }); }); }(jQuery, Common)); Screenshot & Output Usage To run the example simply enter the Data Set ID and select the Submit button to request a list of the all the data records contained within the specific data set in the server.

  • PAGE 186

    The resulting list will then be returned and displayed to the Results area in both Plain list and JSON Identifier List formats. Further Reading See the Data Set Entity Service page of the REST API Reference section for further detail.

  • PAGE 187

    Finding all the Content Sets in the Server Problem You want to obtain a list of all the previously created Content Sets contained in the PlanetPress Connect Server potentially for use in a Job Creation operation. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Content Set Entity REST service: Get All Content Sets /rest/serverengine/entity/contentsets GET Example HTML5 cse-get-all-contentsets.

  • PAGE 188

    JavaScript/jQuery cse-get-all-contentsets.js /* Content Set Entity Service - Get All Content Sets Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; $.ajax({ type: "GET", url: "/rest/serverengine/entity/contentsets" }) .done(function (response) { c.displayStatus("Request Successful"); c.displayHeading("Content Set IDs"); c.

  • PAGE 189

    Screenshot & Output Usage To run the example simply select the Submit button to request a list of the all the content sets currently contained within the server. The resulting list will then be returned and displayed to the Results area in both Plain list and JSON Identifier List formats. Further Reading See the Content Set Entity Service page of the REST API Reference section for further detail.

  • PAGE 190

    Finding the Content Items in a Content Set Problem You want to obtain a list of all the previously created Content Items contained within a specific Content Set potentially for use in a Job Creation operation. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Content Set Entity REST service: Get Content Items for Content Set /rest/serverengine/entity/contentsets/{contentSetId} GET Example HTML5 cse-get-contentitems.

  • PAGE 191

    Actions
    JavaScript/jQuery cse-get-contentitems.js /* Content Set Entity Service - Get Content Items for Content Set Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var contentSetId = $("#contentset").val(); $.

  • PAGE 192

    c.displaySubResult("JSON Content Item Identifier List", c.jsonPrettyPrint(response)); }) .fail(c.

  • PAGE 193

    Screenshot & Output Usage To run the example simply enter the Content Set ID and select the Submit button to request a list of the all the content items contained within the specific content set in the server.

  • PAGE 194

    The resulting list will then be returned as a list of Content Item and Data Record ID pairs which will be displayed to the Results area in both Plain table and JSON Content Item Identifier List formats. Further Reading See the Content Set Entity Service page of the REST API Reference section for further detail.

  • PAGE 195

    Finding all the Job Sets in the Server Problem You want to obtain a list of all the previously created Job Sets contained in the PlanetPress Connect Server potentially for use in a Output Creation operation. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Job Set Entity REST service: Get All Job Sets /rest/serverengine/entity/jobsets GET Example HTML5 jse-get-all-jobsets.

  • PAGE 196

    JavaScript/jQuery jse-get-all-jobsets.js /* Job Set Entity Service - Get All Job Sets Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; $.ajax({ type: "GET", url: "/rest/serverengine/entity/jobsets" }) .done(function (response) { c.displayStatus("Request Successful"); c.displayHeading("Job Set IDs"); c.displaySubResult("Plain", c.

  • PAGE 197

    Screenshot & Output Usage To run the example simply select the Submit button to request a list of the all the job sets currently contained within the server. The resulting list will then be returned and displayed to the Results area in both Plain list and JSON Identifier List formats. Further Reading See the Job Set Entity Service page of the REST API Reference section for further detail.

  • PAGE 198

    Finding the Jobs in a Job Set Problem You want to obtain a list of all the previously created Jobs contained within a specific Job Set potentially for use in a Output Creation operation. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Job Set Entity REST service: Get Jobs for Job Set /rest/serverengine/entity/jobsets/{jobSetId} GET Example HTML5 jse-get-jobs.

  • PAGE 199

    Actions
    JavaScript/jQuery jse-get-jobs.js /* Job Set Entity Service - Get Jobs for Job Set Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var jobSetId = $("#jobset").val(); $.

  • PAGE 200

    }) .fail(c.displayDefaultFailure); }); }); }(jQuery, Common)); Screenshot & Output Usage To run the example simply enter the Job Set ID and select the Submit button to request a list of the all the jobs contained within the specific job set in the server. The resulting list will then be returned and displayed to the Results area in both Plain list and JSON Identifier List formats. Further Reading See the Job Set Entity Service page of the REST API Reference section for further detail.

  • PAGE 201

    Working with the Workflow Services This section consists of a number of pages covering various useful working examples: 1. Running a Data Mapping Operation 2. Running a Data Mapping Operation (Using JSON) 3. Running a Data Mapping Operation for PDF/VT File (to Data Set) 4. Running a Data Mapping Operation for PDF/VT File (to Content Set) 5. Running a Content Creation Operation for Print 6. Running a Content Creation Operation for Print By Data Record (Using JSON) 7.

  • PAGE 202

    Running a Data Mapping Operation Problem You want to run a data mapping operation to produce a Data Set using a data file and a data mapping configuration as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the data mapping operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 203

    PAGE 204

    JavaScript/jQuery dm-process.js /* Data Mapping Service - Process Data Mapping Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/cancel/" + operationId }) .done(function (response) { c.

  • PAGE 205

    var configId = $("#datamapper").val(), dataFileId = $("#datafile").val(), validate = $("#validate").prop("checked"); var getFinalResult = function () { /* Get Result of Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); if (validate) { c.displaySubResult("JSON Data Mapping Validation Result", c.jsonPrettyPrint(response)); } else { c.

  • PAGE 206

    Successfully Submitted"); c.displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.ajax({ type: "GET", cache: false, url: "/rest/serverengine/workflow/datamining/getProgress/" + operationId }) .done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.

  • PAGE 207

    } }; getProgress(); }) .fail(c.

  • PAGE 208

    l Validate Only – Only validate the Data Mapping operation to check for mapping errors (no Data Set is created). Lastly, select the Submit button to start the data mapping operation. Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation.

  • PAGE 209

    Running a Data Mapping Operation (Using JSON) Problem You want to run a data mapping operation to produce a Data Set using a data file and a data mapping configuration as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the data mapping operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 210

    PAGE 211

    JavaScript/jQuery dm-process-json.js /* Data Mapping Service - Process Data Mapping (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/cancel/" + operationId }) .done(function (response) { c.

  • PAGE 212

    var configId = $("#datamapper").val(), dataFileId = $("#datafile").val(), validate = $("#validate").prop("checked"); var getFinalResult = function () { /* Get Result of Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); if (validate) { c.displaySubResult("JSON Data Mapping Validation Result", c.jsonPrettyPrint(response)); } else { c.

  • PAGE 213

    $cancelButton.prop("disabled", false); c.displayStatus("Data Mapping Operation Successfully Submitted"); c.displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.ajax({ type: "GET", cache: false, url: "/rest/serverengine/workflow/datamining/getProgress/" + operationId }) .done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.

  • PAGE 214

    } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 215

    Usage To run the example simply enter the Managed File ID or Name for your data file and your data mapping configuration (previously uploaded to the file store) into the appropriate text fields, and then check any options that you may require: l Validate Only – Only validate the Data Mapping operation to check for mapping errors (no Data Set is created). Lastly, select the Submit button to start the data mapping operation.

  • PAGE 216

    Running a Data Mapping Operation for PDF/VT File (to Data Set) Problem You want to run a data mapping operation to produce a Data Set using only a PDF/VT file as input. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the data mapping operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 217

    3.2.1.min.js"> PAGE 218

    c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/cancel/" + operationId }) .done(function (response) { c.displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.

  • PAGE 219

    "/rest/serverengine/workflow/datamining/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); c.displaySubResult("Data Set ID", response); }) .fail(c.displayDefaultFailure); }; /* Process Data Mapping (PDF/VT to Data Set) */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/pdfvtds/" + dataFileId }) .done(function (response, status, request) { var progress = null; operationId = request.

  • PAGE 220

    if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.attr("value", (progress = 100)); c.displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 221

    Screenshot & Output Usage To run the example simply enter the Managed File ID or Name for your PDF/VT file (previously uploaded to the file store) into the appropriate text field, and then select the Submit button to start the data mapping operation. Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation.

  • PAGE 222

    Running a Data Mapping Operation for PDF/VT File (to Content Set) Problem You want to run a data mapping operation to produce a Content Set using only a PDF/VT file as input. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the data mapping operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 223

    3.2.1.min.js"> PAGE 224

    c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/cancel/" + operationId }) .done(function (response) { c.displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.

  • PAGE 225

    "/rest/serverengine/workflow/datamining/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); c.displaySubResult("Content Set ID", response); }) .fail(c.displayDefaultFailure); }; /* Process Data Mapping (PDF/VT to Content Set) */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/pdfvtcs/" + dataFileId }) .done(function (response, status, request) { var progress = null; operationId = request.

  • PAGE 226

    if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.attr("value", (progress = 100)); c.displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 227

    Screenshot & Output Usage To run the example simply enter the Managed File ID or Name for your PDF/VT file (previously uploaded to the file store) into the appropriate text field, and then select the Submit button to start the data mapping operation. Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation.

  • PAGE 228

    Running a Content Creation Operation for Print Problem You want to run a content creation operation to produce a Content Set using a design template and an existing set of Data Records as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the content creation operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 229

    PAGE 230

    $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/contentcreation/cancel/" + operationId }) .done(function (response) { c.displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.

  • PAGE 231

    type: "POST", url: "/rest/serverengine/workflow/contentcreation/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); c.displaySubResult("Content Set IDs", response); }) .fail(c.displayDefaultFailure); }; /* Process Content Creation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/contentcreation/" + templateId + "/" + dataSetId }) .done(function (response, status, request) { var progress = null; operationId = request.

  • PAGE 232

    }) .done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.attr("value", (progress = 100)); c.displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.

  • PAGE 233

    Screenshot & Output Usage To run the example simply enter the Data Set ID and the Managed File ID or Name of your design template (previously uploaded to the file store) into the appropriate text fields, and then select the Submit button to start the content creation operation. Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation.

  • PAGE 234

    Running a Content Creation Operation for Print By Data Record (Using JSON) Problem You want to run a content creation operation to produce a Content Set using a design template and an existing set of Data Records as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the content creation operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 235

    Content Creation Service - Process Content Creation (By Data Record) (JSON) Example

    Inputs
    PAGE 236

    JavaScript/jQuery cc-process-by-dre-json.js /* Content Creation Service - Process Content Creation (By Data Record) (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/contentcreation/cancel/" + operationId }) .

  • PAGE 237

    var dataRecordIds = $("#datarecords").val(), templateId = $("#designtemplate").val(); var getFinalResult = function () { /* Get Result of Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/contentcreation/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); c.displaySubResult("Content Set IDs", response); }) .fail(c.displayDefaultFailure); }; /* Process Content Creation (By Data Record) (JSON) */ $.

  • PAGE 238

    var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.ajax({ type: "GET", cache: false, url: "/rest/serverengine/workflow/contentcreation/getProgress/" + operationId }) .done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.attr("value", (progress = 100)); c.

  • PAGE 239

    getProgress(); }) .fail(c.displayDefaultFailure); }); }); }(jQuery, Common)); Screenshot & Output Usage To run the example simply enter a comma delimited list of your Data Record IDs and the Managed File ID or Name of your design template (previously uploaded to the file store) into the appropriate text fields, and then select the Submit button to start the content creation operation.

  • PAGE 240

    Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation. The progress of the operation will be displayed in the progress bar, and once the content creation operation has completed, the IDs of the Content Sets created will be returned and displayed to the Results area.

  • PAGE 241

    Running a Content Creation Operation for Email By Data Record (Using JSON) Problem You want to run a content creation operation to create and send email content using a design template and an existing set of Data Records as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the content creation operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 242

    Process Content Creation (By Data Record) (JSON) Example PAGE 243

    Email Security
  • PAGE 244

    JavaScript/jQuery cce-process-by-dre-json.js /* Content Creation (Email) Service - Process Content Creation (By Data Record) (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.

  • PAGE 245

    .done(function (response) { c.displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.prop("disabled", false); $cancelButton.prop("disabled", true); }, 100); }) .fail(c.displayDefaultFailure); } }); $useAuth.on("click", function (event) { var disabled = !($(event.target).prop("checked")); $.each([$startTLS, $username, $password], function (index, $element) { $element.prop("disabled", disabled); }); }); $("form").

  • PAGE 246

    }) .fail(c.displayDefaultFailure); }; /* Construct JSON Identifier List (with Email Parameters) */ var config = { "sender": $("#sender").val(), "host": $("#host").val(), "useAuth" : $useAuth.prop("checked"), "useSender": $("#usesender").prop ("checked"), "attachWebPage": $("#attachweb").prop ("checked"), "attachPdfPage": $("#attachpdf").prop ("checked") }, drids = c.plainIDListToJson(dataRecordIds); if (config.useAuth) { config.useStartTLS = $startTLS.prop("checked"); config.user = $username.val(); config.

  • PAGE 247

    ("operationId"); $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("Content Creation Operation Successfully Submitted"); c.displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.ajax({ type: "GET", cache: false, url: "/rest/serverengine/workflow/contentcreation/email/getProgress/" + operationId }) .

  • PAGE 248

    ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 249

    Screenshot & Output Usage To run the example you first need to enter a comma delimited list of your Data Record IDs and the Managed File ID or Name of your design template (previously uploaded to the file store) Page 249

  • PAGE 250

    into the appropriate text fields as your inputs. Next you need to specify the email parameters to use with the content creation operation: l Section – the section within the Email context of the template to use l From – the email address to be shown as the sender in the email output l l l l Host – the network address or name of your SMTP mail server through which the emails will be sent.

  • PAGE 251

    Creating Content for Web By Data Record Problem You want to create and retrieve web content using a design template and an existing Data Record as inputs. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Content Creation (HTML) REST service: Process Content Creation (By Data Record) /rest/serverengine/workflow/contentcreation/html/ {templateId}/{dataRecordId: [0-9]+} GET Example HTML5 cch-process-by-dre.

  • PAGE 252

    HTML Parameters
    HTML Parameters
    PAGE 265

    "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/jobcreation/cancel/" + operationId }) .done(function (response) { c.displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.

  • PAGE 266

    $.ajax({ type: "POST", url: "/rest/serverengine/workflow/jobcreation/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); c.displaySubResult("Job Set ID", response); }) .fail(c.displayDefaultFailure); }; /* Process Job Creation (JSON) */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/jobcreation/" + configId, data: JSON.stringify(c.plainIDListToJson (contentSetIds)), contentType: "application/json" }) .

  • PAGE 267

    operationId }) .done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.attr("value", (progress = 100)); c.displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.

  • PAGE 268

    Screenshot & Output Usage To run the example simply enter a comma delimited list of your Content Set IDs and the Managed File ID or Name of your job creation preset (previously uploaded to the file store) into the appropriate text fields, and then select the Submit button to start the job creation operation. Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation.

  • PAGE 269

    Running an Output Creation Operation Problem You want to run an output creation operation to produce print output using an output creation preset and an existing Job Set as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the output creation operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 270

    PAGE 271

    JavaScript/jQuery oc-process.js /* Output Creation Service - Process Output Creation Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/outputcreation/cancel/" + operationId }) .

  • PAGE 272

    $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var jobSetId = $("#jobset").val(), configId = $("#ocpreset").val(); var getFinalResult = function () { var result = ($("#resultastxt").prop("checked")) ? "getResultTxt" : "getResult"; /* Get Result of Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/outputcreation/" + result + "/" + operationId }) .done(function (response, status, request) { if (request.

  • PAGE 273

    $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("Output Creation Operation Successfully Submitted"); c.displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.ajax({ type: "GET", cache: false, url: "/rest/serverengine/workflow/outputcreation/getProgress/" + operationId }) .

  • PAGE 274

    $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 275

    Usage To run the example simply enter the Job Set ID and the Managed File ID or Name of your output creation preset (previously uploaded to the file store) into the appropriate text fields, and then check any options that you may require: l Get Result as Text – Return the result as text specifically. In this example this would return the absolute path to the output file(s). Lastly, select the Submit button to start the Output creation operation.

  • PAGE 276

    Running an Output Creation Operation (Using JSON) Problem You want to run an output creation operation to produce print output using an output creation preset and an existing Job Set as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the output creation operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 277

    PAGE 278

    disabled> JavaScript/jQuery oc-process-json.js /* Output Creation Service - Process Output Creation (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.

  • PAGE 279

    }) .fail(c.displayDefaultFailure); } }); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var jobSetId = $("#jobset").val(), configId = $("#ocpreset").val(), createOnly = $("#createonly").prop("checked"); var getFinalResult = function () { var result = ($("#resultastxt").prop("checked")) ? "getResultTxt" : "getResult"; /* Get Result of Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/outputcreation/" + result + "/" + operationId }) .

  • PAGE 280

    (jobSetId, createOnly)), contentType: "application/json" }) .done(function (response, status, request) { var progress = null; operationId = request.getResponseHeader ("operationId"); $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("Output Creation Operation Successfully Submitted"); c.displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.

  • PAGE 281

    Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 282

    Screenshot & Output Usage To run the example simply enter the Job Set ID and the Managed File ID or Name of your output creation preset (previously uploaded to the file store) into the appropriate text fields, and then check any options that you may require: l l Create Only – Create the output in server but do not send spool file to its final destination. In this example this would mean that the output files(s) would not be sent to the output directory specified in the output creation preset.

  • PAGE 283

    Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation. The progress of the operation will be displayed in the progress bar, and once the output creation operation has completed, the output result will be returned and displayed to the Results area. Note If the result returned is expected to be file data, then the value <> will be displayed.

  • PAGE 284

    Running an Output Creation Operation By Job (Using JSON) Problem You want to run an output creation operation to produce print output using an output creation preset and a list of existing Jobs as inputs. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the output creation operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 285

    Process Output Creation (By Job) (JSON) Example PAGE 286

    JavaScript/jQuery oc-process-by-je-json.js /* Output Creation Service - Process Output Creation (By Job) (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.

  • PAGE 287

    $submitButton.prop("disabled", false); $cancelButton.prop("disabled", true); }, 100); }) .fail(c.displayDefaultFailure); } }); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var jobIds = $("#jobs").val(), configId = $("#ocpreset").val(), createOnly = $("#createonly").prop("checked"); var getFinalResult = function () { var result = ($("#resultastxt").prop("checked")) ? "getResultTxt" : "getResult"; /* Get Result of Operation */ $.

  • PAGE 288

    url: "/rest/serverengine/workflow/outputcreation/" + configId + "/jobs", data: JSON.stringify(c.plainIDListToJson (jobIds, createOnly)), contentType: "application/json" }) .done(function (response, status, request) { var progress = null; operationId = request.getResponseHeader ("operationId"); $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("Output Creation Operation Successfully Submitted"); c.

  • PAGE 289

    $progressBar.attr("value", (progress = 100)); c.displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.

  • PAGE 290

    Screenshot & Output Usage To run the example simply enter a comma delimited list of your Job IDs and the Managed File ID or Name of your output creation preset (previously uploaded to the file store) into the appropriate text fields, and then check any options that you may require: l l Create Only – Create the output in server but do not send spool file to its final destination.

  • PAGE 291

    Once the operation has started processing, the Operation ID will be displayed in the Results area and the Cancel button will become enabled, giving you the option to cancel the running operation. The progress of the operation will be displayed in the progress bar, and once the output creation operation has completed, the output result will be returned and displayed to the Results area. Note If the result returned is expected to be file data, then the value <> will be displayed.

  • PAGE 292

    Running an All-In-One Operation (Using JSON) Problem You want to run an All-In-One operation to produce either a Data Set, Content Sets, a Job Set or print output using one of the available process and input combinations. Solution The solution is to make a series of requests using the following URIs and method types to submit, monitor progress and ultimately retrieve the result of the All-In-One operation. There is also the option of cancelling an operation during processing if required.

  • PAGE 293

    3.2.1.min.js"> PAGE 294

    Content Creation
    PAGE 295

    Progress

  • PAGE 296

    /* All-In-One Service - Process All-In-One (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.

  • PAGE 297

    $progressBar.attr("value", 0); $submitButton.prop("disabled", false); $cancelButton.prop("disabled", true); }, 100); }) .fail(c.displayDefaultFailure); } }); /** * @function generateAIOConfig * @description Validates the workflow selected by the user * and constructs and an All-In-One Configuration using the relevant * input fields in the HTML Form. * Any invalid inputs or workflow selections will be redflagged in * the HTML Form.

  • PAGE 298

    /* Get Input Value and add it to the Configuration (Helper Function) */ function getInputValue($input, process, field, parser) { var value = $input.val().trim(); if (value) { if (parser) value = parser($input); if (config[process] === undefined) config[process] = {}; config[process][field] = value; } } /* Get Required & Actual Workflow Selections */ $inputs.each(function () { if ($(this).prop("checked")) config[this.id] = {}; $(this).prop("required", false); required.push(this.

  • PAGE 299

    getInputValue($datafile, "datamining", "identifier"); getInputValue($datamapper, "datamining", "config"); outputDesc = "Data Set ID"; } if (config.contentcreation) { getInputValue($template, "contentcreation", "config"); if (!config.datamining) { getInputValue($datarecords, "contentcreation", "identifiers", jsonIDListValue); $datarecords.prop("disabled", false); } else { $datarecords.prop("disabled", true); } outputDesc = "Content Set ID(s)"; } if (config.

  • PAGE 300

    getInputValue($jcpreset, "jobcreation", "config"); getInputValue($printrange, "printRange", "printRange"); if (config.jobcreation.config) { $persistdres.prop({ "disabled": true, "checked": true }); } else { getInputValue($persistdres, "datamining", "persistDataset", booleanValue); $persistdres.prop("disabled", false); } $jcpreset.prop("disabled", false); $printrange.prop("disabled", false); } else { $jcpreset.prop("disabled", true); $printrange.prop("disabled", true); $persistdres.

  • PAGE 301

    event.preventDefault(); if (!c.checkSessionValid()) return; if (!AIOConfig) { alert("Invalid All-In-One Configuration!\n\nPlease enter a valid " + "combination of input fields, and try again."); return; } var getFinalResult = function () { var result = ($resultastxt.prop("checked")) ? "getResultTxt" : "getResult"; /* Get Result of Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/print/" + result + "/" + operationId }) .done(function (response, status, request) { if (request.

  • PAGE 302

    }) .done(function (response, status, request) { var progress = null; operationId = request.getResponseHeader ("operationId"); $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("All-In-One Operation Successfully Submitted"); c.displayHeading("Input Configuration"); c.displaySubResult("JSON All-In-One Configuration", c.jsonPrettyPrint(AIOConfig)); c.

  • PAGE 303

    ("value", (progress = 100)); c.displayInfo ("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.prop ("disabled", false); $cancelButton.prop ("disabled", true); }, 100); } }) .fail(c.displayDefaultFailure); } }; getProgress(); }) .fail(c.displayDefaultFailure); }) .

  • PAGE 304

    Screenshot & Output Page 304

  • PAGE 305

    Page 305

  • PAGE 306

    Usage To run the example simply select the input combination of your choosing, populate the appropriate input fields and then check any options that you may require.

  • PAGE 307

    The progress of the operation will be displayed in the progress bar, and once the All-in-One operation has completed, the result will be returned and displayed to the Results area. If the All-In-One configuration includes output creation, then the result returned will be the output files (either their absolute path(s) or the output file itself). If the configuration does not include output creation, then the result returned will be either a Data Set ID, Content Set IDs or Job Set ID.

  • PAGE 308

    REST API Reference The PlanetPress Connect REST API defines a number of RESTful services that facilitate various functionality within the server during workflow processing. The following table is a summary of the services available in the PlanetPress Connect REST API: Service Name Internal Name Description Authentication Service AuthenticationRestService This service exposes methods concerned with server security and authentication with the PlanetPress Connect REST API.

  • PAGE 309

    Service Name Internal Name Description l l Content Item Entity Service ContentItemEntityRestService Getting the result of a content creation operation for print Creation of single record preview PDFs using either a data file, data record or JSON as input This service exposes methods specific to the access and management of content item entities internal to the server.

  • PAGE 310

    Service Name Internal Name Description l Data Record Entity Service DataRecordEntityRestService Deletion of content sets from the server This service exposes methods specific to the access and management of data record entities internal to the server.

  • PAGE 311

    Service Name Internal Name Description server Data Mapping Service DataminingRestService This service exposes methods specific to the management of the data mapping process within the workflow.

  • PAGE 312

    Service Name Internal Name Description management of document set entities internal to the server. It includes methods to facilitate the following functions: l l Content Creation (Email) Service EmailExportRestService Getting the document IDs contained within a document set Getting and updating of document set metadata properties This service exposes methods specific to the management of the content creation process for the Email context within the workflow.

  • PAGE 313

    Service Name Internal Name Description l File Store Service FilestoreRestService Finding of data entities in the server using specific search criteria This service exposes methods specific to the management of input and output files via the file store on the PlanetPress Connect server.

  • PAGE 314

    Service Name Internal Name Description l l Job Creation Service JobCreationRestService Creation of HTML output from a design template only (no input data) Getting specific resources contained within a design template This service exposes methods specific to the management of the job creation process within the workflow.

  • PAGE 315

    Service Name Internal Name Description l l Job Segment Entity Service JobSegmentEntityRestService Getting and updating of job properties Getting and updating of job metadata properties This service exposes methods specific to the access and management of job segment entities internal to the server.

  • PAGE 316

    Service Name Internal Name Description server Output Creation Service OutputCreationRestService This service exposes methods specific to the management of the output creation process within the workflow.

  • PAGE 317

    Service Name Internal Name Description as input l l Getting a list of all the active operations on the server Getting the result of an All-InOne operation Page 317

  • PAGE 318

    Authentication Service The following table is a summary of the resources and methods available in the Authentication service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /authentication GET Authenticate/Login to Server /authentication/login POST Service Version /authentication/version GET Page 318

  • PAGE 319

    Service Handshake Queries the availability of the Authentication service. Type: GET URI: /rest/serverengine/authentication Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 320

    Authenticate/Login to Server Submits an authentication request (using credentials) to the PlanetPress Connect server and if successful provides access to the various other REST API services available. Request takes no content, but requires an additional Authorization header which contains a base64 encoded set of credentials (basic user name & password).

  • PAGE 321

    Content: Authorization Token Content Type: text/plain Status: l l 200 OK – Server authentication successful, new token generated 401 Unauthorized – Server authentication has failed or no credentials have been provided/specified in request header Page 321

  • PAGE 322

    Service Version Returns the version of the Authentication service. Type: GET URI: /rest/serverengine/authentication/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 323

    Content Creation Service The following table is a summary of the resources and methods available in the Content Creation service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/contentcreation GET Process Content Creation /workflow/contentcreation/{templateId}/ {dataSetId} POST Process Content Creation (By Data Record) (JSON) /workflow/contentcreation/{templateId} POST Process Content Creation (By Data) (JSON) /workflow/contentcreation/{templateId} POST

  • PAGE 324

    Method Name Uniform Resource Identifier (URI) Method Type Service Version /workflow/contentcreation/version GET Page 324

  • PAGE 325

    Service Handshake Queries the availability of the Content Creation service. Type: GET URI: /rest/serverengine/workflow/contentcreation Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 326

    Process Content Creation Submits a request to initiate a new Content Creation operation. Request takes no content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 327

    Type: Status: l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template or Data Set entity not found in File Store/Server Page 327

  • PAGE 328

    Process Content Creation (By Data Record) (JSON) Submits a request to initiate a new Content Creation operation. Request takes a JSON Identifier List of Data Record IDs as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 329

    Type: Status: l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store Page 329

  • PAGE 330

    Process Content Creation (By Data) (JSON) Submits a request to initiate a new Content Creation operation. Request takes a JSON Record Data List of the data values for one or more Data Records as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 331

    Content Type: Status: – l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store Page 331

  • PAGE 332

    Create Preview PDF Submits a request to create a preview PDF of the print output for a single data record. Request takes binary file data as content, and on success returns a response containing the Managed File ID for the newly created preview PDF file.

  • PAGE 333

    Content: Managed File ID Content Type: text/plain Status: l l l l 200 OK – Creation of preview PDF in File Store successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template, Data Mapping configuration or Data Record entity not found in File Store/Server Page 333

  • PAGE 334

    Create Preview PDF (By Data Record) Submits a request to create a preview PDF of the print output for a single data record. Request takes no content, and on success returns a response containing the Managed File ID for the newly created preview PDF file.

  • PAGE 335

    l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template or Data Record entity not found in File Store/Server Page 335

  • PAGE 336

    Create Preview PDF (By Data) (JSON) Submits a request to create a preview PDF of the print output for a single data record. Request takes a JSON Record Data List of the data values for the Data Record as content, and on success returns a response containing the Managed File ID for the newly created preview PDF file.

  • PAGE 337

    successful l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store Page 337

  • PAGE 338

    Get All Operations Returns a list of all the workflow operations actively running on the Server. Request takes no content, and on success returns a response containing a JSON Operations List of all the actively running operations. Type: GET URI: /rest/serverengine/workflow/contentcreation/getOperations Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 339

    Get Progress of Operation Retrieves the progress of a running Content Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing the current value of operation progress (values ranging from 0 – 100, followed by the value of 'done' on completion). Type: GET URI: /rest/serverengine/workflow/contentcreation/getProgress/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Content Creation operation Add.

  • PAGE 340

    l 403 Forbidden – Server authentication has failed or expired Page 340

  • PAGE 341

    Get Result of Operation Retrieves the final result of a completed Content Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing the IDs of the Content Sets produced. Type: POST URI: /rest/serverengine/workflow/contentcreation/getResult/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Content Creation operation Add.

  • PAGE 342

    l 403 Forbidden – Server authentication has failed or expired Page 342

  • PAGE 343

    Cancel an Operation Requests the cancellation of a running Content Creation operation of a specific operation ID. Request takes no content, and on success returns a response with no content. Type: POST URI: /rest/serverengine/workflow/contentcreation/cancel/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Content Creation operation Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 344

    Service Version Returns the version of the Content Creation service. Type: GET URI: /rest/serverengine/workflow/contentcreation/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 345

    Content Item Entity Service The following table is a summary of the resources and methods available in the Content Item Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity/contentitems GET Get Data Record for Content Item /entity/contentitems/ {contentItemId}/datarecord GET Get Content Item Properties /entity/contentitems/ {contentItemId}/properties GET Update Content Item Properties /entity/contentitems/ {contentItemId}/properties PUT Update M

  • PAGE 346

    Service Handshake Queries the availability of the Content Item Entity service. Type: GET URI: /rest/serverengine/entity/contentitems Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 347

    Get Data Record for Content Item Returns the ID of the corresponding Data Record for a specific Content Item entity. Request takes no content, and on success returns a response containing a JSON Data Record Identifier for the Data Record of the Content Item. Type: GET URI: /rest/serverengine/entity/contentitems/{contentItemId}/datarecord Parameters: Path: l Request: Response: contentItemId – the ID of the Content Item entity in Server Add.

  • PAGE 348

    l 403 Forbidden – Server authentication has failed or expired Page 348

  • PAGE 349

    Get Content Item Properties Returns a list of the properties for a specific Content Item entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the properties for the Content Item. Type: GET URI: /rest/serverengine/entity/contentitems/{contentItemId}/properties Parameters: Path: l Request: Response: contentItemId – the ID of the Content Item entity in Server Add.

  • PAGE 350

    l 403 Forbidden – Server authentication has failed or expired Page 350

  • PAGE 351

    Update Content Item Properties Submits a request to update (and replace) the properties for a specific Content Item entity in the Server. Request takes a JSON Name/Value List as content (the Content Item ID and the new properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 352

    success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Content Item ID mismatch in JSON Page 352

  • PAGE 353

    Update Multiple Content Item Properties Submits a request to update one or more properties for one or more Content Item entities in the Server. Request takes JSON Name/Value Lists as content (each with the Content Item ID and the new properties), and on success returns a response containing no content. Type: PUT URI: /rest/serverengine/entity/contentitems/properties Parameters: – Request: Response: Add.

  • PAGE 354

    l 403 Forbidden – Server authentication has failed or expired Page 354

  • PAGE 355

    Service Version Returns the version of the Content Item Entity service. Type: GET URI: /rest/serverengine/entity/contentitems/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 356

    Content Set Entity Service The following table is a summary of the resources and methods available in the Content Set Entity service: Method Name Uniform Resource Identifier (URI) Method Type Get All Content Sets /entity/contentsets GET Get Content Items for Content Set /entity/contentsets/{contentSetId} GET Get Page Details for Content Set /entity/contentsets/{contentSetId}/pages GET Delete Content Set Entity /entity/contentsets/{contentSetId}/delete POST Get Content Set Properties /entity

  • PAGE 357

    Get All Content Sets Returns a list of all the Content Set entities currently contained within the Server. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Content Sets. Type: GET URI: /rest/serverengine/entity/contentsets Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 358

    Get Content Items for Content Set Returns a list of all the Content Item entities (and their corresponding Data Record entities) contained within a specific Content Set entity. Request takes no content, and on success returns a response containing a JSON Content Item Identifier List of all the Content Items in the Content Set. Type: GET URI: /rest/serverengine/entity/contentsets/{contentSetId} Parameters: Path: l Request: Response: contentSetId – the ID of the Content Set entity in Server Add.

  • PAGE 359

    l 403 Forbidden – Server authentication has failed or expired Page 359

  • PAGE 360

    Get Page Details for Content Set Returns the page details for a specific Content Set entity, as either a summary or a list (broken down by Content Item entity).

  • PAGE 361

    Content Set Content Type: application/json Status: l l l Response (Detail): 200 OK – Content Set entity page details successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Add.

  • PAGE 362

    Delete Content Set Entity Submits a request for a specific Content Set entity to be marked for deletion from the Server. Request takes no content, and on success returns a response containing the result of the request for deletion (“true” or “false”). Type: POST URI: /rest/serverengine/entity/contentsets/{contentSetId}/delete Parameters: Path: l Request: Response: contentSetId – the ID of the Content Set entity in Server Add.

  • PAGE 363

    l 403 Forbidden – Server authentication has failed or expired Page 363

  • PAGE 364

    Get Content Set Properties Returns a list of the properties for a specific Content Set entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the properties for the Content Set. Type: GET URI: /rest/serverengine/entity/contentsets/{contentSetId}/properties Parameters: Path: l Request: Response: contentSetId – the ID of the Content Set entity in Server Add.

  • PAGE 365

    l 403 Forbidden – Server authentication has failed or expired Page 365

  • PAGE 366

    Update Content Set Properties Submits a request to update (and replace) the properties for a specific Content Set entity in the Server. Request takes a JSON Name/Value List as content (the Content Set ID and the new properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 367

    success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Content Set ID mismatch in JSON Page 367

  • PAGE 368

    Service Version Returns the version of the Content Set Entity service. Type: GET URI: /rest/serverengine/entity/contentsets/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 369

    Data Record Entity Service The following table is a summary of the resources and methods available in the Data Record Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity/datarecords GET Add Data Records /entity/datarecords POST Get Data Record Values /entity/datarecords/ {dataRecordId}/values GET Update Data Record Values /entity/datarecords/ {dataRecordId}/values PUT Get Data Record Properties /entity/datarecords/ {dataRecordId}/properties G

  • PAGE 370

    Service Handshake Queries the availability of the Data Record Entity service. Type: GET URI: /rest/serverengine/entity/datarecords Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 371

    Add Data Records Submits a request to add one or more Data Record entities to one or more entities in the Server as either: l a Data Record of an existing Data Set entity in the Server, or l a nested Data Record in a Data Table of an existing Data Record entity in the Server Request takes JSON New Record Lists as content (each with the Data Set/Data Record ID, Data Table and the new records/values), and on success returns a response containing no content.

  • PAGE 372

    entities successfully added l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – JSON New Record Lists invalid or missing required structure Page 372

  • PAGE 373

    Get Data Record Values Returns a list of the values for a specific Data Record entity, and potentially the values of any nested Data Records (if recursive).

  • PAGE 374

    Response: Add. Headers: – Content: JSON Record Content List of the values for Data Record Content Type: application/json Status: l l l l Response (Explicit Types): 200 OK – Data Record entity values successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or invalid Data Record ID specified Add.

  • PAGE 375

    Update Data Record Values Submits a request to update one or more values for a specific Data Record entity in the Server. Request takes a JSON Record Content List (Fields Only) as content (the Data Record ID and the new values), and on success returns a response containing no content. Type: PUT URI: /rest/serverengine/entity/datarecords/{dataRecordId}/values Parameters: Path: l Request: Response: dataRecordId – the ID of the Data Record entity in Server Add.

  • PAGE 376

    l l 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Data Record ID mismatch in JSON Page 376

  • PAGE 377

    Get Data Record Properties Returns a list of the properties for a specific Data Record entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the properties for the Data Record. Type: GET URI: /rest/serverengine/entity/datarecords/{dataRecordId}/properties Parameters: Path: l Request: Response: dataRecordId – the ID of the Data Record entity in Server Add.

  • PAGE 378

    l 403 Forbidden – Server authentication has failed or expired Page 378

  • PAGE 379

    Update Data Record Properties Submits a request to update (and replace) the properties for a specific Data Record entity in the Server. Request takes a JSON Name/Value List as content (the Data Record ID and the new properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 380

    success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Data Record ID mismatch in JSON Page 380

  • PAGE 381

    Get Multiple Data Record Values Returns a list of the values for one or more Data Record entities, and potentially the values of any nested Data Records (if recursive). Request takes no content, and on success returns a response containing JSON Record Content Lists of all the values for each Data Record.

  • PAGE 382

    Status: l l l l 200 OK – Data Record entity values successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or invalid Data Record ID specified Page 382

  • PAGE 383

    Get Multiple Data Record Values (JSON) Returns a list of the values for one or more Data Record entities, and potentially the values of any nested Data Records (if recursive).

  • PAGE 384

    Type: Status: l l l l Response (Explicit Types): 200 OK – Data Record entity values successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or invalid Data Record ID specified Add.

  • PAGE 385

    Update Multiple Data Record Values Submits a request to update one or more values for one or more Data Record entities in the Server. Request takes JSON Record Content Lists (Fields Only) as content (each with the Data Record ID and the new values), and on success returns a response containing no content. Type: PUT URI: /rest/serverengine/entity/datarecords Parameters: – Request: Response: Add.

  • PAGE 386

    l 403 Forbidden – Server authentication has failed or expired Page 386

  • PAGE 387

    Update Multiple Data Record Properties Submits a request to update one or more properties for one or more Data Record entities in the Server. Request takes JSON Name/Value Lists as content (each with the Data Record ID and the new properties), and on success returns a response containing no content. Type: PUT URI: /rest/serverengine/entity/datarecords/properties Parameters: – Request: Response: Add.

  • PAGE 388

    l 403 Forbidden – Server authentication has failed or expired Page 388

  • PAGE 389

    Service Version Returns the version of the Data Record Entity service. Type: GET URI: /rest/serverengine/entity/datarecords/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 390

    Data Set Entity Service The following table is a summary of the resources and methods available in the Data Set Entity service: Method Name Uniform Resource Identifier (URI) Method Type Get All Data Sets /entity/datasets GET Get Data Records for Data Set /entity/datasets/{dataSetId} GET Delete Data Set Entity /entity/datasets/{dataSetId}/delete POST Get Data Set Properties /entity/datasets/{dataSetId}/properties GET Update Data Set Properties /entity/datasets/{dataSetId}/properties PUT Se

  • PAGE 391

    Get All Data Sets Returns a list of all the Data Set entities currently contained within the Server. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Data Sets. Type: GET URI: /rest/serverengine/entity/datasets Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 392

    Get Data Records for Data Set Returns a list of all the Data Record entities contained within a specific Data Set entity. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Data Records in the Data Set. Type: GET URI: /rest/serverengine/entity/datasets/{dataSetId} Parameters: Path: l Request: Response: dataSetId – the ID of the Data Set entity in Server Add.

  • PAGE 393

    Delete Data Set Entity Submits a request for a specific Data Set entity to be marked for deletion from the Server. Request takes no content, and on success returns a response containing the result of the request for deletion (“true” or “false”). Type: POST URI: /rest/serverengine/entity/datasets/{dataSetId}/delete Parameters: Path: l Request: Response: dataSetId – the ID of the Data Set entity in Server Add.

  • PAGE 394

    l 403 Forbidden – Server authentication has failed or expired Page 394

  • PAGE 395

    Get Data Set Properties Returns a list of the properties for a specific Data Set entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the properties for the Data Set. Type: GET URI: /rest/serverengine/entity/datasets/{dataSetId}/properties Parameters: Path: l Request: Response: dataSetId – the ID of the Data Set entity in Server Add.

  • PAGE 396

    l 403 Forbidden – Server authentication has failed or expired Page 396

  • PAGE 397

    Update Data Set Properties Submits a request to update (and replace) the properties for a specific Data Set entity in the Server. Request takes a JSON Name/Value List as content (the Data Set ID and the new properties), and on success returns a response containing the result of the request for update/replacement (“true”). Type: PUT URI: /rest/serverengine/entity/datasets/{dataSetId}/properties Parameters: Path: l Request: Response: dataSetId – the ID of the Data Set entity in Server Add.

  • PAGE 398

    success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Data Set ID mismatch in JSON Page 398

  • PAGE 399

    Service Version Returns the version of the Data Set Entity service. Type: GET URI: /rest/serverengine/entity/datasets/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 400

    Data Mapping Service The following table is a summary of the resources and methods available in the Data Mapping service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/datamining GET Process Data Mapping /workflow/datamining/{configId}/ {dataFileId} POST Process Data Mapping (JSON) /workflow/datamining/{configId} POST Process Data Mapping (PDF/VT to Data Set) /workflow/datamining/pdfvtds/ {dataFileId} POST Process Data Mapping (PDF/VT to Content Set)

  • PAGE 401

    Service Handshake Queries the availability of the Data Mapping service. Type: GET URI: /rest/serverengine/workflow/datamining Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 402

    Process Data Mapping Submits a request to initiate a new Data Mapping operation. Request takes no content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 403

    used to retrieve further information/cancel the operation Content: – Content Type: – Status: l l l l Response (Validate): Add.

  • PAGE 404

    Process Data Mapping (JSON) Submits a request to initiate a new Data Mapping operation. Request takes a JSON Identifier (Managed File) of the data file's Managed File ID or Name as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 405

    used to retrieve further information/cancel the operation Content: – Content Type: – Status: l l l l l Response (Validate): Add.

  • PAGE 406

    l 500 Internal Server Error – JSON Identifier bad or missing, or Data file or Data Mapping Configuration not found in File Store Page 406

  • PAGE 407

    Process Data Mapping (PDF/VT to Data Set) Submits a request to initiate a new Data Mapping operation using a PDF/VT data file specifically. No Data Mapping configuration is specified, and a Data Set will be created based on the default properties extracted from the metadata of the PDF/VT data file.

  • PAGE 408

    Content: – Content Type: – Status: l l l l 202 Accepted – Creation of new operation successful 400 Bad Request – PDF/VT data file not found in File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 408

  • PAGE 409

    Process Data Mapping (PDF/VT to Content Set) Submits a request to initiate a new Data Mapping operation using a PDF/VT data file specifically. No Data Mapping configuration or design template are specified, and a Content Set will be created based on the default properties extracted from the metadata of the PDF/VT data file.

  • PAGE 410

    Content: – Content Type: – Status: l l l l 202 Accepted – Creation of new operation successful 400 Bad Request – PDF/VT data file not found in File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 410

  • PAGE 411

    Get All Operations Returns a list of all the workflow operations actively running on the Server. Request takes no content, and on success returns a response containing a JSON Operations List of all the actively running operations. Type: GET URI: /rest/serverengine/workflow/datamining/getOperations Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 412

    Get Progress of Operation Retrieves the progress of a running Data Mapping operation of a specific operation ID. Request takes no content, and on success returns a response containing the current value of operation progress (values ranging from 0 – 100, followed by the value of 'done' on completion). Type: GET URI: /rest/serverengine/workflow/datamining/getProgress/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Data Mapping operation Add.

  • PAGE 413

    l 403 Forbidden – Server authentication has failed or expired Page 413

  • PAGE 414

    Get Result of Operation Retrieves the final result of a completed Data Mapping operation of a specific operation ID. Request takes no content, and on success returns a response containing the ID of the Data Set produced (or Content Set for a PDF/VT to Content Set specific data mapping operation). Alternatively, if the operation was to only validate the data mapping, then a response containing a JSON Data Mapping Validation Result will be returned instead.

  • PAGE 415

    successfully retrieved l l Response (Validate): 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Add.

  • PAGE 416

    Cancel an Operation Requests the cancellation of a running Data Mapping operation of a specific operation ID. Request takes no content, and on success returns a response with no content. Type: POST URI: /rest/serverengine/workflow/datamining/cancel/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Data Mapping operation Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 417

    Service Version Returns the version of the Data Mapping service. Type: GET URI: /rest/serverengine/workflow/datamining/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 418

    Document Entity Service The following table is a summary of the resources and methods available in the Document Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity/documents GET Get Document Metadata Properties /entity/documents/ {documentId}/metadata GET Update Document Metadata Properties /entity/documents/ {documentId}/metadata PUT Service Version /entity/documents/version GET Page 418

  • PAGE 419

    Service Handshake Queries the availability of the Document Entity service. Type: GET URI: /rest/serverengine/entity/documents Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 420

    Get Document Metadata Properties Returns a list of the metadata properties for a specific Document entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the metadata properties for the Document. Type: GET URI: /rest/serverengine/entity/documents/{documentId}/metadata Parameters: Path: l Request: Response: documentId – the ID of the Document entity in Server Add.

  • PAGE 421

    l 403 Forbidden – Server authentication has failed or expired Page 421

  • PAGE 422

    Update Document Metadata Properties Submits a request to update (and replace) the metadata properties for a specific Document entity in the Server. Request takes a JSON Name/Value List as content (the Document ID and the new metadata properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 423

    successfully requested (response of “true” for success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Document ID mismatch in JSON Page 423

  • PAGE 424

    Service Version Returns the version of the Document Entity service. Type: GET URI: /rest/serverengine/entity/documents/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 425

    Document Set Entity Service The following table is a summary of the resources and methods available in the Document Set Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity/documentsets GET Get Documents for Document Set /entity/documentsets/{documentSetId} GET Get Document Set Metadata Properties /entity/documentsets/ {documentSetId}/metadata GET Update Document Set Metadata Properties /entity/documentsets/ {documentSetId}/metadata PUT Service

  • PAGE 426

    Service Handshake Queries the availability of the Document Set Entity service. Type: GET URI: /rest/serverengine/entity/documentsets Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 427

    Get Documents for Document Set Returns a list of all the Document entities contained within a specific Document Set entity. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Documents in the Document Set. Type: GET URI: /rest/serverengine/entity/documentsets/{documentSetId} Parameters: Path: l Request: Response: documentSetId – the ID of the Document Set entity in Server Add.

  • PAGE 428

    l 403 Forbidden – Server authentication has failed or expired Page 428

  • PAGE 429

    Get Document Set Metadata Properties Returns a list of the metadata properties for a specific Document Set entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the metadata properties for the Document Set. Type: GET URI: /rest/serverengine/entity/documentsets/{documentSetId}/metadata Parameters: Path: l Request: Response: documentSetId – the ID of the Document Set entity in Server Add.

  • PAGE 430

    l 403 Forbidden – Server authentication has failed or expired Page 430

  • PAGE 431

    Update Document Set Metadata Properties Submits a request to update (and replace) the metadata properties for a specific Document Set entity in the Server. Request takes a JSON Name/Value List as content (the Document Set ID and the new metadata properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 432

    properties successfully requested (response of “true” for success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Document Set ID mismatch in JSON Page 432

  • PAGE 433

    Service Version Returns the version of the Document Set Entity service. Type: GET URI: /rest/serverengine/entity/documentsets/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 434

    Content Creation (Email) Service The following table is a summary of the resources and methods available in the Content Creation (Email) service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/contentcreation/email GET Process Content Creation (By Data Record) (JSON) /workflow/contentcreation/email/{templateId} POST Process Content Creation (By Data) (JSON) /workflow/contentcreation/email/{templateId} POST Get All Operations /workflow/contentcreation/emai

  • PAGE 435

    Service Handshake Queries the availability of the Content Creation (Email) service. Type: GET URI: /rest/serverengine/workflow/contentcreation/email Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 436

    Process Content Creation (By Data Record) (JSON) Submits a request to initiate a new Content Creation (Email) operation. Request takes a JSON Identifier List (with Email Parameters) of Data Record IDs as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 437

    l Content: – Content Type: – Status: l l l l Link – Contains multiple link URLs that can be used to retrieve further information/cancel the operation 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template or Data Record entity not found in File Store/Server Page 437

  • PAGE 438

    Process Content Creation (By Data) (JSON) Submits a request to initiate a new Content Creation (Email) operation. Request takes a JSON Record Data List (with Email Parameters) of the data values for one or more Data Records as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 439

    l Content: – Content Type: – Status: l l l l Link – Contains multiple link URLs that can be used to retrieve further information/cancel the operation 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store Page 439

  • PAGE 440

    Get All Operations Returns a list of all the workflow operations actively running on the Server. Request takes no content, and on success returns a response containing a JSON Operations List of all the actively running operations. Type: GET URI: /rest/serverengine/workflow/contentcreation/email/getOperations Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 441

    Get Progress of Operation Retrieves the progress of a running Content Creation (Email) operation of a specific operation ID. Request takes no content, and on success returns a response containing the current value of operation progress (values ranging from 0 – 100, followed by the value of 'done' on completion).

  • PAGE 442

    retrieved l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 442

  • PAGE 443

    Get Result of Operation Retrieves the final result of a completed Content Creation (Email) operation of a specific operation ID. Request takes no content, and on success returns a response containing a report on the number of emails that were successfully sent. Type: POST URI: /rest/serverengine/workflow/contentcreation/email/getResult/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Content Creation (Email) operation Add.

  • PAGE 444

    l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 444

  • PAGE 445

    Cancel an Operation Requests the cancellation of a running Content Creation (Email) operation of a specific operation ID. Request takes no content, and on success returns a response with no content. Type: POST URI: /rest/serverengine/workflow/contentcreation/email/cancel/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Content Creation (Email) operation Add.

  • PAGE 446

    l 403 Forbidden – Server authentication has failed or expired Page 446

  • PAGE 447

    Service Version Returns the version of the Content Creation (Email) service. Type: GET URI: /rest/serverengine/workflow/contentcreation/email/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 448

    Entity Service The following table is a summary of the resources and methods available in the Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity GET Find Data Entity /entity/find PUT Service Version /entity/version GET Page 448

  • PAGE 449

    Service Handshake Queries the availability of the Entity service. Type: GET URI: /rest/serverengine/entity Parameters: – Requs Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 450

    Find Data Entity Submits data entity search criteria to the PlanetPress Connect Server. Request takes a JSON Search Parameters structure as content and on success returns a response containing JSON Identifier Lists (with Sort Key) of the data entity IDs matching the search criteria. Type: PUT URI: /rest/serverengine/entity/find Parameters: – Request: Response: Add.

  • PAGE 451

    l l 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Invalid JSON structure specified Page 451

  • PAGE 452

    Service Version Returns the version of the Entity service. Type: GET URI: /rest/serverengine/entity/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 453

    File Store Service The following table is a summary of the resources and methods available in the File Store service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /filestore GET Download Managed File or Directory /filestore/file/{fileId} GET Delete Managed File or Directory /filestore/delete/{fileId} GET Upload Data Mapping Configuration /filestore/DataMiningConfig POST Upload Job Creation Preset /filestore/JobCreationConfig POST Upload Data File /filestore

  • PAGE 454

    Service Handshake Queries the availability of the File Store service. Type: GET URI: /rest/serverengine/filestore Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 455

    Download Managed File or Directory Obtains an existing file or directory of a specific Managed File ID (or Name) from the File Store. Request takes no content, and on success returns a response containing the file or directory data (as zipped file). Type: GET URI: /rest/serverengine/filestore/file/{fileId} Parameters: Path: l Request: Response: fileId – the Managed File ID (or Name) of the file or directory in File Store Add.

  • PAGE 456

    Status: l l l l 200 OK – File or directory successfully downloaded from File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – File or directory not found in File Store Page 456

  • PAGE 457

    Delete Managed File or Directory Removes an existing file or directory of a specific Managed File ID (or Name) from the File Store. Request takes no content, and on success returns a response containing the result of the request for removal (“true” or “false”). Type: GET URI: /rest/serverengine/filestore/delete/{fileId} Parameters: Path: l Request: Response: fileId – the Managed File ID (or Name) of the file or directory in File Store Add.

  • PAGE 458

    success or “false” for failure) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – File or directory not found in File Store Page 458

  • PAGE 459

    Upload Data Mapping Configuration Submits a Data Mapping configuration to the File Store. Request takes binary file data as content, and on success returns a response containing the new Managed File ID for the configuration.

  • PAGE 460

    File Store l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 460

  • PAGE 461

    Upload Job Creation Preset Submits a Job Creation preset to the File Store. Request takes XML file data as content, and on success returns a response containing the new Managed File ID for the preset. Type: POST URI: /rest/serverengine/filestore/JobCreationConfig Parameters: Query: l l Request: Response: filename – the file name of the preset to be uploaded (No Default Value) persistent – whether the preset to be uploaded will be persistent in File Store (Default Value: false) Add.

  • PAGE 462

    Store l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 462

  • PAGE 463

    Upload Data File Submits a data file to the File Store. Request takes binary file data as content, and on success returns a response containing the new Managed File ID for the data file. Type: POST URI: /rest/serverengine/filestore/DataFile Parameters: Query: l l Request: Response: filename – the file name of the data file to be uploaded (No Default Value) persistent – whether the data file to be uploaded will be persistent in File Store (Default Value: false) Add.

  • PAGE 464

    Store l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 464

  • PAGE 465

    Upload Design Template Submits a design template to the File Store. Request takes zipped file data as content, and on success returns a response containing the new Managed File ID for the design template. Type: POST URI: /rest/serverengine/filestore/template Parameters: Query: l l Request: Response: filename – the file name of the design template to be uploaded (No Default Value) persistent – whether the design template to be uploaded will be persistent in File Store (Default Value: false) Add.

  • PAGE 466

    Store l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 466

  • PAGE 467

    Upload Output Creation Preset Submits an Output Creation preset to the File Store. Request takes XML file data as content, and on success returns a response containing the new Managed File ID for the preset. Type: POST URI: /rest/serverengine/filestore/OutputCreationConfig Parameters: Query: l l Request: Response: filename – the file name of the preset to be uploaded (No Default Value) persistent – whether the preset to be uploaded will be persistent in File Store (Default Value: false) Add.

  • PAGE 468

    Store l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 468

  • PAGE 469

    Service Version Returns the version of the File Store service. Type: GET URI: /rest/serverengine/filestore/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 470

    Content Creation (HTML) Service The following table is a summary of the resources and methods available in the Content Creation (HTML) service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/contentcreation/html GET Process Content Creation (By Data Record) /workflow/contentcreation/html/ {templateId}/{dataRecordId: [0-9]+} GET Process Content Creation (By Data Record) (JSON) /workflow/contentcreation/html/ {templateId}/{dataRecordId: [0-9]+} POST Process

  • PAGE 471

    Service Handshake Queries the availability of the Content Creation (HTML) service. Type: GET URI: /rest/serverengine/workflow/contentcreation/html Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 472

    Process Content Creation (By Data Record) Submits a request to create new HTML content for the Web context. Request takes no content, and on success returns a response containing the HTML output produced, specific to the Data Record and section specified.

  • PAGE 473

    Content: HTML output for the Data Record Content Type: text/html Status: l 200 OK – Output created successfully l 401 Unauthorized – Server authentication required l l l 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template or Data Record entity not found in File Store/Server 500 Internal Server Error – Content Creation Error: Data Record not found / Web context in template not found Page 473

  • PAGE 474

    Process Content Creation (By Data Record) (JSON) Submits a request to create new HTML content for the Web context. Request takes a JSON HTML Parameters List as content, and on success returns a response containing the HTML output produced, specific to the Data Record specified.

  • PAGE 475

    Status: l 200 OK – Output created successfully l 401 Unauthorized – Server authentication required l l l 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template or Data Record entity not found in File Store/Server 500 Internal Server Error – Content Creation Error: Data Record not found / Web context in template not found Page 475

  • PAGE 476

    Process Content Creation (By Data) (JSON) Submits a request to create new HTML content for the Web context. Request takes a JSON Record Data List of the data values for the Data Record as content, and on success returns a response containing the HTML output produced, specific to the record data specified.

  • PAGE 477

    Content: HTML output for the Data Record Content Type: text/html Status: l 200 OK – Output created successfully l 401 Unauthorized – Server authentication required l l l 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store 500 Internal Server Error – Content Creation Error: Web context in template not found Page 477

  • PAGE 478

    Process Content Creation (No Data) Submits a request to create new HTML content for the Web context. Request takes no content, and on success returns a response containing the HTML output produced, using only the design template and no input data.

  • PAGE 479

    Content Type: Status: text/html l 200 OK – Output created successfully l 401 Unauthorized – Server authentication required l l l 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store 500 Internal Server Error – Content Creation Error: Web context in template not found Page 479

  • PAGE 480

    Get Template Resource Submits a request to retrieve a resource from a design template stored in the File Store. Request takes no content, and on success returns a response containing the resource from the design template. Type: GET URI: /rest/serverengine/workflow/contentcreation/html/{templateId}/{relPath: .

  • PAGE 481

    l l l l l 400 Bad Request – Unable to open resource within template or resource doesn’t exist 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Design template not found in File Store 500 Internal Server Error – Unable to open template or template doesn’t exist Page 481

  • PAGE 482

    Service Version Returns the version of the Content Creation (HTML) service. Type: GET URI: /rest/serverengine/workflow/contentcreation/html/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 483

    Job Creation Service The following table is a summary of the resources and methods available in the Job Creation service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/jobcreation GET Process Job Creation /workflow/jobcreation/{configId} POST Process Job Creation (JSON) /workflow/jobcreation/{configId} POST Process Job Creation (JSON Job Set Structure) /workflow/jobcreation POST Get All Operations /workflow/jobcreation/getOperations GET Get Progress

  • PAGE 484

    Service Handshake Queries the availability of the Job Creation service. Type: GET URI: /rest/serverengine/workflow/jobcreation Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 485

    Process Job Creation Submits a request to initiate a new Job Creation operation. Request takes no content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation. Type: POST URI: /rest/serverengine/workflow/jobcreation/{configId} Parameters: Path: l Request: Response: configId – the Managed File ID (or Name) of the Job Creation Preset in File Store Add.

  • PAGE 486

    Status: l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Job Creation Preset not found in File Store Page 486

  • PAGE 487

    Process Job Creation (JSON) Submits a request to initiate a new Job Creation operation. Request takes a JSON Identifier List of Content Set IDs as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 488

    Type: Status: l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Job Creation Preset or Content Set entity not found in File Store/Server Page 488

  • PAGE 489

    Process Job Creation (JSON Job Set Structure) Submits a request to initiate a new Job Creation operation. Request takes a JSON Job Set Structure containing a list of Content Items as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation. Type: POST URI: /rest/serverengine/workflow/jobcreation Parameters: – Request: Response: Add.

  • PAGE 490

    Status: l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 490

  • PAGE 491

    Get All Operations Returns a list of all the workflow operations actively running on the Server. Request takes no content, and on success returns a response containing a JSON Operations List of all the actively running operations. Type: GET URI: /rest/serverengine/workflow/jobcreation/getOperations Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 492

    Get Progress of Operation Retrieves the progress of a running Job Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing the current value of operation progress (values ranging from 0 – 100, followed by the value of 'done' on completion). Type: GET URI: /rest/serverengine/workflow/jobcreation/getProgress/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Job Creation operation Add.

  • PAGE 493

    l 403 Forbidden – Server authentication has failed or expired Page 493

  • PAGE 494

    Get Result of Operation Retrieves the final result of a completed Job Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing the ID of the Job Set produced. Type: POST URI: /rest/serverengine/workflow/jobcreation/getResult/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Job Creation operation Add.

  • PAGE 495

    l 403 Forbidden – Server authentication has failed or expired Page 495

  • PAGE 496

    Cancel an Operation Requests the cancellation of a running Job Creation operation of a specific operation ID. Request takes no content, and on success returns a response with no content. Type: POST URI: /rest/serverengine/workflow/jobcreation/cancel/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Job Creation operation Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 497

    Service Version Returns the version of the Job Creation service. Type: GET URI: /rest/serverengine/workflow/jobcreation/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 498

    Job Entity Service The following table is a summary of the resources and methods available in the Job Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity/jobs GET Get Content Items for Job /entity/jobs/{jobId}/contents GET Get Job Segments for Job /entity/jobs/{jobId} GET Get Job Metadata Properties /entity/jobs/{jobId}/metadata GET Update Job Metadata Properties /entity/jobs/{jobId}/metadata PUT Get Job Properties /entity/jobs/{jobId}/prop

  • PAGE 499

    Service Handshake Queries the availability of the Job Entity service. Type: GET URI: /rest/serverengine/entity/jobs Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 500

    Get Content Items for Job Returns a list of all the Content Item entities (and their corresponding Data Record entities) contained within a specific Job entity. Request takes no content, and on success returns a response containing a JSON Content Item Identifier List of all the Content Items for the Job. Type: GET URI: /rest/serverengine/entity/jobs/{jobId}/contents Parameters: Path: l Request: Response: jobId – the ID of the Job entity in Server Add.

  • PAGE 501

    l 403 Forbidden – Server authentication has failed or expired Page 501

  • PAGE 502

    Get Job Segments for Job Returns a list of all the Job Segment entities contained within a specific Job entity. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Job Segments in the Job. Type: GET URI: /rest/serverengine/entity/jobs/{jobId} Parameters: Path: l Request: Response: jobId – the ID of the Job entity in Server Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 503

    Get Job Metadata Properties Returns a list of the metadata properties for a specific Job entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the metadata properties for the Job. Type: GET URI: /rest/serverengine/entity/jobs/{jobId}/metadata Parameters: Path: l Request: Response: jobId – the ID of the Job entity in Server Add.

  • PAGE 504

    l 403 Forbidden – Server authentication has failed or expired Page 504

  • PAGE 505

    Update Job Metadata Properties Submits a request to update (and replace) the metadata properties for a specific Job entity in the Server. Request takes a JSON Name/Value List as content (the Job ID and the new metadata properties), and on success returns a response containing the result of the request for update/replacement (“true”). Type: PUT URI: /rest/serverengine/entity/jobs/{jobId}/metadata Parameters: Path: l Request: Response: jobId – the ID of the Job entity in Server Add.

  • PAGE 506

    success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Job ID mismatch in JSON Page 506

  • PAGE 507

    Get Job Properties Returns a list of the properties for a specific Job entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the properties for the Job. Type: GET URI: /rest/serverengine/entity/jobs/{jobId}/properties Parameters: Path: l Request: Response: jobId – the ID of the Job entity in Server Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 508

    l 403 Forbidden – Server authentication has failed or expired Page 508

  • PAGE 509

    Update Job Properties Submits a request to update (and replace) the properties for a specific Job entity in the Server. Request takes a JSON Name/Value List as content (the Job ID and the new properties), and on success returns a response containing the result of the request for update/replacement (“true”). Type: PUT URI: /rest/serverengine/entity/jobs/{jobId}/properties Parameters: Path: l Request: Response: jobId – the ID of the Job entity in Server Add.

  • PAGE 510

    l l 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Job ID mismatch in JSON Page 510

  • PAGE 511

    Update Multiple Job Properties Submits a request to update one or more properties for one or more Job entities in the Server. Request takes JSON Name/Value Lists as content (each with the Job ID and the new properties), and on success returns a response containing no content. Type: PUT URI: /rest/serverengine/entity/jobs/properties Parameters: – Request: Response: Add.

  • PAGE 512

    Service Version Returns the version of the Job Entity service. Type: GET URI: /rest/serverengine/entity/jobs/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 513

    Job Segment Entity Service The following table is a summary of the resources and methods available in the Job Segment Entity service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /entity/jobsegments GET Get Document Sets for Job Segment /entity/jobsegments/{jobSegmentId} GET Get Job Segment Metadata Properties /entity/jobsegments/ {jobSegmentId}/metadata GET Update Job Segment Metadata Properties /entity/jobsegments/ {jobSegmentId}/metadata PUT Service Version

  • PAGE 514

    Service Handshake Queries the availability of the Job Segment Entity service. Type: GET URI: /rest/serverengine/entity/jobsegments Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 515

    Get Document Sets for Job Segment Returns a list of all the Document Set entities contained within a specific Job Segment entity. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Document Sets in the Job Segment. Type: GET URI: /rest/serverengine/entity/jobsegments/{jobSegmentId} Parameters: Path: l Request: Response: jobSegmentId – the ID of the Job Segment entity in Server Add.

  • PAGE 516

    l 403 Forbidden – Server authentication has failed or expired Page 516

  • PAGE 517

    Get Job Segment Metadata Properties Returns a list of the metadata properties for a specific Job Segment entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the metadata properties for the Job Segment. Type: GET URI: /rest/serverengine/entity/jobsegments/{jobSegmentId}/metadata Parameters: Path: l Request: Response: jobSegmentId – the ID of the Job Segment entity in Server Add.

  • PAGE 518

    l 403 Forbidden – Server authentication has failed or expired Page 518

  • PAGE 519

    Update Job Segment Metadata Properties Submits a request to update (and replace) the metadata properties for a specific Job Segment entity in the Server. Request takes a JSON Name/Value List as content (the Job Segment ID and the new metadata properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 520

    properties successfully requested (response of “true” for success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Job Segment ID mismatch in JSON Page 520

  • PAGE 521

    Service Version Returns the version of the Job Segment Entity service. Type: GET URI: /rest/serverengine/entity/jobsegments/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 522

    Job Set Entity Service The following table is a summary of the resources and methods available in the Job Set Entity service: Method Name Uniform Resource Identifier (URI) Method Type Get All Job Sets /entity/jobsets GET Get Jobs for Job Set /entity/jobsets/{jobSetId} GET Delete Job Set Entity /entity/jobsets/{jobSetId}/delete POST Get Job Set Metadata Properties /entity/jobsets/{jobSetId}/metadata GET Update Job Set Metadata Properties /entity/jobsets/{jobSetId}/metadata PUT Get Job Set

  • PAGE 523

    Get All Job Sets Returns a list of all the Job Set entities currently contained within the Server. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Job Sets. Type: GET URI: /rest/serverengine/entity/jobsets Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 524

    Get Jobs for Job Set Returns a list of all the Job entities contained within a specific Job Set entity. Request takes no content, and on success returns a response containing a JSON Identifier List of all the Jobs in the Job Set. Type: GET URI: /rest/serverengine/entity/jobsets/{jobSetId} Parameters: Path: l Request: Response: jobSetId – the ID of the Job Set entity in Server Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 525

    Delete Job Set Entity Submits a request for a specific Job Set entity to be marked for deletion from the Server. Request takes no content, and on success returns a response containing the result of the request for deletion (“true” or “false”). Type: POST URI: /rest/serverengine/entity/jobsets/{jobSetId}/delete Parameters: Path: l Request: Response: jobSetId – the ID of the Job Set entity in Server Add.

  • PAGE 526

    l 403 Forbidden – Server authentication has failed or expired Page 526

  • PAGE 527

    Get Job Set Metadata Properties Returns a list of the metadata properties for a specific Job Set entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the metadata properties for the Job Set. Type: GET URI: /rest/serverengine/entity/jobsets/{jobSetId}/metadata Parameters: Path: l Request: Response: jobSetId – the ID of the Job Set entity in Server Add.

  • PAGE 528

    l 403 Forbidden – Server authentication has failed or expired Page 528

  • PAGE 529

    Update Job Set Metadata Properties Submits a request to update (and replace) the metadata properties for a specific Job Set entity in the Server. Request takes a JSON Name/Value List as content (the Job Set ID and the new metadata properties), and on success returns a response containing the result of the request for update/replacement (“true”).

  • PAGE 530

    successfully requested (response of “true” for success) l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Job Set ID mismatch in JSON Page 530

  • PAGE 531

    Get Job Set Properties Returns a list of the properties for a specific Job Set entity. Request takes no content, and on success returns a response containing a JSON Name/Value List (Properties Only) of all the properties for the Job Set. Type: GET URI: /rest/serverengine/entity/jobsets/{jobSetId}/properties Parameters: Path: l Request: Response: jobSetId – the ID of the Job Set entity in Server Add.

  • PAGE 532

    l 403 Forbidden – Server authentication has failed or expired Page 532

  • PAGE 533

    Update Job Set Properties Submits a request to update (and replace) the properties for a specific Job Set entity in the Server. Request takes a JSON Name/Value List as content (the Job Set ID and the new properties), and on success returns a response containing the result of the request for update/replacement (“true”). Type: PUT URI: /rest/serverengine/entity/jobsets/{jobSetId}/properties Parameters: Path: l Request: Response: jobSetId – the ID of the Job Set entity in Server Add.

  • PAGE 534

    l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Job Set ID mismatch in JSON Page 534

  • PAGE 535

    Service Version Returns the version of the Job Set Entity service. Type: GET URI: /rest/serverengine/entity/jobsets/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 536

    Output Creation Service The following table is a summary of the resources and methods available in the Output Creation service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/outputcreation GET Process Output Creation /workflow/outputcreation/{configId}/ {jobSetId} POST Process Output Creation (JSON) /workflow/outputcreation/{configId} POST Process Output Creation (By Job) (JSON) /workflow/outputcreation/{configId}/jobs POST Run +PReS Enhance Workflow C

  • PAGE 537

    Service Handshake Queries the availability of the Output Creation service. Type: GET URI: /rest/serverengine/workflow/outputcreation Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 538

    Process Output Creation Submits a request to initiate a new Output Creation operation. Request takes no content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 539

    Type: Status: l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Output Creation Preset or Job Set entity not found in File Store/Server Page 539

  • PAGE 540

    Process Output Creation (JSON) Submits a request to initiate a new Output Creation operation. Request takes a JSON Identifier (with Output Parameters) of the Job Set ID as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 541

    Content Type: Status: – l l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Output Creation Preset or Job Set entity not found in File Store/Server 500 Internal Server Error – JSON Identifier invalid or missing required structure Page 541

  • PAGE 542

    Process Output Creation (By Job) (JSON) Submits a request to initiate a new Output Creation operation. Request takes a JSON Identifier List (with Output Parameters) of the Job IDs as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation.

  • PAGE 543

    Content Type: Status: – l l l l l 202 Accepted – Creation of new operation successful 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 404 Not Found – Output Creation Preset or Job entity not found in File Store/Server 500 Internal Server Error – JSON Identifier List invalid or missing required structure Page 543

  • PAGE 544

    Run +PReS Enhance Workflow Configuration Submits a request to run a +PReS Enhance workflow configuration via the Weaver engine directly, using a list of command-line arguments. Request takes no content, and on success returns a response containing the result of the request to run/execute the workflow configuration.

  • PAGE 545

    Response: Add.

  • PAGE 546

    Get All Operations Returns a list of all the workflow operations actively running on the Server. Request takes no content, and on success returns a response containing a JSON Operations List of all the actively running operations. Type: GET URI: /rest/serverengine/workflow/outputcreation/getOperations Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 547

    Get Progress of Operation Retrieves the progress of a running Output Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing the current value of operation progress (values ranging from 0 – 100, followed by the value of 'done' on completion). Type: GET URI: /rest/serverengine/workflow/outputcreation/getProgress/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Output Creation operation Add.

  • PAGE 548

    l 403 Forbidden – Server authentication has failed or expired Page 548

  • PAGE 549

    Get Result of Operation Retrieves the final result of a completed Output Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing either the absolute paths of the final output files produced (multiple spool files) or the content of a final output file (single spool file).

  • PAGE 550

    l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 550

  • PAGE 551

    Get Result of Operation (as Text) Retrieves the final result of a completed Output Creation operation of a specific operation ID. Request takes no content, and on success returns a response containing the absolute path or paths of the final output file or files produced (single or multiple spool files respectively).

  • PAGE 552

    l 403 Forbidden – Server authentication has failed or expired Page 552

  • PAGE 553

    Cancel an Operation Requests the cancellation of a running Output Creation operation of a specific operation ID. Request takes no content, and on success returns a response with no content. Type: POST URI: /rest/serverengine/workflow/outputcreation/cancel/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Output Creation operation Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 554

    Service Version Returns the version of the Output Creation service. Type: GET URI: /rest/serverengine/workflow/outputcreation/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 555

    All-In-One Service The following table is a summary of the resources and methods available in the All-In-One service: Method Name Uniform Resource Identifier (URI) Method Type Service Handshake /workflow/print GET Process All-In-One (JSON) /workflow/print/submit POST Process All-In-One (Adhoc Data) /workflow/print/{dmConfigId}/{templateId}/ {jcConfigId}/{ocConfigId} POST Get All Operations /workflow/print/getOperations GET Get Progress of Operation /workflow/print/getProgress/{operationId}

  • PAGE 556

    Service Handshake Queries the availability of the All-In-One service. Type: GET URI: /rest/serverengine/workflow/print Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 557

    Process All-In-One (JSON) Submits a request to initiate a new All-In-One operation. Request takes a JSON All-In-One Configuration as content, and on success returns a response containing additional headers that specify the ID of the new operation as well as link URLs that can be used to retrieve further information/cancel the operation. Type: POST URI: /rest/serverengine/workflow/print/submit Parameters: – Request: Response: Add.

  • PAGE 558

    successful l l l l 400 Bad Request – Required Input resource/file not found in File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – General error with running the All-In-One Process or a Specific error relating to an individual workflow process (see error description) Page 558

  • PAGE 559

    Process All-In-One (Adhoc Data) Submits a request to initiate a new All-In-One operation using pre-existing inputs, with the exception of input data, which is submitting along with the request.

  • PAGE 560

    Value: true) l l l l Request: Response: resultAsTxt – whether to retrieve the result as text (Synchronous Only) (Default Value: false) createOnly – whether output is to be only created in the server and not sent to it's final destination (Default Value: false) printRange – a specific range of records in the input data file to restrict the print output to (No Default Value) filename – the file name of the data file to be uploaded (No Default Value) Add.

  • PAGE 561

    and/or Name(s) specified l l l Response (Synchronous): 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – General error with running the All-In-One Process or a Specific error relating to the uploading of the data file or an individual workflow process (see error description) Add.

  • PAGE 562

    Response (Synchronous + Get Result as Text): Add.

  • PAGE 563

    Get All Operations Returns a list of all the workflow operations actively running on the Server. Request takes no content, and on success returns a response containing a JSON Operations List of all the actively running operations. Type: GET URI: /rest/serverengine/workflow/print/getOperations Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 564

    Get Progress of Operation Retrieves the progress of a running All-In-One operation of a specific operation ID. Request takes no content, and on success returns a response containing the current value of operation progress (values ranging from 0 – 100, followed by the value of 'done' on completion). Type: GET URI: /rest/serverengine/workflow/print/getProgress/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of All-In-One operation Add.

  • PAGE 565

    l 403 Forbidden – Server authentication has failed or expired Page 565

  • PAGE 566

    Get Result of Operation Retrieves the final result of a completed All-In-One operation of a specific operation ID. Request takes no content, and on success returns a response (depending on the All-In-One configuration) containing either: l l the ID of the Data Set, Content Set or Job Set entity produced, or the absolute paths of the final output files produced (multiple spool files) or the content of a final output file (single spool file).

  • PAGE 567

    Content Type: Status: application/octet-stream l l l 200 OK – Result of completed operation successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 567

  • PAGE 568

    Get Result of Operation (as Text) Retrieves the final result of a completed All-In-One operation of a specific operation ID. Request takes no content, and on success returns a response (depending on the All-In-One configuration) containing either: l l the ID of the Data Set, Content Set or Job Set entity produced, or the absolute path or paths of the final output file or files produced (single or multiple spool files respectively).

  • PAGE 569

    Content Type: Status: text/plain l l l 200 OK – Result of completed operation successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 569

  • PAGE 570

    Cancel an Operation Requests the cancellation of a running All-In-One operation of a specific operation ID. Request takes no content, and on success returns a response with no content. Type: POST URI: /rest/serverengine/workflow/print/cancel/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of All-In-One operation Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 571

    Service Version Returns the version of the All-In-One service. Type: GET URI: /rest/serverengine/workflow/print/version Parameters: – Request: Response: Add. Headers: auth_token – Authorization Token (if server security settings enabled) Content: – Content Type: – Add.

  • PAGE 572

    Copyright Information Copyright © 1994–2018 Objectif Lune Inc. All Rights Reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any other language or computer language in whole or in part, in any form or by any means, whether it be electronic, mechanical, magnetic, optical, manual or otherwise, without prior written consent of Objectif Lune Inc. Objectif Lune Inc.

  • PAGE 573

    Legal Notices and Acknowledgements PlanetPress Connect, Copyright © 2018, Objectif Lune Inc. All rights reserved. This guide uses the following third party components: l l jQuery Library Copyright © JS Foundation and other contributors. This is distributed under the terms of the Massachusetts Institute of Technology (MIT) license. QUnit Library Copyright © JS/jQuery Foundation and other contributors. This is distributed under the terms of the Massachusetts Institute of Technology (MIT) license.

  • PAGE 574