Rest Interface Guide

Publishing

The publishing capabilities of the API allow application developers to publish content and includes the following REST calls:

getPublishingChannels

Function

Get the publishing channels for a particular content type.

Description

This request returns the metadata of all the available publishing channels for given content type. Null will be returned in case the channel doesn't exist for the given content type.

Type

GET

URL Format

.../publish/publishingchannels/[content type name or ID]

Java API

Method Name

Class Name

getPublishingChannels

com.quark.qpp.service.facade Class PublishFacade

Parameters

This request requires no input parameters.

Returns

Returns a publishingChannelList object.

Examples

URL:

http://serverName:serverPort/rest/service/publish/publishingchannels/Picture

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo name="IM.JPG" id="convertImage">
        <parameter>SOURCE_FILE_EXTENSION</parameter>
        <parameter>OUTPUT_FILE_NAME</parameter>
    </publishingChannelInfo>
    <publishingChannelInfo name="Extract Image Metadata" id="extractImageAttributes">
        <parameter>SOURCE_FILE_EXTENSION</parameter>
        <parameter>OUTPUT_FILE_NAME</parameter>
    </publishingChannelInfo>
    <publishingChannelInfo name="EPS.JPG" id="epsPreview">
        <parameter>SOURCE_FILE_EXTENSION</parameter>
        <parameter>OUTPUT_FILE_NAME</parameter>
    </publishingChannelInfo>
</publishingChannelList>

getAllPublishingChannels

Function

Get all publishing channels.

Description

This request returns the metadata of all existing Publishing Channels with their parameters.

Type

GET

URL Format

.../publish/publishingchannels

Java API

Method Name

Class Name

getAllPublishingChannels

com.quark.qpp.service.facade Class PublishFacade

Parameters

This request requires no input parameters.

Returns

Returns a publishingChannelList object containing an array of all existing publishing channels.

Examples

URL:

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

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo name="PDF" id="qxpPdf">
        <parameter>ASSET_ID</parameter> .... </publishingChannelInfo>
    <publishingChannelInfo name="JPEG.ZIP" id="qxpImage">
        <parameter>ASSET_ID</parameter> .... </publishingChannelInfo> ..... </publishingChannelList>

getDeliveryChannels

Function

Get all delivery channels.

Description

This request returns the metadata of all existing Delivery Channels with their parameters.

Type

GET

URL Format

.../publish/deliverychannels

Java API

Method Name

Class Name

getDeliveryChannels

com.quark.qpp.service.facade Class PublishFacade

Parameters

This request requires no input parameters.

Returns

Returns a publishingChannelList object containing an array of all existing delivery channels.

Examples

URL:

http://serverName:serverPort/rest/service/publish/deliverychannels

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo name="Publish to Sharepoint" id="checkInToSharepoint">
        <parameter>ASSET_ID</parameter> .... </publishingChannelInfo>
    <publishingChannelInfo name="Publish to FileNet" id="checkInToFileNet">
        <parameter>ASSET_ID</parameter> .... </publishingChannelInfo> ..... </publishingChannelList>

publishAsset

Function

Publish an asset.

Description

This request returns the stream after publishing an asset into a specified format using the publishing channel.

Type

GET

URL Format

.../publish/[asset ID] or /publishbypath/[asset path]

Java API

Method Name

Class Name

publishAsset

com.quark.qpp.service.facade Class PublishFacade

Parameters

 

 

Name

Type

Description

publishingchannel =[Publishing Channel] & [Publishing Channel Parameters]

string

The publishing channel used for publishing the content along with publishing parameters (specific to provided publishing channel)(Mandatory)

majorversion

int

The major version number of the asset to be published. Optional.

minorversion

int

The minor version number of the asset to be published. Optional.

Returns

Returns the filestream after publishing an asset into required format.

Examples

URL:

http://serverName:serverPort/publish/[asset ID]? publishingchannel=qxpPdf&majorversion=1&minorversion=0

Result:

The filestream after publishing an asset into required format.

Function

Deliver an asset.

Description

This request delivers a QPP or Non-QPP asset at any fileserver, sharepoint server, filenet or documentum.

Type

GET

URL Format

.../publish/[asset ID] or /publishbypath/[asset path]

Java API

Method Name

Class Name

publishAsset

com.quark.qpp.service.facade Class PublishFacade

Parameters

 

 

Name

Type

Description

