2019.2

1 2 3 4 5 6 7 8 9 10
Table Of Contents
REST API Cookbook with
Working Examples
Version:2019.2

Summary of content (604 pages)

Options
Actions
JavaScript/jQuery fs-datamapper-upload.

  • PAGE 130

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

  • PAGE 131

    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 132

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

  • PAGE 133

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

  • PAGE 134

    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 135

    Options
    Actions
    JavaScript/jQuery fs-designtemplate-upload.

  • PAGE 136

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

  • PAGE 137

    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 138

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

  • PAGE 139

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

  • PAGE 140

    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 141

    Options
    Actions
    JavaScript/jQuery fs-jcpreset-upload.

  • PAGE 142

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

  • PAGE 143

    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 144

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

  • PAGE 145

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

  • PAGE 146

    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 147

    Options
    Actions
    JavaScript/jQuery fs-ocpreset-upload.

  • PAGE 148

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

  • PAGE 149

    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 150

    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 151

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

  • PAGE 152

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

  • PAGE 153

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

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

  • PAGE 227

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

  • PAGE 228

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

  • PAGE 229

    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 230

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

  • PAGE 231

    PAGE 232

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

  • PAGE 233

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

  • PAGE 234

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

  • PAGE 235

    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 236

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

  • PAGE 237

    PAGE 238

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

  • PAGE 239

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

  • PAGE 240

    url: "/rest/serverengine/workflow/contentcreation/getProgress/" + operationId }) .done(function (response, status, request) { if (response !== "done") { if (response !== progress) { progress = response; $progressBar.attr ("value", progress); } setTimeout(getProgress, 1000); } else { $progressBar.attr("value", (progress = 100)); c.displayInfo("Operation Completed"); getFinalResult(); operationId = null; setTimeout(function () { $progressBar.attr ("value", 0); $submitButton.

  • PAGE 241

    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 242

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

  • PAGE 243

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

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

  • PAGE 245

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

  • PAGE 246

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

  • PAGE 247

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

  • PAGE 248

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

  • PAGE 249

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

  • PAGE 250

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

    PAGE 252

    Progress & Actions
    JavaScript/jQuery cce-process-by-dre-json.

  • PAGE 253

    if (operationId !== null) { /* Cancel an Operation */ $.ajax({ type: "POST", url: "/rest/serverengine/workflow/contentcreation/email/cancel/" + operationId }) .done(function (response) { c.displayInfo("Operation Cancelled!"); operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.prop("disabled", false); $cancelButton.prop("disabled", true); }, 100); }) .fail(c.displayDefaultFailure); } }); $useAuth.on("click", function (event) { var disabled = !($(event.target).

  • PAGE 254

    type: "POST", url: "/rest/serverengine/workflow/contentcreation/email/getResult/" + operationId }) .done(function (response, status, request) { c.displayHeading("Operation Result"); c.displaySubResult("Email Report", response); }) .fail(c.displayDefaultFailure); }; /* Construct JSON Identifier List (with Email Parameters) */ var config = { "sender": $("#sender").val(), "host": $("#host").val(), "useAuth" : $useAuth.prop("checked"), "useSender": $("#usesender").

  • PAGE 255

    url: "/rest/serverengine/workflow/contentcreation/email/" + templateId, data: JSON.stringify(config), contentType: "application/json; charset=utf-8" }; if (section.length) settings.url += "?section=" + section; $.ajax(settings) .done(function (response, status, request) { var progress = null; operationId = request.getResponseHeader ("operationId"); $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("Content Creation Operation Successfully Submitted"); c.

  • PAGE 256

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

  • PAGE 257

    Screenshot & Output Page 257

  • PAGE 258

    Page 258

  • PAGE 259

    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 260

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

  • PAGE 261

    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 262

    HTML Parameters
    HTML Parameters
    PAGE 275

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

  • PAGE 276

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

  • PAGE 277

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

  • PAGE 278

    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 279

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

  • PAGE 280

    Process Output Creation Example PAGE 281

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

  • PAGE 282

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

  • PAGE 283

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

  • PAGE 284

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

  • PAGE 285

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

  • PAGE 286

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

  • PAGE 287

    Process Output Creation (JSON) Example PAGE 288

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

  • PAGE 289

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

  • PAGE 290

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

  • PAGE 291

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

  • PAGE 292

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

  • PAGE 293

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

  • PAGE 294

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

  • PAGE 295

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

    Progress & Actions

    JavaScript/jQuery oc-process-by-je-json.js /* Output Creation Service - Process Output Creation (By Job) (JSON) Example */ (function ($, c) { "use strict"; $(function () { c.

  • PAGE 297

    operationId = null; setTimeout(function () { $progressBar.attr("value", 0); $submitButton.prop("disabled", false); $cancelButton.prop("disabled", true); }, 100); }) .fail(c.displayDefaultFailure); } }); $("form").on("submit", function (event) { event.preventDefault(); if (!c.checkSessionValid()) return; var jobIds = $("#jobs").val(), configId = $("#ocpreset").val(), createOnly = $("#createonly").prop("checked"); var getFinalResult = function () { var result = ($("#resultastxt").

  • PAGE 298

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

  • PAGE 299

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

  • PAGE 300

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

  • PAGE 301

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

  • PAGE 302

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

  • PAGE 303

    3.4.1.min.js"> PAGE 304

    Content Creation
    PAGE 305

    Output Creation
    PAGE 306

    disabled>

    Progress & Actions
  • PAGE 307

    $datafile = $datamapper = $datarecords = $template = $jcpreset = $jobs = $ocpreset = $persistdres = $createonly = $resultastxt = $printrange = $("#datafile"), $("#datamapper"), $("#datarecords"), $("#designtemplate"), $("#jcpreset"), $("#jobs"), $("#ocpreset"), $("#persistdres"), $("#createonly"), $("#resultastxt"), $("#printrange"), AIOConfig = outputDesc = operationId = null, null, null, $submitButton = $("#submit"), $cancelButton = $("#cancel"), $progressBar = $("progress"); $cancelButton.

  • PAGE 308

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

    if (config[process] === undefined) config[process] = {}; config[process][field] = value; } } /* Get Required & Actual Workflow Selections */ $inputs.each(function () { if ($(this).prop("checked")) config[this.id] = {}; $(this).prop("required", false); required.push(this.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 310

    getInputValue($datarecords, "contentcreation", "identifiers", jsonIDListValue); $datarecords.prop("disabled", false); } else { $datarecords.prop("disabled", true); } outputDesc = "Content Set ID(s)"; } if (config.jobcreation) { getInputValue($jcpreset, "jobcreation", "config"); $jcpreset.prop("disabled", false); outputDesc = "Job Set ID"; } else { $jcpreset.prop("disabled", true); } if (config.

  • PAGE 311

    "persistDataset", booleanValue); $persistdres.prop("disabled", false); } } else { $persistdres.prop({ "disabled": true }); } if (config.datamining && config.contentcreation && config.jobcreation && config.outputcreation) { getInputValue($printrange, "printRange", "printRange"); $printrange.prop("disabled", false); } else { $printrange.prop("disabled", true); } /* Red-flag any omissions in Workflow Selections */ if (!selections || missing.length) { for (i = 0; i < missing.length; i += 1) $("#" + missing[i]).

  • PAGE 312

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

  • PAGE 313

    operationId = request.getResponseHeader ("operationId"); $submitButton.prop("disabled", true); $cancelButton.prop("disabled", false); c.displayStatus("All-In-One Operation Successfully Submitted"); c.displayHeading("Input Configuration"); c.displaySubResult("JSON All-In-One Configuration", c.jsonPrettyPrint(AIOConfig)); c.displayResult("Operation ID", operationId); var getProgress = function () { if (operationId !== null) { /* Get Progress of Operation */ $.

  • PAGE 314

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

  • PAGE 315

    Screenshot & Output Page 315

  • PAGE 316

    Page 316

  • PAGE 317

    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 318

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

  • PAGE 319

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

  • PAGE 320

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

  • PAGE 321

    Service Name Internal Name Description IDs contained within a content set l l l Data Record Entity Service DataRecordEntityRestService Getting the page details for a content set Getting and updating of content set properties Deletion of content sets from the server This service exposes methods specific to the access and management of data record entities internal to the server.

  • PAGE 322

    Service Name Internal Name Description l l l l Data Mapping Service DataminingRestService Getting all the data set IDs within the server Getting the data record IDs contained within a data set Getting and updating of data set properties Deletion of data sets from the server This service exposes methods specific to the management of the data mapping process within the workflow.

  • PAGE 323

    Service Name Internal Name Description entities internal to the server. It includes methods to facilitate the following functions: l Document Set Entity Service DocumentSetEntityRestService Getting and updating of document metadata properties This service exposes methods specific to the access and management of document set entities internal to the server.

  • PAGE 324

    Service Name Internal Name Description email using data records or JSON as input l l Entity Service EntityRestService Getting a list of all the active operations on the server Getting the result of a content creation operation for email This service exposes methods specific to the querying and selection of data entities internal to the server.

  • PAGE 325

    Service Name Internal Name Description l l l Content Creation (HTML) Service HTMLMergeRestService Uploading of job creation and output creation presets to the file store Download of managed files from the file store Deletion of managed files from the file store This service exposes methods specific to the management of the content creation process for the Web context within the workflow.

  • PAGE 326

    Service Name Internal Name Description cancellation of job creation operations using either content sets or content items as input l l Job Entity Service JobEntityRestService Getting a list of all the active operations on the server Getting the result of a job creation operation This service exposes methods specific to the access and management of job entities internal to the server.

  • PAGE 327

    Service Name Internal Name Description l l Job Set Entity Service JobSetEntityRestService Getting the document set IDs contained within a job segment Getting and updating of job segment metadata properties This service exposes methods specific to the access and management of job set entities internal to the server.

  • PAGE 328

    Service Name Internal Name Description cancellation of output creation operations using either a job set or jobs as input l l l All-In-One Service PrintRestService Getting a list of all the active operations on the server Getting the result of an output creation operation Running of +PReS Enhance workflow configurations via the Weaver engine This service exposes methods specific to the management of the All-In-One process within the workflow.

  • PAGE 329

    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 329

  • PAGE 330

    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 331

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

  • PAGE 332

    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 332

  • PAGE 333

    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 334

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

  • PAGE 335

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

  • PAGE 336

    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 337

    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 338

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

  • PAGE 339

    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 340

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

  • PAGE 341

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

  • PAGE 342

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

  • PAGE 343

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

  • PAGE 344

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

  • PAGE 345

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

  • PAGE 346

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

  • PAGE 347

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

  • PAGE 348

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

  • PAGE 349

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

  • PAGE 350

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

  • PAGE 351

    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 352

    required l 403 Forbidden – Server authentication has failed or expired Page 352

  • PAGE 353

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

  • PAGE 354

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

  • PAGE 355

    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 356

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

  • PAGE 357

    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 358

    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 359

    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 360

    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 361

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

  • PAGE 362

    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 363

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

  • PAGE 364

    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 365

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

  • PAGE 366

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

  • PAGE 367

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

  • PAGE 368

    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 369

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

  • PAGE 370

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

  • PAGE 371

    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 372

    required l 403 Forbidden – Server authentication has failed or expired Page 372

  • PAGE 373

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

  • PAGE 374

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

  • PAGE 375

    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 376

    required l 403 Forbidden – Server authentication has failed or expired Page 376

  • PAGE 377

    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 378

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

  • PAGE 379

    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 380

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

  • PAGE 381

    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 382

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

  • PAGE 383

    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 384

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

  • PAGE 385

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

  • PAGE 386

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

  • PAGE 387

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

  • PAGE 388

    invalid Data Record ID specified Page 388

  • PAGE 389

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

  • PAGE 390

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

  • PAGE 391

    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 392

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

  • PAGE 393

    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 394

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

  • PAGE 395

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

  • PAGE 396

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

  • PAGE 397

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

  • PAGE 398

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

  • PAGE 399

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

  • PAGE 400

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

  • PAGE 401

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

  • PAGE 402

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

  • PAGE 403

    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 404

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

  • PAGE 405

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

  • PAGE 406

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

  • PAGE 407

    required l 403 Forbidden – Server authentication has failed or expired Page 407

  • PAGE 408

    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 409

    required l 403 Forbidden – Server authentication has failed or expired Page 409

  • PAGE 410

    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 411

    required l 403 Forbidden – Server authentication has failed or expired Page 411

  • PAGE 412

    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 413

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

  • PAGE 414

    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 415

    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 416

    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 417

    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 418

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

  • PAGE 419

    l 500 Internal Server Error – Data file or Data Mapping Configuration not found in File Store Page 419

  • PAGE 420

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

  • PAGE 421

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

  • PAGE 422

    l l 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – JSON Identifier bad or missing, or Data file or Data Mapping Configuration not found in File Store Page 422

  • PAGE 423

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

  • PAGE 424

    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 424

  • PAGE 425

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

  • PAGE 426

    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 426

  • PAGE 427

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

  • PAGE 428

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

  • PAGE 429

    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 430

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

  • PAGE 431

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

  • PAGE 432

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

  • PAGE 433

    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 434

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

  • PAGE 435

    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 436

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

  • PAGE 437

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

  • PAGE 438

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

  • PAGE 439

    required l 403 Forbidden – Server authentication has failed or expired Page 439

  • PAGE 440

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

  • PAGE 441

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

  • PAGE 442

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

  • PAGE 443

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

  • PAGE 444

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

  • PAGE 445

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

  • PAGE 446

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

  • PAGE 447

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

  • PAGE 448

    required l 403 Forbidden – Server authentication has failed or expired Page 448

  • PAGE 449

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

  • PAGE 450

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

  • PAGE 451

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

  • PAGE 452

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

  • PAGE 453

    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 454

    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 455

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

  • PAGE 456

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

  • PAGE 457

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

  • PAGE 458

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

  • PAGE 459

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

  • PAGE 460

    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 461

    Status: l l l 200 OK – Progress of operation successfully retrieved 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired Page 461

  • PAGE 462

    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 463

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

  • PAGE 464

    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 465

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

  • PAGE 466

    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 467

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

  • PAGE 468

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

  • PAGE 469

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

  • PAGE 470

    l l l 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 500 Internal Server Error – Server error or Invalid JSON structure specified Page 470

  • PAGE 471

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

  • PAGE 472

    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 Synchronize/Upload Managed File (Internal Only) /filestore/file/{fileId} POST Synchronize/Upload Managed Directory (Internal Only) /filestore/dir/{fileId} POST Download Managed File or Directory /filestore/file/{fileId} GET Delete Managed File or Directory /filestore/delete/{fileId} G

  • PAGE 473

    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 474

    Synchronize/Upload Managed File (Internal Only) Synchronizes/uploads an existing file of a specific Managed File ID (or Name) from a Server Extension File Store, to the Server's File Store and is used exclusively in a clustered environment. Request takes binary file data as content, and on success returns a response containing the Managed File ID (or Name) of the file. Warning This method is strictly used internally by PReS Connect.

  • PAGE 475

    Content Type: Status: text/plain l l l l 200 OK – File successfully synchronized/uploaded to File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 405 Not Allowed – File already exists in File Store Page 475

  • PAGE 476

    Synchronize/Upload Managed Directory (Internal Only) Synchronizes/uploads an existing directory of a specific Managed File ID (or Name) from a Server Extension File Store, to the Server's File Store and is used exclusively in a clustered environment. Request takes zipped file data as content, and on success returns a response containing the Managed File ID (or Name) of the directory. Warning This method is strictly used internally by PReS Connect.

  • PAGE 477

    Content Type: Status: text/plain l l l l 200 OK – Directory successfully synchronized/uploaded to File Store 401 Unauthorized – Server authentication required 403 Forbidden – Server authentication has failed or expired 405 Not Allowed – Directory already exists in File Store Page 477

  • PAGE 478

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

  • PAGE 479

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

  • PAGE 480

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

  • PAGE 481

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

  • PAGE 482

    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 483

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

  • PAGE 484

    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 485

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

  • PAGE 486

    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 487

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

  • PAGE 488

    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 489

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

  • PAGE 490

    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 491

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

  • PAGE 492

    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 493

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

  • PAGE 494

    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 495

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

  • PAGE 496

    Content: HTML output for the Data Record Content Type: text/html Status: l l l l l 200 OK – Output created successfully 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 Internal Server Error – Content Creation Error: Data Record not found / Web context in template not found Page 496

  • PAGE 497

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

  • PAGE 498

    Status: l l l l l 200 OK – Output created successfully 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 Internal Server Error – Content Creation Error: Data Record not found / Web context in template not found Page 498

  • PAGE 499

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

  • PAGE 500

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

  • PAGE 501

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

  • PAGE 502

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

  • PAGE 503

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

  • PAGE 504

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

  • PAGE 505

    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 506

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

  • PAGE 507

    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 508

    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 509

    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 509

  • PAGE 510

    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 511

    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 511

  • PAGE 512

    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 513

    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 513

  • PAGE 514

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

  • PAGE 515

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

  • PAGE 516

    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 517

    required l 403 Forbidden – Server authentication has failed or expired Page 517

  • PAGE 518

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

  • PAGE 519

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

  • PAGE 520

    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 521

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

  • PAGE 522

    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 523

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

  • PAGE 524

    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 525

    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 526

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

  • PAGE 527

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

  • PAGE 528

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

  • PAGE 529

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

  • PAGE 530

    required l 403 Forbidden – Server authentication has failed or expired Page 530

  • PAGE 531

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

  • PAGE 532

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

  • PAGE 533

    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 534

    required l 403 Forbidden – Server authentication has failed or expired Page 534

  • PAGE 535

    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 536

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

  • PAGE 537

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

  • PAGE 538

    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 539

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

  • PAGE 540

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

  • PAGE 541

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

  • PAGE 542

    required l 403 Forbidden – Server authentication has failed or expired Page 542

  • PAGE 543

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

  • PAGE 544

    required l 403 Forbidden – Server authentication has failed or expired Page 544

  • PAGE 545

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

  • PAGE 546

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

  • PAGE 547

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

  • PAGE 548

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

  • PAGE 549

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

  • PAGE 550

    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 551

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

  • PAGE 552

    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 553

    required l 403 Forbidden – Server authentication has failed or expired Page 553

  • PAGE 554

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

  • PAGE 555

    required l 403 Forbidden – Server authentication has failed or expired Page 555

  • PAGE 556

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

  • PAGE 557

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

  • PAGE 558

    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 559

    required l 403 Forbidden – Server authentication has failed or expired Page 559

  • PAGE 560

    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 561

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

  • PAGE 562

    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 563

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

  • PAGE 564

    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 565

    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 566

    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 566

  • PAGE 567

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

  • PAGE 568

    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 568

  • PAGE 569

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

  • PAGE 570

    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 570

  • PAGE 571

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

  • PAGE 572

    Response: Add.

  • PAGE 573

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

  • PAGE 574

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

  • PAGE 575

    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 576

    required l 403 Forbidden – Server authentication has failed or expired Page 576

  • PAGE 577

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

  • PAGE 578

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

  • PAGE 579

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

  • PAGE 580

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

  • PAGE 581

    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 582

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

  • PAGE 583

    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 584

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

  • PAGE 585

    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 586

    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 587

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

  • PAGE 588

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

  • PAGE 589

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

  • PAGE 590

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

  • PAGE 591

    the data file or an individual workflow process (see error description) Response (Synchronous + Get Result as Text): Add.

  • PAGE 592

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

  • PAGE 593

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

  • PAGE 594

    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 595

    required l 403 Forbidden – Server authentication has failed or expired Page 595

  • PAGE 596

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

  • PAGE 597

    Output File itself 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 597

  • PAGE 598

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

  • PAGE 599

    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 599

  • PAGE 600

    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 601

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

  • PAGE 602

    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 603

    Copyright Information Copyright © 1994–2021 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 604

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