1.5

REST API Cookbook with
Working Examples
Version:1.5

Summary of content (402 pages)

Options
Actions
JavaScript/jQuery fs-datamapper-upload.

  • PAGE 56

    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 57

    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 58

    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 59

    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 60

    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 61

    Options
    Actions
    JavaScript/jQuery fs-designtemplate-upload.

  • PAGE 62

    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 63

    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 64

    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 65

    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 66

    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 67

    Options
    Actions
    JavaScript/jQuery fs-jcpreset-upload.

  • PAGE 68

    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 69

    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 70

    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 71

    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 72

    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 73

    Options
    Actions
    JavaScript/jQuery fs-ocpreset-upload.

  • PAGE 74

    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 75

    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 76

    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 77

    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 78

    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 79

    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 PlanetPress 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 80

    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 81

    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 82

    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 83

    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 84

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

    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 86

    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 PlanetPress Connect Server potentially for use in a Job Creation operation. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Content Set Entity REST service: Get All Content Set Entities /rest/serverengine/entity/contentsets GET Example HTML5 cse-get-all-contentsets.

  • PAGE 87

    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 88

    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 89

    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 90

    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 91

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

  • PAGE 92

    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 93

    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 PlanetPress Connect Server potentially for use in a Output Creation operation. Solution The solution is to create a request using the following URI and method type and submit it to the server via the Job Set Entity REST service: Get All Job Set Entities /rest/serverengine/entity/jobsets GET Example HTML5 jse-get-all-jobsets.

  • PAGE 94

    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 95

    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 96

    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 97

    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 98

    }(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 99

    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 100

    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 101

    PAGE 102

    /* 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 103

    $.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 104

    $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 105

    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 106

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

  • PAGE 107

    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 108

    PAGE 109

    /* 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 110

    $.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 111

    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 112

    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 113

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

  • PAGE 114

    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 115

    1.11.3.min.js"> PAGE 116

    "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 117

    "/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 118

    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 119

    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 120

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

  • PAGE 121

    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 122

    1.11.3.min.js"> PAGE 123

    $(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 124

    }).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 125

    } 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 126

    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 127

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

  • PAGE 128

    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 129

    PAGE 130

    "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 131

    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 132

    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 133

    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 134

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

  • PAGE 135

    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 136

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

    Inputs
    PAGE 137

    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 138

    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 139

    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 140

    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 141

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

  • PAGE 142

    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 143

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

    Email Security
  • PAGE 145

    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 146

    }).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 147

    }).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 148

    $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 149

    }; getProgress(); }).

  • PAGE 150

    Screenshot & Output Page 150

  • PAGE 151

    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 152

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

  • PAGE 153

    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 154

    HTML Parameters
    HTML Parameters
    PAGE 167

    /* 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 168

    $.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 169

    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 170

    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 171

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

  • PAGE 172

    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 173

    PAGE 174

    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 175

    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 176

    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 177

    }).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 178

    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 179

    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 180

    PAGE 181

    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 182

    }).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 183

    }).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 184

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

  • PAGE 185

    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 186

    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 187

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

    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 189

    $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 190

    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 191

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

  • PAGE 192

    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 193

    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 194

    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 195

    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 196

    1.11.3.min.js"> PAGE 197

    Content Creation
    PAGE 198

    Progress & Actions
    PAGE 199

    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 200

    /** * @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 201

    } 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 202

    "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 203

    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 204

    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 205

    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 206

    getProgress(); }).

  • PAGE 207

    Screenshot & Output Page 207

  • PAGE 208

    Page 208

  • PAGE 209

    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 210

    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 211

    REST API Reference The PlanetPress Connect REST API defines a number of RESTful services that facilitate various functionality within the server during workflow processing. The following table is a summary of the services available in the PlanetPress Connect REST API: Service Name Internal Name Description Authentication Service AuthenticationRestService Exposes methods for authenticated access (login & password) to the PlanetPress Connect REST API.

  • PAGE 212

    Service Name Internal Name Description Data Record Entity Service DataRecordEntityRestService Exposes methods specific to the Data Record entity type including accessor methods for data records and the value & property values for a specific data record.

  • PAGE 213

    Service Name Internal Name Description methods for the upload of directories and files to the file store, and the download & 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 214

    Service Name Internal Name Description All-In-One Service PrintRestService Exposes methods for the manual 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 215

    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 215

  • PAGE 216

    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 217

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

  • PAGE 218

    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 218

  • PAGE 219

    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 220

    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 221

    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 222

    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 223

    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 223

  • PAGE 224

    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 225

    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 225

  • PAGE 226

    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 227

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

  • PAGE 228

    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 229

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

  • PAGE 230

    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 231

    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 232

    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 233

    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 234

    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 235

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

  • PAGE 236

    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 237

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

  • PAGE 238

    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 239

    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 239

  • PAGE 240

    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 241

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

  • PAGE 242

    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 243

    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 244

    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 245

    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 246

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

  • PAGE 247

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

  • PAGE 248

    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 248

  • PAGE 249

    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 250

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

  • PAGE 251

    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 252

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

  • PAGE 253

    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 254

    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 254

  • PAGE 255

    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 256

    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 257

    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 258

    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 259

    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 259

  • PAGE 260

    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 261

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

  • PAGE 262

    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 263

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

  • PAGE 264

    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 265

    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 265

  • PAGE 266

    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 267

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

  • PAGE 268

    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 269

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

  • PAGE 270

    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 271

    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 272

    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 273

    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 274

    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 275

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

  • PAGE 276

    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 277

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

  • PAGE 278

    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 279

    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 279

  • PAGE 280

    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 281

    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 282

    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 283

    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 284

    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 284

  • PAGE 285

    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 286

    used to retrieve further information/cancel the operation.

  • PAGE 287

    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 288

    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 288

  • PAGE 289

    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 290

    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 290

  • PAGE 291

    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 292

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

  • PAGE 293

    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 294

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

  • PAGE 295

    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 296

    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 297

    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 298

    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 299

    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 300

    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 301

    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 302

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

  • PAGE 303

    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 304

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

  • PAGE 305

    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 306

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

  • PAGE 307

    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 308

    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 309

    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 310

    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 311

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

  • PAGE 312

    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 313

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

  • PAGE 314

    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 315

    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 315

  • PAGE 316

    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 317

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

  • PAGE 318

    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 319

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

  • PAGE 320

    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 321

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

  • PAGE 322

    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 323

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

  • PAGE 324

    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 325

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

  • PAGE 326

    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 327

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

  • PAGE 328

    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 329

    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 330

    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 331

    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 332

    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 332

  • PAGE 333

    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 334

    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 334

  • PAGE 335

    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 336

    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 336

  • PAGE 337

    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 338

    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 339

    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 340

    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 341

    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 341

  • PAGE 342

    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 343

    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 343

  • PAGE 344

    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 345

    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 345

  • PAGE 346

    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 347

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

  • PAGE 348

    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 349

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

  • PAGE 350

    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 351

    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 352

    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 353

    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 354

    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 355

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

  • PAGE 356

    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 357

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

  • PAGE 358

    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 359

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

  • PAGE 360

    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 361

    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 362

    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 363

    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 364

    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 365

    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 366

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

  • PAGE 367

    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 368

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

  • PAGE 369

    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 370

    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 370

  • PAGE 371

    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 372

    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 373

    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 374

    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 375

    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 375

  • PAGE 376

    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 377

    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 377

  • PAGE 378

    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 379

    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 379

  • PAGE 380

    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 381

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

  • PAGE 382

    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 383

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

  • PAGE 384

    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 385

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

  • PAGE 386

    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 387

    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 388

    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 389

    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 390

    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 391

    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 391

  • PAGE 392

    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 393

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

  • PAGE 394

    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 395

    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 395

  • PAGE 396

    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 397

    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 397

  • PAGE 398

    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 399

    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 400

    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 401

    Legal Notices and Acknowledgments PlanetPress 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.

  • PAGE 402