deliverychannel =[Delivery Channel] & [Delivery Channel Parameters]

string

The delivery channel used to deliver a QPP asset or published content to any of the available delivery channels. (Mandatory)Delivery channel parameters are specific to the channel and all are mandatory.

Returns

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

Examples

URL:

http://serverName:serverPort/publish/[asset ID]? deliverychannel=checkInToFileNet&parameter1=value1?...

Function

Publish and deliver an asset.

Description

This request publishes any QPP or Non-QPP asset into the required format and delivers the published content at any fileserver, sharepoint server, filenet or documentum at the same time.

Type

GET

URL Format

.../publish/[asset ID]/publish/[asset ID] or /publish//publishbypath/[asset path]

Java API

Method Name

Class Name

publishAsset

com.quark.qpp.service.facade Class PublishFacade

Parameters

 

 

Name

Type

Description

publishingchannel =[Publishing Channel] & [Publishing Channel Parameters]

string

The publishing channel used for publishing the content along with publishing parameters (specific to provided publishing channel).

deliverychannel =[Delivery Channel] & [Delivery Channel Parameters]

string

The delivery channel used to deliver the QPP asset or published content to any of the available delivery channels. Delivery channel parameters are specific to the channel and all are mandatory.

majorversion

int

The major version number of the asset to be published. Optional.

minorversion

 

int

The minor version number of the asset to be published. Optional.

Returns

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

Examples

URL:

http://serverName:serverPort/publish/[asset ID]? publishingchannel=qxpPdf& deliverychannel=checkInToFileNet& parameter1=value1?...

publishBasedOnURI

Function

Publish a non-Platform resource.

Description

Takes input in the form of URI.

Type

GET

URL Format

.../publish

Java API

Method Name

Class Name

publishBasedOnURI

com.quark.qpp.service.facade Class PublishFacade

Parameters

Name

Type

Description

uri

string

Input a non QPP resource available on any of the URIs. Supported URIs are file, qpp, classpath, SharePoint and http.

publishingchannel

string

The publishing channel used for publishing the content along with publishing parameters (specific to provided publishing channel).

Returns

Returns the filestream of output after publishing an asset to the required format.

Examples

URL:

http://serverName:serverPort/rest/service/publish?uri=file: \\server1\\abc\\abc.xml40& publishingchannel=busDocPdf

Result:

The filestream of output after publishing an asset to the required format.

Function

Deliver a non-Platform resource.

Description

Include the file in the request body or as file part. Takes input in the form of URI.

Type

GET

URL Format

.../publish

Java API

Method Name

Class Name

publishBasedOnURI

com.quark.qpp.service.facade Class PublishFacade

Parameters

Name

Type

Description

uri

string

Input the non QPP resource available on any of the URIs. Supported URIs are file, qpp, classpath, SharePoint and http.

deliverychannel

string

The delivery channel used to deliver the QPP asset or published content to any of the available delivery channels.Delivery channel parameters are specific to the channel and all are mandatory.

Returns

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

Examples

URL:

http://serverName:serverPort/rest/service/publish?uri=qpp: //assets/40&deliverychannel=FileSystem&LOCATION=C:\DATA\temp

publishBasedOnStreamContext

Function

Publish a non-platform resource.

Description

This request will publish a non-platform resource. Takes input in the form of a file stream.

Type

POST

URL Format

.../publish

Java API

Method Name

Class Name

publishBasedOnStreamContext

com.quark.qpp.service.facade Class PublishFacade

Parameters

Name

Type

Description

publishingchannel

string

The publishing channel used for publishing the content along with publishing parameters (specific to provided publishing channel).

Returns

Returns the filestream of output after publishing an asset to the required format.

Examples

URL:

http://serverName:serverPort/rest/service/publish?publishingchannel=busDocPdf

Result:

The filestream of output after publishing an asset to the required format.

Function

Deliver a non-Platform resource.

Description

Publish and deliver non-platform resource. Takes input in the form of a file stream.

Type

GET

URL Format

.../publish

Java API

Method Name

Class Name

publishBasedOnStreamContext

com.quark.qpp.service.facade Class PublishFacade

Parameters

Name

Type

Description

deliverychannel

string

The delivery channel used to deliver the QPP asset or published content to any of the available delivery channels.Delivery channel parameters are specific to the channel and all are mandatory.

Returns

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

Examples

URL:

