1.5

REST API Cookbook with
Working Examples
Version:1.5

Summary of content (400 pages)

Options
Actions
JavaScript/jQuery fs-datamapper-upload.

  • PAGE 55

    named = $("#named").is(":checked"), persistent = $("#persistent").is(":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) { displayStatus("Request Successful"); displayInfo("Data Mapping Configuration '" + file.

  • PAGE 56

    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 57

    files are uploaded to the file store under the same name, then only the most recently 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.

  • PAGE 58

    Lastly, the settings object is passed as an argument to the jQuery AJAX function ajax and the request is executed. 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.

  • PAGE 59

    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 60

    Options
    Actions
    JavaScript/jQuery fs-designtemplate-upload.

  • PAGE 61

    persistent = $("#persistent").is(":checked"); 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) { displayStatus("Request Successful"); displayInfo("Design Template '" + file.name + "' Uploaded Successfully"); displayResult("Managed File ID", response); }).

  • PAGE 62

    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 63

    uploaded file will be associated with (or can be referenced using) that name. 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.

  • PAGE 64

    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 design template in the file store. Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 65

    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 66

    Options
    Actions
    JavaScript/jQuery fs-jcpreset-upload.

  • PAGE 67

    persistent = $("#persistent").is(":checked"); 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) { displayStatus("Request Successful"); displayInfo("Job Creation Preset '" + file.name + "' Uploaded Successfully"); displayResult("Managed File ID", response); }).

  • PAGE 68

    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 69

    uploaded file will be associated with (or can be referenced using) that name. 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.

  • PAGE 70

    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 job creation preset in the file store. Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 71

    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 72

    Options
    Actions
    JavaScript/jQuery fs-ocpreset-upload.

  • PAGE 73

    persistent = $("#persistent").is(":checked"); 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) { displayStatus("Request Successful"); displayInfo("Output Creation Preset '" + file.name + "' Uploaded Successfully"); displayResult("Managed File ID", response); }).

  • PAGE 74

    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 75

    uploaded file will be associated with (or can be referenced using) that name. 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 76

    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 output creation preset in the file store. Further Reading See the File Store Service page of the REST API Reference section for further detail.

  • PAGE 77

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

  • PAGE 78

    Finding all the Data Sets in the Server Problem You want to obtain a list of all the previously generated Data Sets contained in the PReS Connect Server potentially for use in a Content 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 Data Set Entity REST service: Get All Data Set Entities /rest/serverengine/entity/datasets GET Example HTML5 dse-get-all-datasets.

  • PAGE 79

    JavaScript/jQuery dse-get-all-datasets.js /* Data Set Entity Service - Get All Data Sets Example */ (function ($) { "use strict"; $(document).ready(function () { setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!checkSessionValid()) { return; } $.ajax({ type: "GET", url: "/rest/serverengine/entity/datasets" }).

  • PAGE 80

    Screenshot & Output Usage To run the example simply select the Submit button to request a list of the all the data 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 Data Set Entity Service page of the REST API Reference section for further detail.

  • PAGE 81

    Finding the Data Records in a Data Set Problem You want to obtain a list of all the previously generated Data Records contained within a specific Data Set potentially for use in a Content 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 Data Set Entity REST service: Get Data Records for Data Set /rest/serverengine/entity/datasets/{dataSetId} GET Example HTML5 dse-get-datarecords.

  • PAGE 82

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

  • PAGE 83

    }); }); }(jQuery)); 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 84

    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 85

    Finding all the Content Sets in the Server Problem You want to obtain a list of all the previously generated Content Sets contained in the PReS 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 Set Entities /rest/serverengine/entity/contentsets GET Example HTML5 cse-get-all-contentsets.

  • PAGE 86

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

  • PAGE 87

    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 88

    Finding the Content Items in a Content Set Problem You want to obtain a list of all the previously generated 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 89

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

  • PAGE 90

    }); }); }(jQuery)); Screenshot & Output Page 90

  • PAGE 91

    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. 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 92

    Finding all the Job Sets in the Server Problem You want to obtain a list of all the previously generated Job Sets contained in the PReS 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 Set Entities /rest/serverengine/entity/jobsets GET Example HTML5 jse-get-all-jobsets.

  • PAGE 93

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

  • PAGE 94

    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 95

    Finding the Jobs in a Job Set Problem You want to obtain a list of all the previously generated 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 96

    JavaScript/jQuery jse-get-jobs.js /* Job Set Entity Service - Get Jobs for Job Set Example */ (function ($) { "use strict"; $(document).ready(function () { setupExample(); $("form").on("submit", function (event) { event.preventDefault(); if (!checkSessionValid()) { return; } var jobSetId = $("#jobset").val(); $.ajax({ type: url: "GET", "/rest/serverengine/entity/jobsets/" + jobSetId }).

  • PAGE 97

    }(jQuery)); 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 98

    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 99

    Running a Data Mapping Operation Problem You want to run a data mapping operation to generate 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 100

    PAGE 101

    /* Data Mapping Service - Process Data Mapping Example */ (function ($) { "use strict"; $(document).ready(function () { 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 }).

  • PAGE 102

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

  • PAGE 103

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

  • PAGE 104

    Screenshot & Output 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 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 105

    Further Reading See the Data Mapping Service page of the REST API Reference section for further detail.

  • PAGE 106

    Running a Data Mapping Operation (Using JSON) Problem You want to run a data mapping operation to generate 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 107

    PAGE 108

    /* Data Mapping Service - Process Data Mapping (JSON) Example */ (function ($) { "use strict"; $(document).ready(function () { 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 }).

  • PAGE 109

    $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/getResult/" + operationId }).done(function (response, status, request) { displayHeading("Operation Result"); displaySubResult("Data Set ID", response); }).fail(displayDefaultFailure); }; /* Process Data Mapping (JSON) */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/datamining/" + configId, data: JSON.stringify(plainIDToJson (dataFileId)), contentType: "application/json" }).

  • PAGE 110

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

  • PAGE 111

    Screenshot & Output 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 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 112

    Further Reading See the Data Mapping Service page of the REST API Reference section for further detail.

  • PAGE 113

    Running a Data Mapping Operation for PDF/VT File (to Data Set) Problem You want to run a data mapping operation to generate 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 114

    1.11.3.min.js"> PAGE 115

    "use strict"; $(document).ready(function () { 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) { displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.

  • PAGE 116

    "/rest/serverengine/workflow/datamining/getResult/" + operationId }).done(function (response, status, request) { displayHeading("Operation Result"); displaySubResult("Data Set ID", response); }).fail(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.getResponseHeader ("operationId"); $submitButton.

  • PAGE 117

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

  • PAGE 118

    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 119

    Further Reading See the Data Mapping Service page of the REST API Reference section for further detail.

  • PAGE 120

    Running a Data Mapping Operation for PDF/VT File (to Content Set) Problem You want to run a data mapping operation to generate 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 121

    1.11.3.min.js"> PAGE 122

    $(document).ready(function () { 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) { displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.

  • PAGE 123

    }).done(function (response, status, request) { displayHeading("Operation Result"); displaySubResult("Content Set ID", response); }).fail(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.getResponseHeader ("operationId"); $submitButton.attr("disabled", "disabled"); $cancelButton.

  • PAGE 124

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

  • PAGE 125

    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 126

    Further Reading See the Data Mapping Service page of the REST API Reference section for further detail.

  • PAGE 127

    Running a Content Creation Operation for Print Problem You want to run a content creation operation to generate 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 128

    PAGE 129

    "use strict"; $(document).ready(function () { 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) { displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.

  • PAGE 130

    url: "/rest/serverengine/workflow/contentcreation/getResult/" + operationId }).done(function (response, status, request) { displayHeading("Operation Result"); displaySubResult("Content Set IDs", response); }).fail(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 131

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

  • PAGE 132

    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 133

    Further Reading See the Content Creation Service page of the REST API Reference section for further detail.

  • PAGE 134

    Running a Content Creation Operation for Print By Data Record (Using JSON) Problem You want to run a content creation operation to generate 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 135

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

    Inputs
    PAGE 136

    JavaScript/jQuery cc-process-by-dre-json.js /* Content Creation Service - Process Content Creation (By Data Record) (JSON) Example */ (function ($) { "use strict"; $(document).ready(function () { setupExample(); var $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"), operationId = null; $cancelButton.on("click", function () { if (operationId !== null) { /* Cancel an Operation */ $.

  • PAGE 137

    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) { displayHeading("Operation Result"); displaySubResult("Content Set IDs", response); }).fail(displayDefaultFailure); }; /* Process Content Creation (By Data Record) (JSON) */ $.

  • PAGE 138

    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)); displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.

  • PAGE 139

    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. 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 140

    Further Reading See the Content Creation Service page of the REST API Reference section for further detail.

  • PAGE 141

    Running a Content Creation Operation for Email By Data Record (Using JSON) Problem You want to run a content creation operation to generate 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 142

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

    Email Security
  • PAGE 144

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

  • PAGE 145

    }).done(function (response) { displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.removeAttr("disabled"); $cancelButton.attr("disabled", "disabled"); }, 100); }).fail(displayDefaultFailure); } }); $useAuth.on("click", function (event) { if (event.target.checked) { $startTLS.removeAttr("disabled"); $username.removeAttr("disabled"); $password.removeAttr("disabled"); } else { $startTLS.attr("disabled", "disabled"); $username.

  • PAGE 146

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

  • PAGE 147

    $submitButton.attr("disabled", "disabled"); $cancelButton.removeAttr("disabled"); displayStatus("Content Creation Operation Successfully Submitted"); 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 148

    }; getProgress(); }).

  • PAGE 149

    Screenshot & Output Page 149

  • PAGE 150

    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) into the appropriate text fields as your inputs.

  • PAGE 151

    Further Reading See the Content Creation (Email) Service page of the REST API Reference section for further detail.

  • PAGE 152

    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 153

    HTML Parameters
    HTML Parameters
    PAGE 166

    /* Job Creation Service - Process Job Creation (JSON) Example */ (function ($) { "use strict"; $(document).ready(function () { 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 }).

  • PAGE 167

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

  • PAGE 168

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

  • PAGE 169

    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 170

    Further Reading See the Job Creation Service page of the REST API Reference section for further detail.

  • PAGE 171

    Running an Output Creation Operation Problem You want to run an output creation operation to generate 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 172

    PAGE 173

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

  • PAGE 174

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

  • PAGE 175

    displayStatus("Output Creation Operation Successfully Submitted"); 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 }).done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.

  • PAGE 176

    }).fail(displayDefaultFailure); }); }); }(jQuery)); 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 Get Results as Text - Return the result as text specifically. In this example this would return the absolute path to the output file(s).

  • PAGE 177

    Lastly, select the Submit button to start the Output 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. 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.

  • PAGE 178

    Running an Output Creation Operation (Using JSON) Problem You want to run an output creation operation to generate 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 179

    PAGE 180

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

  • PAGE 181

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

  • PAGE 182

    }).done(function (response, status, request) { var progress = null; operationId = request.getResponseHeader ("operationId"); $submitButton.attr("disabled", "disabled"); $cancelButton.removeAttr("disabled"); displayStatus("Output Creation Operation Successfully Submitted"); displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.

  • PAGE 183

    $cancelButton.attr("disabled", "disabled"); }, 100); } }).fail(displayDefaultFailure); } }; getProgress(); }).

  • PAGE 184

    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 185

    Running an Output Creation Operation By Job (Using JSON) Problem You want to run an output creation operation to generate 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 186

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

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

  • PAGE 188

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

  • PAGE 189

    data: JSON.stringify(plainIDListToJson (jobIds, createOnly)), contentType: "application/json" }).done(function (response, status, request) { var progress = null; operationId = request.getResponseHeader ("operationId"); $submitButton.attr("disabled", "disabled"); $cancelButton.removeAttr("disabled"); displayStatus("Output Creation Operation Successfully Submitted"); displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.

  • PAGE 190

    $progressBar.attr("value", 0); $submitButton.removeAttr ("disabled"); $cancelButton.attr("disabled", "disabled"); }, 100); } }).fail(displayDefaultFailure); } }; getProgress(); }).

  • PAGE 191

    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 Create Only - Create the output in server but do not send spool file to its final destination.

  • PAGE 192

    l Get Results 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. 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 193

    Running an All-In-One Operation (Using JSON) Problem You want to run an All-In-One operation to generate either a data set, content set or printed output using one the following input combinations: Process Steps Input Combination Expected Output Data Mapping Only Data File + Data Mapping Configuration Data Set Data Mapping + Content Creation Data File + Data Mapping Configuration + Design Template Content Set(s) Content Creation Only Data Records + Design Template Content Set(s) Data Mapping +

  • PAGE 194

    Process Steps Input Combination Creation + Output Creation Output Creation Preset Expected Output 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 195

    1.11.3.min.js"> PAGE 196

    Content Creation
    PAGE 197

    Progress & Actions
    PAGE 198

    var $form = $inputs = $("form"), $("#inputs input"), $datafile = $datamapper = $datarecords = $template = $jcpreset = $jobs = $ocpreset = $createonly = $resultstxt = $printrange = $("#datafile"), $("#datamapper"), $("#datarecords"), $("#designtemplate"), $("#jcpreset"), $("#jobs"), $("#ocpreset"), $("#createonly"), $("#resultstxt"), $("#printrange"), AIOConfig = outputDesc = operationId = null, null, null, $submitButton = $cancelButton = $progressBar = $("#submit"), $("#cancel"), $("progress"); $can

  • PAGE 199

    /** * @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. Null can also be returned if no workflow selections * are made or if the workflow selections made are of an invalid sequence.

  • PAGE 200

    } 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).removeAttr("required"); required.push(this.id); }); var selections = (Object.keys(config)).length; /* Verify the Workflow Selections and note any omissions */ var matches = 0, missing = []; for (i = 0; i < required.

  • PAGE 201

    "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.removeAttr("disabled"); } else { $datarecords.attr("disabled", "disabled"); } outputDesc = "Content Set ID(s)"; } if (config.jobcreation) { outputDesc = "Job Set ID"; } if (config.

  • PAGE 202

    config.jobcreation && config.outputcreation) { getInputValue($jcpreset, "jobcreation", "config"); getInputValue($printrange, "printRange", "printRange"); $jcpreset.removeAttr("disabled"); $printrange.removeAttr("disabled"); } else { $jcpreset.attr("disabled", "disabled"); $printrange.attr("disabled", "disabled"); } /* Red-flag any if (!selections for (i = 0; $("#" + omissions in Workflow Selections */ || missing.length) { i < missing.length; i += 1) { missing[i]).

  • PAGE 203

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

  • PAGE 204

    displayStatus("All-In-One Operation Successfully Submitted"); displayHeading("Input Configuration"); displaySubResult("JSON All-In-One Configuration", jsonPrettyPrint(AIOConfig)); displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.ajax({ type: "GET", cache: false, url: "/rest/serverengine/workflow/print/getProgress/" + operationId }).

  • PAGE 205

    getProgress(); }).

  • PAGE 206

    Screenshot & Output Page 206

  • PAGE 207

    Page 207

  • PAGE 208

    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 209

    Note If the result returned is expected to be file data, then the value <> will be displayed. Further Reading See the All-In-One Service page of the REST API Reference section for further detail.

  • PAGE 210

    REST API Reference The PReS 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 PReS Connect REST API: Service Name Internal Name Description Authentication Service AuthenticationRestService Exposes methods for authenticated access (login & password) to the PReS Connect REST API. Uses a combination of basic and token based authorisation.

  • PAGE 211

    Service Name Internal Name Description methods for data records and the value & property values for a specific data record. Data Set Entity Service DataSetEntityRestService Exposes methods specific to the Data Set entity type including property value accessor methods, methods to access all data sets and delete specific data sets, and a method to access the data record IDs contained within a specific data set.

  • PAGE 212

    Service Name Internal Name Description deletion of managed files already contained within the file store. Content Creation (HTML) Service HTMLMergeRestService Exposes methods for the manual creation of new web context based content. Also exposes additional method to access the generated HTML content/resources.

  • PAGE 213

    Service Name Service Internal Name Description creation, monitoring & cancellation of "All-In-One" operations within the workflow, including methods for accessing the result of a successful operation. Also includes a test output destination method.

  • PAGE 214

    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 214

  • PAGE 215

    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 216

    Authenticate/Login to Server Submits an authentication request (using credentials) to the PReS 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 217

    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 217

  • PAGE 218

    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 219

    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 Get Progress of Operation /workflow/contentcreation/getProgress/ {operationId} GET Ge

  • PAGE 220

    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 221

    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 222

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

  • PAGE 223

    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 224

    Type: Status: l l l l 202 Accepted – Creation of new operation successful 400 Bad Request – Design template or Data Record entity not found in File Store/Server 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 224

  • PAGE 225

    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 226

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

  • PAGE 227

    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 generated Content Sets. Type: POST URI: /rest/serverengine/workflow/contentcreation/getResult/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Content Creation operation Add.

  • PAGE 228

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

  • PAGE 229

    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 230

    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 231

    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 232

    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 233

    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 234

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

  • PAGE 235

    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 236

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

  • PAGE 237

    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 238

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

  • PAGE 239

    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 multiple 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 240

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

  • PAGE 241

    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 242

    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 Set Entities /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

  • PAGE 243

    Get All Content Set Entities 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 244

    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 245

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

  • PAGE 246

    Get Page Details for Content Set Returns a list of the page details for a specific Content Set entity.

  • PAGE 247

    Content Type: Status: application/json l l l 200 OK – Content Set entity page details successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 247

  • PAGE 248

    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 249

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

  • PAGE 250

    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 251

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

  • PAGE 252

    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 253

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

  • PAGE 254

    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 255

    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 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 GET Update Data Record Properties /entity/da

  • PAGE 256

    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 257

    Get Data Record Values Returns a list of the values for a specific Data Record entity. Request takes no content, and on success returns a response containing a JSON Record Content List of all the values in the Data Record.

  • PAGE 258

    Type: Status: l l l 200 OK – Data Record entity values successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 258

  • PAGE 259

    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 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 260

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

  • PAGE 261

    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 262

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

  • PAGE 263

    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 264

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

  • PAGE 265

    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 multiple JSON Record Content Lists 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 266

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

  • PAGE 267

    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 multiple 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 268

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

  • PAGE 269

    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 270

    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 Set Entities /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

  • PAGE 271

    Get All Data Set Entities 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 272

    Get Data Records for Data Set Returns a list of all the Data Records 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 273

    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 274

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

  • PAGE 275

    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 276

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

  • PAGE 277

    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 278

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

  • PAGE 279

    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 280

    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 281

    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 282

    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 283

    Content Type: Status: - l l l l 202 Accepted – Creation of new operation successful 400 Bad Request – Data file or Data Mapping Configuration not found in File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 283

  • PAGE 284

    Process Data Mapping (JSON) Submits a request to initiate a new Data Mapping operation. As content the request takes one of either: l a JSON Identifier of the data file’s Managed File ID, or l a JSON Identifier (Named) of the data file’s Managed File Name On success, it 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 285

    used to retrieve further information/cancel the operation.

  • PAGE 286

    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 generated based on the default properties extracted from the metadata of the PDF/VT data file.

  • PAGE 287

    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 287

  • PAGE 288

    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 generated based on the default properties extracted from the metadata of the PDF/VT data file.

  • PAGE 289

    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 289

  • PAGE 290

    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 291

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

  • PAGE 292

    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 generated Data Set (or Content Set for a PDF/VT to Content Set specific data mapping operation). Type: POST URI: /rest/serverengine/workflow/datamining/getResult/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Data Mapping operation Add.

  • PAGE 293

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

  • PAGE 294

    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 295

    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 296

    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 Get Progress of Operation /workflow/contentcreation/email/getProgress/ {operationId} GET Get Result of Operation /workflow/contentcreation/em

  • PAGE 297

    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 298

    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 299

    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.

  • PAGE 300

    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 301

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

  • PAGE 302

    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 303

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

  • PAGE 304

    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 305

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

  • PAGE 306

    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 307

    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 Upload File /filestore/file/{fileId} POST Upload Directory /filestore/dir/{fileId} POST Download File or Directory /filestore/file/{fileId} GET Delete File or Directory /filestore/delete/{fileId} GET Upload Data Mapping Configuration /filestore/DataMiningConfig POST Upload Job Cre

  • PAGE 308

    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 309

    Upload File Submits a file to the File Store using a specific Managed File ID (or Name). Request takes binary file data as content, and on success returns a response containing the Managed File ID (or Name) used for the file. Type: POST URI: /rest/serverengine/filestore/file/{fileId} Parameters: Path: l Request: Response: fileId – the Managed File ID (or Name) for file in File Store Add.

  • PAGE 310

    or expired l 405 Not Allowed – File already exists in File Store Page 310

  • PAGE 311

    Upload Directory Submits a zipped directory to the File Store using a specific Managed File ID (or Name). Request takes zipped file data as content, and on success returns a response containing the Managed File ID (or Name) used for the directory. Type: POST URI: /rest/serverengine/filestore/dir/{fileId} Parameters: Path: l Request: Response: fileId – the Managed File ID (or Name) for directory in File Store Add.

  • PAGE 312

    l l 403 Forbidden – Server authentication has failed or expired 405 Not Allowed – Directory already exists in File Store Page 312

  • PAGE 313

    Download File or Directory Obtains a 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 314

    Status: 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 Page 314

  • PAGE 315

    Delete File or Directory Removes a 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 316

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

  • PAGE 317

    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 318

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

  • PAGE 319

    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 320

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

  • PAGE 321

    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 322

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

  • PAGE 323

    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 324

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

  • PAGE 325

    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 326

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

  • PAGE 327

    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 328

    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 Get Temp

  • PAGE 329

    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 330

    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 generated HTML specific to the Data Record ID and section specified.

  • PAGE 331

    Content: The generated HTML output for the Data Record ID Content Type: text/html Status: l 200 OK – Output generated 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 Server Error – Content Creation Error: Data Record Not Found / Web Context in Template Not found Page 331

  • PAGE 332

    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 generated HTML output specific to the Data Record ID specified.

  • PAGE 333

    Status: l 200 OK – Output generated 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 Server Error – Content Creation Error: Data Record Not Found / Web Context in Template Not found Page 333

  • PAGE 334

    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: .+} Parameters: Path: l l Request: Response: templateId – the Managed File ID (or Name) of the design template in File Store relPath – the relative path to the resource within template Add.

  • PAGE 335

    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 or Data Record entity not found in File Store/Server 500 Server Error - Unable to open template or template doesn’t exist Page 335

  • PAGE 336

    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 337

    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 Progress of Operation /workflow/jobcreation/getProgress/ {operationId

  • PAGE 338

    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 339

    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 340

    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 340

  • PAGE 341

    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 342

    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 342

  • PAGE 343

    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 344

    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 344

  • PAGE 345

    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 346

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

  • PAGE 347

    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 IDs of the generated Job Set. Type: POST URI: /rest/serverengine/workflow/jobcreation/getResult/{operationId} Parameters: Path: l Request: Response: operationId – Operation ID of Job Creation operation Add.

  • PAGE 348

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

  • PAGE 349

    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 350

    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 351

    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 Properties /entity/jobs/{jobId}/properties GET Update Job Properties /entity/jobs/{jobId}/properties PUT Update Multiple Job Properties /entity/jobs/properties PUT Service Version /entity/jobs/version GET Page 3

  • PAGE 352

    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 353

    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 354

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

  • PAGE 355

    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 356

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

  • PAGE 357

    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 358

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

  • PAGE 359

    Update Multiple Job Properties Submits a request to update one or more properties for one or more Job entities in the Server. Request takes multiple 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 360

    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 361

    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 Set Entities /entity/jobsets GET Get Jobs for Job Set /entity/jobsets/{jobSetId} GET Delete Job Set Entity /entity/jobsets/{jobSetId}/delete POST Get Job Set Properties /entity/jobsets/{jobSetId}/properties GET Update Job Set Properties /entity/jobsets/{jobSetId}/properties PUT Service Version /

  • PAGE 362

    Get All Job Set Entities 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 363

    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 364

    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 365

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

  • PAGE 366

    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 367

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

  • PAGE 368

    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 369

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

  • PAGE 370

    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 371

    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 Get Progress of Operation /

  • PAGE 372

    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 373

    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 374

    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 374

  • PAGE 375

    Process Output Creation (JSON) Submits a request to initiate a new Output Creation operation. Request takes a JSON Identifier of the Job Set ID (with a createOnly flag) 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 376

    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 376

  • PAGE 377

    Process Output Creation (By Job) (JSON) Submits a request to initiate a new Output Creation operation. Request takes a JSON Identifier List of the Job IDs (with a createOnly flag) 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 378

    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 378

  • PAGE 379

    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 380

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

  • PAGE 381

    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 generated output files (multiple spool files) or the content of a final generated output file (single spool file).

  • PAGE 382

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

  • PAGE 383

    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 generated output file or files (single or multiple spool files respectively).

  • PAGE 384

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

  • PAGE 385

    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 386

    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 387

    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 Get Progress of Operation /workflow/print/getProgress/ {operationId} GET Get Result of Operation /workflow/print/getResult/{operationId} POST Get Result of Operation (as Text) /workflow/print/getResultTxt/ {operationId} POST

  • PAGE 388

    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 389

    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 390

    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 a process step (see error description) Page 390

  • PAGE 391

    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 392

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

  • PAGE 393

    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 generated, or the absolute paths of the final generated output files (multiple spool files) or the content of a final generated output file (single spool file).

  • PAGE 394

    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 394

  • PAGE 395

    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 generated, or the absolute path or paths of the final generated output file or files (single or multiple spool files respectively).

  • PAGE 396

    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 396

  • PAGE 397

    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 398

    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 399

    Copyright Information Copyright © 1994-2017 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 400

    Legal Notices and Acknowledgments PReS Connect, Copyright © 2017, Objectif Lune Inc. All rights reserved. This guide uses the following third party components: l l jQuery Library Copyright © 2005 - 2014, jQuery Foundation, Inc. and other contributors. This is distributed under the terms of the Massachusetts Institute of Technology (MIT) license. QUnit Library Copyright © jQuery Foundation, Inc. and other contributors.