Rest Interface Guide

Configuration

The Configuration service is used to manage the publishing configuration (adding/updating new publishing channels, processes and MIME types) and is responsible for the following:

  • Managing the configuration files.

  • Capturing updates.

  • Reinitializing corresponding bean definitions.

In a multi-server environment, each node in a cluster must have access to a single .ext folder and the shared location must be appended to the classpth system environment variable.

POST requests only alter config files on a configured app server node. Multi-server deployments can leverage a shared file system location for the config files and avoid needing to manually maintain multiple sets of files on various application servers.

The reInitialize call can be used to avoid restarts even after changing the configuration files manually on the server .

The configuration capabilities of the API includes the following REST calls:

getAllXmlMimeTypes

Function

Get XML MimeTypes

Description

This request returns all XML MimeTypes that exist on the server.

Type

GET

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

getAllXmlMimeTypes

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

This request requires no input parameters.

Returns

Returns the definitions of all xml mime-types.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mimeTypeInfoList>
    <mimeTypeInfo type="application/xml; format=smarttable" parentMimeType="application/xml;">
        <xpath>/*[local-name()='table']/@type='smarttable'</xpath>
    </mimeTypeInfo>
    <mimeTypeInfo type="application/xml; format=auxiliarydictionary" parentMimeType="format=hyphenationexceptions">
        <xpath>/*[local-name()='Dictionary']/@Type='AuxiliaryDictionary'</xpath>
    </mimeTypeInfo>
    <mimeTypeInfo type="application/dita+xml; format=busdoc" parentMimeType="application/dita+xml; format=topic">
        <pi name="Xpress">productLine=&quot;busdoc&quot;</pi>
    </mimeTypeInfo>
    <mimeTypeInfo type="application/xml; format=smartdoc" parentMimeType="application/xml; format=smartcontent">
        <xpath>/*[local-name()='section']/@type='document'</xpath>
    </mimeTypeInfo>
    <mimeTypeInfo type="application/xml; format=smartsection" parentMimeType="application/xml; format= smartcontent">
        <xpath>/*[local-name()='section']/@type='section'</xpath>
    </mimeTypeInfo>
</mimeTypeInfoList>

getXmlMimeType

Function

Get XML MimeType

Description

This request returns a specified XML MimeType.

Type

GET

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

getXmlMimeType

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

Mimetype

string

The desired MimeType. (Mandatory)

Returns

Returns the definition of the desired XML MimeType, including the parent MimeType, xpath and the processing instruction name and value based on which given MimeType is detected.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes? mimetype=application/xml; format=researchreport

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mimeTypeInfoList>
    <mimeTypeInfo type="application/xml; format=researchreport" parentMimeType="application/xml; format= smartcontent">
        <xpath>/*[local-name()='section']/@type='researchreport'</xpath>
    </mimeTypeInfo>
</mimeTypeInfoList>

createXmlMimeType

Function

Create a custom XML MimeType.

Description

This request creates a MimeType for an XML document.

Type

POST

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

createXmlMimeType

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=create

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

mimetype

string

The MimeType to be created. (Mandatory)

parentmimetype

string

The parent MimeType. (Mandatory)

xpath

string

The xPath. (It is mandatory to specify either the xPath or the piName and piValue.)

piname

string

The processing instruction. (It is mandatory to specify either the xPath or the piName and piValue.)

pivalue

string

The processing value. (It is mandatory to specify either the xPath or the piName and piValue.)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes? op=create&mimetype=application/xml; format=researchreport&parentmimetype=application/xml; format=smartcontent&xpath=/*[local-name()='section']/@type='researchreport'

getMappedMimeTypes

Function

Get mapped MimeTypes

Description

This request returns a list of MimeTypes mapped to the given content type.

Type

GET

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

getMappedMimeTypes

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

contenttype

string

The content type. (Mandatory)

Returns

Returns a mimeTypeInfoList object that contains the metadata of all mimeTypes mapped to the given content type.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes? contenttype=Research Report

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mimeTypeInfoList>
    <mimeTypeInfo type="application/xml; format=researchreport" parentMimeType="application/xml; format= smartcontent">
        <xpath>/*[local-name()='section']/@type='researchreport'</xpath>
    </mimeTypeInfo>
</mimeTypeInfoList>

mapMimeTypes

Function

Map custom XML MimeType with ContentType.

Description

This request maps a content type to a list of mime types.

Type

POST

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

mapMimeTypes

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=mapcontenttype

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

contenttype= [contentTypeIdOrName]

string

The content type to be mapped. (Mandatory)

mimetypes

string

The mimetypes to be mapped. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes? op=mapcontenttype&contenttype=Research Report&mimetypes=application/xml; format=researchreport

unmapMimeTypes

Function

Unmap custom XML MimeType with ContentType.

Description

This request deletes the content type mappings for given mime types.

Type

POST

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

unmapMimeTypes

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=unmapcontenttype

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

mimetypes

string

The mimetypes to be unmapped. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes? ?op=unmapcontenttype&mimetypes=application/xml; format=researchreport

deleteXmlMimeType

Function

Delete custom XML MimeType.

Description

This request deletes an xml mime type and if this mime type is mapped to a content type, that mapping is also deleted.

Type

POST

URL Format

.../config/xmlmimetypes

Java API

Method Name

Class Name

deleteXmlMimeType

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=delete

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

mimeType

string

The mimetype to be deleted. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/xmlmimetypes? op=delete&mimetype=application/xml; format=researchreport

getPublishingProcess

Function

Get publishing process

Description

This request returns the xml configuration of the process with the given process name.

Type

GET

URL Format

.../config/publishingprocess/{ProcessId}

Java API

Method Name

Class Name

getPublishingProcess

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

processName

string

The process name. (Mandatory)

Returns

Returns the xml configuration of the process with the given process name.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingprocess/ researchReportToQxpRenderer

Result:

<beans xmlns="http://www.springframework.org/schema/beans">
    <!-- PROCESS DEFINITIONS -->
    <pub:process id="researchReportToQxpRenderer">
        <pub:activity class="com.quark.qpp.publishing.activity.UnzipXaDocumentPackage">
            <description>Unzips and registers XA document file along with the dependencies supplied in the zip file.</description>
            <property name="activityName">
                <value>UnzipXaDocumentPackage</value>
            </property> ...
    </pub:process>
</beans>

createPublishingProcess

Function

Create publishing process

Description

This request creates a new process based on the publishingPocessXML.

Type

POST

URL Format

.../config/publishingprocess

Java API

Method Name

Class Name

createPublishingProcess

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

processxml= [xml]

string

The publishing process XML (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingprocess ?op=create&processxml=<xml>

deletePublishingProcess

Function

Delete publishing process.

Description

This request deletes the publishing process with the given process name. Deletes the channels where this process is used. Deletes the corresponding configuration file of the process and updates ProcessConfig-ext.xml.

Type

POST

URL Format

.../config/publishingprocess/{ProcessName}

Java API

Method Name

Class Name

deletePublishingProcess

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=delete

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

processName

string

The name of the process to be deleted. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingprocess /researchReportToQxpRenderer?op=delete

getAllPublishingChannelDefinitions

Function

Get all publishing channels

Description

This request returns all publishing of type publish, delver and datadoc.

Type

GET

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

getAllPublishingChannelDefinitions

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

This request requires no input parameters.

Returns

Returns a publishingChannelList object that contains the metadata of all publishing channels (Publish, Deliver, Datadoc).

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo id="qppPreviewConvert" name="QPP.PREVIEW.IM.JPG" process="qppPreviewConverter" type="publish">
        <parameter name="SOURCE_FILE_EXTENSION" ask="true"/>
        <parameter name="OUTPUT_FILE_NAME" ask="true"/>
    </publishingChannelInfo>
    <publishingChannelInfo id="smartDocJpeg" name="QXP.JPEG.ZIP" process="smartDocToQxpRenderer" type="publish">
        <parameter name="ASSET_ID" ask="true"/>
        <parameter name="LAYOUT" ask="true"/> ..... </publishingChannelInfo>
</publishingChannelList>

getPublishingChannelDefinition

Function

Get publishing channel

Description

This request returns the definition of the publishing channel with the given Id, including the channel Id, name, channel type, the channel's process name and channel parameters.

Type

GET

URL Format

.../config/publishingchannels/{channelId}

Java API

Method Name

Class Name

getPublishingChannelDefinition

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

channelId

string

The channel Id of the desired publishing channel. (Mandatory)

Returns

Returns a publishingChannelList object that contains the metadata of the given publishing channel ID.

Examples

URL:

http://serverName:serverPort/rest/service/config/ publishingchannels/smartDocJpeg

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo id="smartDocJpeg" name="QXP.JPEG.ZIP" process="smartDocToQxpRenderer" type="publish">
        <parameter name="ASSET_ID" ask="true"/>
        <parameter name="LAYOUT" ask="true"/>
        <parameter name="BOX" ask="true"/>
        <parameter name="SCALE" ask="true"/> ..... <parameter name="MAX_PAGES" ask="false">0</parameter>
        <parameter name="RESOLVE_QPP_RELATIONS" ask="true">true</parameter>
    </publishingChannelInfo>
</publishingChannelList>

getPublishingChannelDefinitions

Function

Get the publishing channel for a specific content type.

Description

This request returns the definition of the publishing channels of type publish, deliver and datadoc that are mapped to a particular content type.

Type

GET

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

getPublishingChannelDefinitions

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

contenttype

string

The content type that is mapped to the desired publishing channel. (Mandatory)

Returns

Returns a publishingChannelList object that contains the metadata of all the publishing channels available for the given content type.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?contenttype=Smart Document

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo id="smartDocJpeg" name="QXP.JPEG.ZIP" process="smartDocToQxpRenderer" type="publish">
        <parameter name="ASSET_ID" ask="true"/>
        <parameter name="LAYOUT" ask="true"/>
        <parameter name="BOX" ask="true"/>
        <parameter name="SCALE" ask="true"/> ..... <parameter name="MAX_PAGES" ask="false">0</parameter>
        <parameter name="RESOLVE_QPP_RELATIONS" ask="true">true</parameter>
    </publishingChannelInfo>
</publishingChannelList>

createPublishingChannels

Function

Create new publishing channels

Description

This request creates new publishing channels as specified in the publishingChannelList.

Type

POST

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

createPublishingChannels

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=create

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

publishingchannellist= [publishingChannelList]

string

The publishing channel list. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?op=create&publishingchannellist=

<publishingChannelList>publishingChannelList Example: <publishingChannelInfo id="researchReportPdf" name="PDF" process="smartDocToQxpRenderer" type="publish">
        <parameter name="OUTPUT_STYLE" ask="true">PDF High Quality</parameter>
        <parameter name="ASSET_ID" ask="true"/>
        <parameter name="QXP_TEMPLATE_URI" ask="true">classpath:ResearchReportTemplate.qxp</parameter>
        <parameter name="RENDER_FORMAT">PDF</parameter>
        <parameter name="EXCEL_DATA_IMAGE_FORMAT">PDF</parameter>
        <parameter name="ANNOTATE_ERRORS">true</parameter>
        <parameter name="TRACKED_CHANGES" ask="true">ACCEPT</parameter>
        <parameter name="XSL_URI" ask="true">classpath:SmartDoc2QXPS.xslt</parameter>
        <parameter name="APPEND_ERRORS" ask="true">true</parameter>
    </publishingChannelInfo>
    <publishingChannelInfo id="researchReportJpeg" name="QXP.JPEG.ZIP" type="publish" process="smartDocToQxpRenderer">
        <parameter name="ASSET_ID" ask="true"/>
        <parameter name="LAYOUT" ask="true"/>
        <parameter name="BOX" ask="true"/>
        <parameter name="SCALE" ask="true"/>
        <parameter name="RENDER_FORMAT">JPEG</parameter>
        <parameter name="XSL_URI" ask="true">classpath:SmartDoc2QXPS.xslt</parameter>
        <parameter name="QXP_TEMPLATE_URI" ask="true">classpath:SmartDocTemplate.qxp</parameter>
        <parameter name="EXCEL_DATA_IMAGE_FORMAT" ask="true">PDF</parameter>
        <parameter name="CHART_IMAGE_FORMAT">PDF</parameter>
        <parameter name="VISIO_DATA_IMAGE_FORMAT">PDF</parameter>
        <parameter name="POWERPOINT_DATA_IMAGE_FORMAT">PDF</parameter>
        <parameter name="TRACKED_CHANGES" ask="true">ACCEPT</parameter>
        <parameter name="RESOLVE_QPP_RELATIONS" ask="true">true</parameter>
    </publishingChannelInfo>
</publishingChannelList>

createContentChannelMappings

Function

Map publishing channel with content type for publishing.

Description

This request maps content types to channels and updates the "PublishingConfig-ext.xml" file with the new mappings.

Type

POST

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

createContentChannelMappings

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=mapcontenttype

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

contenttypes

string

The content types to be mapped. (Mandatory)

channels[comma-separated list of channels]

string

The publishing channels. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?op=mapcontenttype&contenttypes=Research Report &channels=researchReportPdf,researchReportJpeg

deleteContentChannelMappings

Function

Delete publishing channel and content type mapping.

Description

This request deletes content types to channel mappins and updates the "PublishingConfig-ext.xml" file. If content type is specified, channel mappings are deleted for this content type only. If content type is not specified, then mappings with all content types of the specified channel are deleted.

Type

POST

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

deleteContentChannelMappings

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=unmapcontenttype

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

contenttype

string

The content types to be mapped. (Mandatory)

channel

string

The publishing channel. (Mandatory)

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?op=unmapcontenttype&contenttypes=Research Report &channels=researchReportPdf,researchReportJpeg

createIndexingChannelMapping

Function

Map publishing channel with content type for indexing.

Description

This request maps content types to indexing channels and updates the "IndexingChannels-ext.xml" file with the new mappings.

Type

POST

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

createIndexingChannelMapping

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=mapindexingchannel

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

contenttype

string

The content types to be mapped. (Mandatory)

channels[comma-separated list of channels]

string

The indexing channels. (Mandatory)

parameterMap

string

 

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?op=mapindexingchannel&contenttype=Research Report &channel=researchReportJpeg&QXP_TEMPLATE_URI=classpath:ResearchReportTemplate.qxp

getMappedIndexingChannel

Function

Get mapped indexing channels for a given content type.

Description

This request returns the definition of the indexing channel mapped to the given content type.

Type

GET

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

getMappedIndexingChannel

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

contenttype= [contentTypeIdOrName]

string

The content type. (Mandatory)

indexingchannel=[true|false]

boolean

 

Returns

Returns a publishingChannelList object that contains a list of mapped publishing channels and its metadata.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?contenttype=Research Report&indexingchannel=true

deleteIndexingChannelMapping

Function

Delete publishing channel and content type mapping for indexing.

Description

This request deletes content type to indexing channel mapping and updates the "IndexingChannels-ext.xml" file. If content type is specified, channel mapping is deleted for the given content type only. If content type is not specified, then mappings with all content types of the specified channel are deleted.

Type

POST

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

deleteIndexingChannelMapping

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=unmapindexingchannel

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

channel

string

The channel.

contenttype

string

The content type.

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?op=unmapindexingchannel&channel=researchReportJpeg&contenttype=Research Report

deletePublishingChannels

Function

Delete publishing channel.

Description

This request deletes the channels specified. The "ChannelConfig-ext.xml" file is updated and any mapping for the specified channels is also deleted.

Type

POST

URL Format

.../config/publishingchannels

Java API

Method Name

Class Name

deletePublishingChannels

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=delete

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

channelids

string

The channel Ids of the channels to be deleted.

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/publishingchannels ?op=delete&channelids=researchReportPdf

getDeploymentProperties

Function

Get deployment properties

Description

This request returns all properties specified for the deployment in the "Deployment.properties" file.

Type

GET

URL Format

.../config/deploymentproperties

Java API

Method Name

Class Name

getDeploymentProperties

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

This request requires no input parameters.

Returns

Returns a nameValueList object that contains all the properties.

Examples

URL:

http://serverName:serverPort/rest/service/config/deploymentproperties

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <nameValueList> <nameValue name="deployment.version" value=""/> </nameValueList>

getDeploymentVersion

Function

Get deployment version

Description

This request returns the version of the custom deployment.

Type

GET

URL Format

.../config/deploymentversion

Java API

Method Name

Class Name

getDeploymentVersion

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

This request requires no input parameters.

Returns

Returns the text value of the deployment version specified in the "Deployment.properties" file.

Examples

URL:

http://serverName:serverPort/rest/service/config/deploymentversion

Result:

1.2

reInitialize

Function

ReIntialize

Description

This request reinitializes the mime-type, channel and process definitions using their config files. It will reinitialize the content-mime-type mappings configuration, content type to channel mappings configuration and content type to indexing channel mappings configuration. This request may be used to apply settings assigned directly to config files without restarting the server.

Type

POST

URL Format

.../config/

Java API

Method Name

Class Name

reInitialize

com.quark.qpp.service.facade Class ConfigurationFacade

Parameters

Name

Type

Description

op=reinitializeconfigs

string

The op parameter allows you to specify which operation is to be performed. (Mandatory)

reinitializemimetypes= [true|false]

boolean

 

reinitializechannels=[true|false]

boolean

 

reinitializeprocesses=[true|false]

boolean

 

Returns

A status of 200 is returned in response to a successful request execution.

Examples

URL:

http://serverName:serverPort/rest/service/config/ ?op=reinitializeconfigs&reinitializemimetypes=true&reinitializechannels=true &reinitializeprocesses=true