http://serverName:serverPort/rest/service/publish?deliverychannel=FileSystem&LOCATION=C:\DATA\temp

createDatadoc

Function

Create a Datadoc.

Description

This request creates a datadoc by executing the given datadoc channel and checks it in to the platform with the given metadata.

Type

GET

URL Format

.../datadocchannels

Java API

Method Name

Class Name

createDatadoc

com.quark.qpp.service.facadeClass PublishFacade

Parameters

Name

Type

Description

op=createdatadoc

string

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

datadocchannel= {DataDoc Channel Id}

string

The Datadoc channel. (Mandatory)

createMinorVersion={true|false}

boolean

Indicates whether you should create a Minor version.

attributevalues=<XML/>

string

See "Request/Response parameter formats."

Returns

Returns the metadata of newly created Datadoc asset.

Examples

URL:

http://serverName:serverPort/rest/service/publish/? op=createdatadoc &datadocchannel=createDataDocAssetFromHttpUrl &CONTENT_URL=http://Server:Port/SampleBusDoc.xml &attributevalues=

<?xml version="1.0" encoding="UTF-8"?>
<attributeValueList>
    <attributeValue valueId="0" type="text" name="Name" id="2">SampleBusDoc827574.xml </attributeValue>
    <attributeValue valueId="1" type="popup" name="Routed to" id="25">Admin</attributeValue>
    <attributeValue valueId="10" type="popup" name="Status" id="24">Status1</attributeValue>
    <attributeValue valueId="1" type="popup" name="Collection" id="55">Home</attributeValue>
    <attributeValue valueId="10" type="popup" name="Workflow" id="54">Workflow1</attributeValue>
    <attributeValue valueId="1104" type="popup" name="Content Type" id="62">Business Document</attributeValue>
    <attributeValue valueId="0" type="text" name="File extension" id="11">xml</attributeValue>
    <attributeValue valueId="0" type="text" name="Original filename" id="33">SampleBusDoc827.xml</attributeValue>
</attributeValueList>

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfo id="61">
    <assetVersion minorVersion="0" majorVersion="1"/>
    <attributeValueList>
        <attributeValue type="numeric" name="Id" id="1">61</attributeValue>
        <attributeValue type="text" name="Name" id="2">SampleBusDoc827574.xml</attributeValue>
        <attributeValue type="dateTime" name="Created" id="3">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue type="dateTime" name="Last modified" id="4">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Creator" id="5">Admin</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Last modifier" id="6">Admin</attributeValue>
        <attributeValue type="numeric" name="Major version" id="7">1</attributeValue>
        <attributeValue type="text" name="File path" id="8">/00/3d/61.1-0.1.1.xml</attributeValue>
        <attributeValue type="text" name="File extension" id="11">xml</attributeValue>
        <attributeValue type="numeric" name="File size" id="12">1591</attributeValue>
        <attributeValue type="boolean" name="Is checked out" id="13">false</attributeValue>
        <attributeValue type="dateTime" name="Last content update" id="19">2014-10-28T11:39:46Z</attributeValue> ..... </attributeValueList>
</assetInfo>

getDatadocChannels

Function

Get all datadoc channels.

Description

This request returns all channels of type 'datadoc' that exist in the system.

Type

GET

URL Format

.../datadocchannels

Java API

Method Name

Class Name

getDatadocChannels

com.quark.qpp.service.facade Class PublishFacade

Parameters

This request requires no input parameters.

Returns

Returns a publishingChannelList object containing the metadata of channels of type datadoc.

Examples

URL:

http://serverName:serverPort/rest/service/publish/datadocchannels

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo name="Create Data Document From HTTP URL" id="createDataDocAssetFromHttpUrl">
        <parameter>CONTENT_URL</parameter>
        <parameter>XSL_URI</parameter>
    </publishingChannelInfo>
    <publishingChannelInfo name="Fetch Excel Data Object" id="fetchExcelDataObject">
        <parameter>ASSET_ID</parameter>
        <parameter>WORKSHEET_NAME</parameter>
        <parameter>DATA_OBJECT_TYPE</parameter>
        <parameter>DATA_OBJECT_NAME</parameter>
        <parameter>OUTPUT_FORMAT</parameter>
        <parameter>OUTPUT_FORMAT_PROPERTIES</parameter>
    </publishingChannelInfo>
</publishingChannelList>

Function

Get DataDoc Channels for Desired Content-Type.

Description

