Rest Interface Guide

Clipboard

The Clipboard service is used to manage user-specific clipboard data on the Platform server. The server-side clipboard enables clipboard access across multiple devices and securely maintains data by user; accessible only to the user who copied the data. The service also manages clipboard data conversion to other formats.

 

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

addClipboardData

Function

Add data to clipboard.

Description

This request adds data to the logged-in user's clipboard and returns info about the data added .

Type

POST

URL Format

.../clipboard

Java API

Method Name

Class Name

addClipboardData

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

op=adddata

string

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

contenttype=[contentTypeId]

or

[Name]

string

The content type Id or Name of the data.

mimetype=[mimeType]

string

The mimeType of the data.

inputstream

string

The data stream.

Returns

Returns a clipboardDataInfo object in XML format, containing information about the data added to the user's clipboard. See the table in the "Request/Response parameter formats" chapter.

Examples

URL:

 

http://server:port/rest/service/clipboard?op=adddata&mimetype=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&contenttype=Microsoft Excel Table&preview=My Excel table preview...&created by=QppAdmin&create on=12th June 2017

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <clipboardDataInfo dataId="24">
    <timestamp>2017-06-12T14:15:34Z</timestamp>
    <contentType id="110171" name="Microsoft Excel Table"/>
    <mimeType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mimeType>
    <clipboardMeta>
      <nameValue name="preview" value="My Excel table preview..."/>
      <nameValue name="create on" value="12th June 2017"/>
      <nameValue name="created by" value="QppAdmin"/>
    </clipboardMeta>
  </clipboardDataInfo>

addFormattedData

Function

Add formatted data.

Description

This request adds formatted-data to the logged-in user’s clipboard for the data corresponding to the data Id.

Type

POST

URL Format

.../clipboard/{dataId}

Java API

Method Name

Class Name

addFormattedData

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

op=addformatteddata

string

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

inputstream

 

 

string

The data stream.

format

string

The format of the data.

Returns

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

Examples

URL:

http://server:port/rest/service/clipboard/24?op=addformatteddata&format=jpeg

getAllClipboardChannelsMapping

Function

Get all clipboard cannel mappings.

Description

This request retrieves all of the clipboard format to channel mappings.

Type

GET

URL Format

.../clipboard/channelsmapping

Java API

Method Name

Class Name

getAllClipboardChannelsMapping

com.quark.qpp.service.facade.ClipboardFacade

Parameters

This request requires no input parameters.

Returns

Returns a clipboardChannelMappingInfoList object in XML format, containing a list of all clipboard format to channel mappings.

Examples

URL:

http://server:port/rest/service/clipboard/channelsmapping

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<clipboardChannelMappingInfoList>
  <clipboardChannelMappingInfo id="fetchExcelTable"                 contentType="Microsoft Excel Table" clipboardFormat="svg"/>
    <channelParameters>
      <nameValue name="OUTPUT_FORMAT" value="image"/>
      <nameValue name="OUTPUT_FORMAT_PROPERTIES" value="imageformate=svg"/>
    </channelParameters>
  </clipboardChannelMappinInfo>
  <clipboardChannelMappingInfo id="fetchExcelTable"                 contentType="Microsoft Excel Table" clipboardFormat="png"/>        <channelParameters>
      <nameValue name="OUTPUT_FORMAT" value="image"/>
      <nameValue name="OUTPUT_FORMAT_PROPERTIES" value="imageformate=png"/>
    </channelParameters>
  </clipboardChannelMappinInfo>
......
</clipboardChannelMappingInfoList>

 

getClipboardData

Function

To get the clipboard data.

Type

Get

URL Format

.../clipboard/{dataId}

Java API

Method Name

Class Name

getClipboardData

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

 

contentDisposition

 

string

Optional value used to set content-disposition header value in response

outputStream

string

output stream onto which output is to be written. This parameter is applicable only for the local invocations

Returns

Returns the data associated with the given dataId.

Examples

URL:

http://server:port/rest/service/clipboard/24?

getAllClipboardDataInfos

 

Function

Get all clipboard data information.

Description

This request fetches information about all the data present in the logged-in user’s clipboard.

Type

GET

URL Format

.../clipboard

Java API

Method Name

Class Name

getAllClipboardDataInfos

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

metadata=true

boolean

 (Mandatory)

Returns

Returns a clipboardDataInfoList object in XML format, containing information about all the data present in the user’s clipboard.

