1.5
Table Of Contents
- Table of Contents
- Welcome to the PlanetPress Connect REST API Cookbook
- Technical Overview
- Working Examples
- REST API Reference
- Authentication Service
- Content Creation Service
- Content Item Entity Service
- Content Set Entity Service
- Data Record Entity Service
- Data Set Entity Service
- Data Mapping Service
- Content Creation (Email) Service
- File Store Service
- Content Creation (HTML) Service
- Job Creation Service
- Job Entity Service
- Job Set Entity Service
- Output Creation Service
- All-In-One Service
- Copyright Information
- Legal Notices and Acknowledgments
/* Data Mapping Service - Process Data Mapping (JSON) Example */
(function ($) {
"use strict";
$(document).ready(function () {
setupExample();
var $submitButton = $("#submit"),
$cancelButton = $("#cancel"),
$progressBar = $("progress"),
operationId = null;
$cancelButton.on("click", function () {
if (operationId !== null) {
/* Cancel an Operation */
$.ajax({
type: "POST",
url:
"/rest/serverengine/workflow/datamining/cancel/" + operationId
}).done(function (response) {
displayInfo("Operation Cancelled!");
operationId = null;
setTimeout(function () {
$progressBar.attr("value", 0);
$submitButton.removeAttr("disabled");
$cancelButton.attr("disabled", "disabled");
}, 100);
}).fail(displayDefaultFailure);
}
});
$("form").on("submit", function (event) {
event.preventDefault();
if (!checkSessionValid()) { return; }
var configId = $("#datamapper").val(),
dataFileId = $("#datafile").val();
var getFinalResult = function () {
/* Get Result of Operation */
Page 109