This request returns channels of type DataDoc which are mapped to the given content type.

Type

GET

URL Format

.../datadocchannels/{contentTypeIdOrName}

Java API

Method Name

Class Name

getDatadocChannels

com.quark.qpp.service.facade Class PublishFacade

Parameters

This request requires no input parameters.

Returns

Returns a publishingChannelList object containing the metadata of channels of type 'datadoc' mapped to a specific content type.

Examples

URL:

http://serverName:serverPort/rest/service/publish/datadocchannels/{Contenty-Type Id }

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publishingChannelList>
    <publishingChannelInfo name="Fetch Excel Data Object" id="fetchExcelDataObject">
        <parameter>ASSET_ID</parameter>
        <parameter>WORKSHEET_NAME</parameter>
        <parameter>DATA_OBJECT_TYPE</parameter>
        <parameter>DATA_OBJECT_NAME</parameter>
        <parameter>OUTPUT_FORMAT</parameter>
        <parameter>OUTPUT_FORMAT_PROPERTIES</parameter>
    </publishingChannelInfo>
</publishingChannelList>

fetchDatadocAssets

Function

Fetch Datadoc Assets.

Description

This request returns the metadata of the datadoc assets which had been created by executing the given channel and parameters.

Type

GET

URL Format

...publish/

Java API

Method Name

Class Name

fetchDatadocAssets

com.quark.qpp.service.facadeClass PublishFacade

Parameters

Name

Type

Description

op=fetchdatadocassets

string

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

datadocchannel= {DataDoc Channel Id}

string

The Datadoc channel. (Mandatory)

Returns

Returns the metadata of the Datadoc asset created through the supplied datadoc channel.

Examples

URL:

http://serverName:serverPort/rest/service/publish? op=fetchdatadocassets&datadocchannel=createDataDocAssetFromHttpUrl

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfo id="61">
    <assetVersion minorVersion="0" majorVersion="1"/>
    <attributeValueList>
        <attributeValue type="numeric" name="Id" id="1">61</attributeValue>
        <attributeValue type="text" name="Name" id="2">SampleBusDoc827574.xml</attributeValue>
        <attributeValue type="dateTime" name="Created" id="3">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue type="dateTime" name="Last modified" id="4">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Creator" id="5">Admin</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Last modifier" id="6">Admin</attributeValue>
        <attributeValue type="numeric" name="Major version" id="7">1</attributeValue>
        <attributeValue type="text" name="File path" id="8">/00/3d/61.1-0.1.1.xml</attributeValue>
        <attributeValue type="text" name="File extension" id="11">xml</attributeValue>
        <attributeValue type="numeric" name="File size" id="12">1591</attributeValue>
        <attributeValue type="boolean" name="Is checked out" id="13">false</attributeValue>
        <attributeValue type="dateTime" name="Last content update" id="19">2014-10-28T11:39:46Z</attributeValue> ..... </attributeValueList>
</assetInfo>

executeDatadocChannel

Function

Execute Datadoc Channels.

Description

This request executes the given datadoc channel and writes the resulted datadoc content to the given outputstream.

Type

GET

URL Format

...publish/

Java API

Method Name

Class Name

executeDatadocChannel

com.quark.qpp.service.facadeClass PublishFacade

Parameters

Name

Type

Description

op=executedatadocchannel

string

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

datadocchannel= {DataDoc Channel Id}

string

The Datadoc channel. (Mandatory)

channelparameters= <XML/>

string

Channel parameters.

Returns

Resultant output is returned in the response body stream.

Examples

URL:

http://serverName:serverPort/rest/service/publish? op=executedatadocchannel&datadocchannel=fetchExcelDataObject&...

updateDatadoc

Function

Update a Datadoc.

Description

This request updates the existing datadoc asset by creating its new version. Latest content of the asset is fetched by executing the desired datadoc channel.

Type

POST

URL Format

...publish/{assetId}

Java API

Method Name

Class Name

updateDatadoc

com.quark.qpp.service.facadeClass PublishFacade

Parameters

Name

Type

Description

op=updatedatadoc

string

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

datadocchannel= {DataDoc Channel Id}

string

The Datadoc channel. (Mandatory)

createMinorVersion={true|false}

boolean

Indicates whether you should create a Minor version.

attributevalues=<XML/>

string

See "Request/Response parameter formats."

Returns

Returns the metadata of the successfully updated Datadoc asset.

Examples

URL:

http://serverName:serverPort/rest/service/publish/?op=createdatadoc &datadocchannel=createDataDocAssetFromHttpUrl &CONTENT_URL=http://Server:Port/SampleBusDoc.xml &attributevalues=

<?xml version="1.0" encoding="UTF-8"?>
<attributeValueList>
    <attributeValue valueId="0" type="text" name="Name" id="2">SampleBusDoc827574.xml </attributeValue>
    <attributeValue valueId="1" type="popup" name="Routed to" id="25">Admin</attributeValue>
    <attributeValue valueId="10" type="popup" name="Status" id="24">Status1</attributeValue>
    <attributeValue valueId="1" type="popup" name="Collection" id="55">Home</attributeValue>
    <attributeValue valueId="10" type="popup" name="Workflow" id="54">Workflow1</attributeValue>
    <attributeValue valueId="1104" type="popup" name="Content Type" id="62">Business Document</attributeValue>
    <attributeValue valueId="0" type="text" name="File extension" id="11">xml</attributeValue>
    <attributeValue valueId="0" type="text" name="Original filename" id="33">SampleBusDoc827.xml</attributeValue>
</attributeValueList>

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfo id="61">
    <assetVersion minorVersion="0" majorVersion="1"/>
    <attributeValueList>
        <attributeValue type="numeric" name="Id" id="1">61</attributeValue>
        <attributeValue type="text" name="Name" id="2">SampleBusDoc827574.xml</attributeValue>
        <attributeValue type="dateTime" name="Created" id="3">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue type="dateTime" name="Last modified" id="4">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Creator" id="5">Admin</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Last modifier" id="6">Admin</attributeValue>
        <attributeValue type="numeric" name="Major version" id="7">1</attributeValue>
        <attributeValue type="text" name="File path" id="8">/00/3d/61.1-0.1.1.xml</attributeValue>
        <attributeValue type="text" name="File extension" id="11">xml</attributeValue>
        <attributeValue type="numeric" name="File size" id="12">1591</attributeValue>
        <attributeValue type="boolean" name="Is checked out" id="13">false</attributeValue>
        <attributeValue type="dateTime" name="Last content update" id="19">2014-10-28T11:39:46Z</attributeValue> ..... </attributeValueList>
</assetInfo>

detachDatadocChannel

Function

Detach a DataDoc asset from its source.

Description

This request detaches or unlinks the given datadoc asset from its source content and creates a new version of the asset. After detaching/unlinking, the given asset will no more be a datadoc asset and thus can be checked-out and checked-in by the end user like other conventional assets in the Platform.

Type

GET

URL Format

.../publish/{assetId}/

Java API

Method Name

Class Name

detachDatadocChannel

com.quark.qpp.service.facadeClass PublishFacade

Parameters

Name

Type

Description

op=detachdatadoc

string

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

attributevalues=<XML/>

string

The Datadoc channel. (Mandatory)

createMinorVersion={true|false}

boolean

Indicates whether you should create a Minor version.

Returns

Returns the metadata of newly created asset.

Examples

URL:

http://serverName:serverPort/rest/service/publish? op=detachdatadoc&attributevalues=<xml/>&createminorversion=false

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfo id="61">
    <assetVersion minorVersion="0" majorVersion="1"/>
    <attributeValueList>
        <attributeValue type="numeric" name="Id" id="1">61</attributeValue>
        <attributeValue type="text" name="Name" id="2">SampleBusDoc827574.xml</attributeValue>
        <attributeValue type="dateTime" name="Created" id="3">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue type="dateTime" name="Last modified" id="4">2014-10-28T11:39:46Z</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Creator" id="5">Admin</attributeValue>
        <attributeValue multiValued="false" valueId="1" type="popup" name="Last modifier" id="6">Admin</attributeValue>
        <attributeValue type="numeric" name="Major version" id="7">1</attributeValue>
        <attributeValue type="text" name="File path" id="8">/00/3d/61.1-0.1.1.xml</attributeValue>
        <attributeValue type="text" name="File extension" id="11">xml</attributeValue>
        <attributeValue type="numeric" name="File size" id="12">1591</attributeValue>
        <attributeValue type="boolean" name="Is checked out" id="13">false</attributeValue>
        <attributeValue type="dateTime" name="Last content update" id="19">2014-10-28T11:39:46Z</attributeValue> ..... </attributeValueList>
</assetInfo>