Examples

URL:

http://server:port/rest/service/clipboard? metadata=true

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<clipboardDataInfoList>
  <clipboardDataInfo dataId="24">
    <timestamp>2017-06-12T14:15:34Z</timestamp>
    <contentType id="110171" name="Microsoft Excel Table"/>
    <mimeType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mimeType>
    <clipboardMeta>
      <nameValue name="preview" value="My Excel table preview..."/>
      <nameValue name="create on" value="12th June 2017"/>
      <nameValue name="created by" value="QppAdmin"/>
    </clipboardMeta>
  </clipboardDataInfo>
</clipboardDataInfoList>

getAllClipboardFormats

Function

Get all clipboard formats

Description

This request returns all the data formats supported for clipboard data.

Type

GET

URL Format

.../clipboard/formats

Java API

Method Name

Class Name

getAllClipboardFormats

com.quark.qpp.service.facade.ClipboardFacade

Parameters

This request requires no input parameters

Returns

Returns a clipboardFormatInfoListobject containing an array of all the clipboard data formats in XML format. See the table in the "Request/Response parameter formats" chapter.

Examples

URL:

http://server:port/rest/service/clipboard/formats

Result:

<?xml version="1.0" encoding="UTF-8"?>
<clipboardFormatInfoList>
  <clipboardFormatInfo>
  <name>svg</name>
  <mimeType>image/svg+xml</mimeType>
  </clipboardFormatInfo>
  <clipboardFormatInfo>
  <name>png</name>
  <mimeType>image/png</mimeType>
  </clipboardFormatInfo>
  <clipboardFormatInfo>
  <name>jpeg</name>
  <mimeType>image/jpeg</mimeType>
  </clipboardFormatInfo>
  <clipboardFormatInfo>
  <name>pdf</name>
  <mimeType>application/pdf</mimeType>
  </clipboardFormatInfo>
  <clipboardFormatInfo>
  <name>cals</name>
  <mimeType>application/xml</mimeType>
  </clipboardFormatInfo>
</clipboardFormatInfoList>

getClipboardDataInfo

Function

Get clipboard data information.

Description

This request fetches information about the logged-in user’s clipboard data using the data Id.

Type

GET

URL Format

.../clipboard/{dataId}

Java API

Method Name

Class Name

getClipboardDataInfo

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

metadata=true

boolean

 (Mandatory)

Returns

Returns a clipboardDataInfo object in XML format, containing information about the clipboard data using the data Id.

Examples

URL:

http://server:port/rest/service/clipboard/24? metadata=true

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <clipboardDataInfo dataId="24">
    <timestamp>2017-06-12T14:15:34Z</timestamp>
    <contentType id="110171" name="Microsoft Excel Table"/>
    <mimeType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mimeType>
    <clipboardMeta>
      <nameValue name="preview" value="My Excel table preview..."/>
      <nameValue name="create on" value="12th June 2017"/>
      <nameValue name="created by" value="QppAdmin"/>
    </clipboardMeta>
  </clipboardDataInfo>

getClipboardChannelsMapping

Function

Get clipboard channel mappings for content type.

Description

This request returns the cipboard format to channel mappings based on the content type.

Type

GET

URL Format

.../clipboard/channelsmapping

Java API

Method Name

Class Name

getClipboardChannelsMapping

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

contenttype=contentTypeIdOrName

string

 The content type.(Mandatory)

Returns

Returns a clipboardChannelMappingInfoList object in XML format.

Examples

URL:

http://server:port/rest/service/clipboard/channelsmapping?contenttype=Microsoft Excel Table

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<clipboardChannelMappingInfoList>
  <clipboardChannelMappingInfo id="fetchExcelTable" contentType="Microsoft Excel Table" clipboardFormat="svg">
  <channelParameters>
  <nameValue name="OUTPUT_FORMAT" value="image"/>
  <nameValue name="OUTPUT_FORMAT_PROPERTIES" value="imageformat=svg"/>
  </channelParameters>
  </clipboardChannelMappingInfo>
  <clipboardChannelMappingInfo id="fetchExcelTable" contentType="Microsoft Excel Table" clipboardFormat="png">
  <channelParameters>
  <nameValue name="OUTPUT_FORMAT" value="image"/>
  <nameValue name="OUTPUT_FORMAT_PROPERTIES" value="imageformat=png"/>
  </channelParameters>
  </clipboardChannelMappingInfo>
  ......
