Rest Interface Guide

JSON support in request parameters for POST requests.

Both XML and JSON can be used to pass request parameters.

The following are some examples:

createCollection

Function

Create a collection.

Description

This request creates a new collection according to the given attributes.

Type

POST

URL Format

.../collections/[collection name] or collectionsbypath/[collection path]

Header

qpp-content-type:json

Java API

Method Name

Class Name

createCollection

com.quark.qpp.service.facade Class CollectionFacade

Parameters

Name

Type

Description

op=create

string

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

targetparent=[collection path or ID]

long or string

The parent collection for the new collection. (Mandatory)There is a choice between collection ID, Name and Path when providing a value.

attributevalues=<xml/>

string

The set of attribute values.: See "Request/Response parameter formats."(All atributes are Optional)

contenttype=[content type name]

string

Defaults to GENERAL. The default content type IDs are documented in the JavaDoc SDK at com.quark.qpp.core.content. service.constants.DefaultContentTypes. To get a list of content types, use a call to ../admin/contenttypes.(Optional)There is a choice between content type ID, Name and Hierarchy when providing a value.

Returns

Returns the collectionInfo object of the newly created collection.

Examples

URL:

http://serverName:serverPort/rest/service/collections? op=create&collectioninfolist=

{"CollectionInfoList": {"collectionInfo": [{"assetInfoList":null, "attributeValueList": { "attributeValue": [{"id":2,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":"Collection_5800a","valueId":0}, {"id":59,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":"False","valueId":0}, {"id":57,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":"Home/Collection_5800a","valueId":0}, {"id":62,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":null,"valueId":1416} ] },"collectionClass":null,"collectionClassId":1416, "collectionInfoList":null, "collectionPath":"Home/Collection_5800a", "defaultJobJacketId":1,"defaultJobJacketName":null, "defaultJobJacketTicket":"Default Job Ticket", "domainId":19,"groupInfoList":null,"id":0, "jobJacketInfoList":null,"name":"Collection_5800a", "parentColInfoList":null,"revisionControlInfoList":null, "routingInfoList":null,"templateId":0,"userInfoList":null, "workflowInfoList":null } ] } }Input:{"CollectionInfoList": {"collectionInfo": [{"assetInfoList":null, "attributeValueList": {"attributeValue": [{"id":2,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":"Collection_5800a","valueId":0}, {"id":59,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":"False","valueId":0}, {"id":57,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":"Home/Collection_5800a","valueId":0}, {"id":62,"multiValued":false,"name":"", "sourceReference":null,"type":"", "value":null,"valueId":1416} ] }, "collectionClass":null,"collectionClassId":1416, "collectionInfoList":null, "collectionPath":"Home/Collection_5800a", "defaultJobJacketId":1, "defaultJobJacketName":null, "defaultJobJacketTicket":"Default Job Ticket", "domainId":19,"groupInfoList":null,"id":0, "jobJacketInfoList":null, "name":"Collection_5800a", "parentColInfoList":null,"revisionControlInfoList":null, "routingInfoList":null,"templateId":0,"userInfoList":null, "workflowInfoList":null} ] } }

checkinNew

Function

Check in a new asset.

Description

Include the file in the request body or as file part.

Type

POST

URL Format

.../assetsbypath/[asset path] or /assets/[New Asset Name]

Header

qpp-content-type: json

Java API

Method Name

Class Name

checkInNew

com.quark.qpp.service.facade Class AssetFacade

Parameters

Name

Type

Description

op=checkinnew

string

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

attributevalues

 

See "checkinNewRequest/Response parameter formats." The following attributes are Mandatory:Content type (There is a choice between content type ID, Name and Hierarchy when providing a value for the Content type) attribute. Collection (There is a choice between collection ID, Name and Path when providing a value for the Collection attribute). WorkflowStatusFile extensionOriginal filename

relations

 

See "Request/Response parameter formats." If this parameter is passed, the Platform Server will check-in the asset and create child relations with the new asset being checked in at the same time. (Optional).

createminorversion =[true | false]

boolean

Specify if this version of the asset is to be checked in to the QPP server as a major or a minor version. (Optional)

Returns

Returns an assetInfo object of the newly checked in asset with its metadata.

Examples

URL:

http://myplatform:61400/rest/service/assets/Platform 11.2 What's New.pptx? op=checkinnew&attributevalues=

{“AttributeValueList":{...}} Input:{"AttributeValueList": {"attributeValue":[ { "id":62, "multiValued":false, "name":"", "sourceReference":null, "type":"", "value":"System;Asset;Project;QuarkXPress Project;", "valueId":0 }, { "id": 54, "multiValued": false, "name": "", "sourceReference": null, "type": "", "value": null, "valueId": 11 }, { "id": 24, "multiValued": false, "name": "", "sourceReference": null, "type": "" , "value": null, "valueId": 13 }, { "id": 33, "multiValued": false, "name": "", "sourceReference": null, "type": "", "value": "15116.qxp", "valueId": 0 }, { "id": 25, "multiValued": false, "name": "", "sourceReference": null, "type": "", "value": null, "valueId": 1 }, { "id": 11, "multiValued": false, "name": "", "sourceReference": null, "type": "", "value": "qxp", "valueId": 0 }, { "id": 55, "multiValued": false, "name": "", "sourceReference": null, "type": "", "value": null, "valueId": 1 } ] } }

createDomains

Function

Create Attribute Domains.

Description

This request is used to create a single or multiple attribute domains at one time.

Type

POST

URL Format

.../admin/domains

Header

qpp-content-type: json

Java API

Method Name

Class Name

createDomains

com.quark.qpp.service.facade Class AdminFacade

Parameters

Name

Type

Description

op=create

string

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

attributedomaininfolist

string

List of attribute domains to create.

Returns

Returns a attributeDomainInfoList object containing a list of successfully created attribute domains.

Examples

URL:

http://myplatform:61400/rest/service/admin/domains? op=create&attributedomaininfolist= Input:

{AttributeDomainInfoList": {"attributeDomainInfo": [{"domainValueList": {"domainValue": [{"domainValueList": {"domainValue": [{"domainValueList": {"domainValue": [{"domainValueList": {"domainValue":[]}, "id": 0, "name": "7", "sourceReference": "source7", "valueHierarchy": null } ] }, "id": 0, "name": "4", "sourceReference": "source4", "valueHierarchy": null } ] }, "id": 0, "name": "1", "sourceReference": "source1", "valueHierarchy": null }, {"domainValueList": {"domainValue": [{"domainValueList": {"domainValue": [{"domainValueList": {"domainValue":[]}, "id": 0, "name": "8", "sourceReference": "source8" "valueHierarchy": null } ] }, "id": 0, "name": "5", "sourceReference": "source5", "valueHierarchy": null } ] }, "id": 0, "name": "2", "sourceReference": "source2", "valueHierarchy": null }, {"domainValueList": {"domainValue": [{"domainValueList": {"domainValue": [{"domainValueList": {"domainValue":[]}, "id": 0, "name": "9", "sourceReference": "source9", "valueHierarchy": null } ] }, "id": 0, "name": "6", "sourceReference": "source6", "valueHierarchy": null } ] }, "id": 0, "name": "3", "sourceReference": "source3", "valueHierarchy": null } ] }, "expandable": true, "hierarchical": true, "id": 0, "itemsSorted": false, "name": "SampleQPP_0cb", "sourceReference": null, "systemDefined": false, "userModifiable": false, "warnBeforeExpansion": true } ] } }

createSearches

Function

Create searches.

Description

This request creates a single or multiple searches at one time.

Type

POST

URL Format

.../searchdefinitions

Header

qpp-content-type: json

Java API

Method Name

Class Name

createSearches

com.quark.qpp.service.facade Class QueryDefinitionFacade

Parameters

Name

Type

Description

op=create

long

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

searchinfolist=[xml]

string

An XML object containing metadata of searches to be created.

Returns

Returns a searchInfoList object containing metadata of newly created searches.

Examples

URL:

http://myplatform:61400/rest/service/searchdefinitions? op=create&searchinfolist= Input:

{"SearchInfoList": {"searchInfo": [{"id": 0,"owner": {"id": 0, "value": null}, "parameterized": false, "queryConditionList": {"queryCondition":[]}, "queryContext": {"collections": {"collection": [{"id": 0,"name": "Home","path": null}], "recursive": true }, "context": "ASSET" }, "queryDisplay": {"displayColumnList": {"displayColumn": [{"attributeColumn": true, "columnId": 2, "value": null, "width": 0 }, {"attributeColumn": true, "columnId": 55, "value": null, "width": 0 }, {"attributeColumn": true, "columnId": 54, "value": null, "width": 0 }, {"attributeColumn": true, "columnId": 24, "value": null, "width": 0 } ] }, "displayMode": "PLAIN", "exploreMode": "PLAIN", "groupingAttributeList": {"groupingAttribute": [{"attributeId": 55, "order": "ascending", "value": null } ] }, "sortInfoList": {"sortInfo": [{"attributeColumn": true, "columnId": 2, "order": "ascending", "value": null } ] } }, "searchName": "SampleQuery_90d", "trusteeInfoList": {"trusteeInfo": null} } ] } }