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 parameters specified.

Request

Method Type:

GET

URI:

/rest/serverengine/workflow/contentcreation/html/{templateId}/{dataRecordId: [0-9]+}

Content:
Content Type:

Add. Headers:

If server security settings are enabled, then one of the following:

  • Authorization – Basic Authentication (Username and Password) credentials (Base64 encoded)
  • auth_token – Authorization Token

Parameters

Path

Name Required Type Default Value Description
templateId

The Managed File ID (or Name) of the template in File Store

dataRecordId

The ID of the Data Record entity in Server

Query

Name Required Type Default Value Description
section

Default section in template

The section within the Web context to create

inline

NONE

The inline mode to be used in the creation of content. Possible values:

  • NONE - no inlining
  • CSS - converts style rules to inline styles on elements
  • ALL - inline all resources
  • LOCAL - inline local resources; remote resources remain external

cssSelector

No

String

 

A CSS selector for the creation of only a specific HTML element within the template

Response

Success

The following lists status codes indicative of a successful response:

Status Code Content Content-Type Add. Headers Description
200
OK
The entire HTML output for the Data Record, or the inner HTML of the first element that matches the given CSS selector, or an empty string if the CSS selector produced no results text/html Output created successfully

Error

The following lists status codes indicative of a failed or error response:

Status Code Content Content-Type Add. Headers Description

400
Bad Request

JSON Error specifying error message

application/json

 

Web context not found / Web section not found

401 Unauthorized

JSON Error specifying error message

application/json

WWW-Authenticate – BASIC (Basic Authentication credentials are accepted)

Server authentication has failed.

Response when either:

  • basic authentication credentials nor an authorization token have been specified in the request headers

  • the basic authentication credentials or the authorization token specified in the request headers are invalid

  • the authorization token specified in the request headers has now expired

403 Forbidden

JSON Error specifying error message

application/json

Server authentication has succeeded, but user authorization for this specific method has failed.

Response when authentication of the credentials or the authorization token specified in the request headers has succeeded, but the user associated with the credentials or the authorization token specified has insufficient role assignment/privileges.

404 Not Found

JSON Error specifying error message

application/json

Template or Data Record entity not found in File Store/Server

500
Internal Server Error

JSON Error specifying error message

application/json

Content Creation Error: Data Record not found / Web context in template not found / Invalid CSS selector.