</clipboardChannelMappingInfoList>

getFormattedData

 

Function

Get formatted data.

Description

This request retrieves formatted data based on the data Id and format. The formatted data is retrieved by using default Channel Mappings if no publishing channel parameter is specified.

Type

GET

URL Format

.../clipboard/{dataId}

Java API

Method Name

Class Name

getFormattedData

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

format

string

The format in which clipboard data is to be retrieved.

publishingchannel

 

 

string

The publishing channel Id.

parametersMap

string

The publishing channel parameters.

contentdisposition

 

The content disposition value to be set on the http response header.

outputStream

string

The output stream onto which output is to be written (for local API invocations).

Returns

Returns a stream of formatted data.

Examples

URL:

http://server:port/rest/service/clipboard/24? format=png

Result:

A filestream of the required output format based on given parameters.

getLatestClipboardData

Function

Get latest clipboard data.

Description

This request retrieves the latest data that was added to the logged-in user’s clipboard.

Type

GET

URL Format

.../clipboard

Java API

Method Name

Class Name

getLatestClipboardData

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

contentdisposition

string

The content disposition value to be set on the  http response headers.

outputStream

string

The output stream onto which output is to be written (for local API invocations).

Returns

Returns a stream of copied data into server.

Examples

URL:

http://server:port/rest/service/clipboard

Result:

A filestream of the latest copied data.

getLatestClipboardDataInfo

Function

Get latest clipboard data information.

Description

This request fetches information about the latest data that was added to the logged-in user’s clipboard.

Type

GET

URL Format

.../clipboard

Java API

Method Name

Class Name

getLatestClipboardDataInfo

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

metadata=true

boolean

 

latest=true

 

boolean

 

Returns

Returns a clipboardDataInfo object in XML format, containing information about the latest data added to the user’s clipboard . See the table in the "Request/Response parameter formats" chapter.

Examples

URL:

http://server:port/rest/service/clipboard? metadata=true&latest=true

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <clipboardDataInfo dataId="24">
    <timestamp>2017-06-12T14:15:34Z</timestamp>
    <contentType id="110171" name="Microsoft Excel Table"/>
    <mimeType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mimeType>
    <clipboardMeta>
      <nameValue name="preview" value="My Excel table preview..."/>
      <nameValue name="create on" value="12th June 2017"/>
      <nameValue name="created by" value="QppAdmin"/>
    </clipboardMeta>
  </clipboardDataInfo>

getLatestFormattedData

Function

Get latest formatted data.

Description

This request retrieves the latest data added to the logged-in user’s clipboard in the specified format. The formatted data is retrieved by using default Channel Mappings if no publishing channel parameter is specified.

Type

GET

URL Format

.../clipboard

Java API

Method Name

Class Name

getLatestFormattedData

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

format

string

The format in which clipboard data is to be retrieved.

publishingchannel

 

string

The publishing channel Id.

parametersMap

string

The publishing channel parameters.

contentdisposition

 

The content disposition value to be set on the http response header.

outputStream

string

The output stream onto which output is to be written (for local API invocations).

Returns

Returns a stream of formatted data.

Examples

URL:

http://server:port/rest/service/clipboard? format=png

Result:

A filestream of the required output format based on given parameters.

promoteClipboardDataToAsset

Function

 

Promote clipboard data to asset

Description

 

This request promotes the user's clipboard data to Platform's asset.

Type

POST

URL Format

.../clipboard/{dataId}

Java API

Method Name

Class Name

 

promoteClipboardDataToAsset

com.quark.qpp.service.facade.ClipboardFacade

Parameters

Name

Type

Description

op=promotetoasset

string

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

createminorversion

 

 

boolean

 

attributevalues

string

 

Returns

Returns an assetInfo object in XML format, containing the metadata of the newly created asset. See the table in the "Request/Response parameter formats" chapter.

Examples

URL:

http://server:port/rest/service/clipboard/{DataId}?loginname=Admin&loginpassword=Admin&op=promotetoasset&attributevalues=<xml/>

RESULT:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfo id="220">
  <assetVersion majorVersion="1" minorVersion="0"/>
  <attributeValueList>
  <attributeValue id="1" name="Id" type="numeric">220</attributeValue>
  ......
  </attributeValueList>
  <articleComponentInfoList/>
</assetInfo>