Rest Interface Guide

Query management

The query management capabilities of the API allow application developers to manage searches and includes the following REST calls:

search

Function

Search assets/collection using a searchDefinition.

Description

This request searches assets/collections based on a given searchDefinition. This API has been exposd as both Get and POST. In the case of a large payload, POST API can be used.

Type

GET, POST

URL Format

.../search

Java API

Method Name

Class Name

search

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

searchinfo=[xml]

string

An XML object containing metadata of the asset/collections to be found.

Returns

Returns a assetInfolist object containing the metadata of the asset to be found , if the context of the given searchInfo is ASSET.

Returns a collectionInfolist object containing the metadata of the asset to be found , if the context of the given searchInfo is COLLECTION.

Examples

URL:

http://serverName:serverPort/rest/service/search?search=<xml/>&op=count

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assetInfoList>
  <assetInfo id="66">
    <attributeValueList>
      <attributeValue valueId="0"
       type="text"name="Name" id="2">Alberi.jpg</attributeValue>
    </attributeValueList>
  </assetInfo>
  <assetInfo id="72">
    <attributeValueList>
      <attributeValue valueId="0"
     type="text"name="Name"id="2">QuarkImage.jpg</attributeValue>
    </attributeValueList>
  </assetInfo>
</assetInfoList>

 

 

 

Function

Search assets/collection using pagination from searchDefinition.

Description

This request searches assets/collections based on a given searchDefinition in a paginated manner. This APi has been exposed as both GET and POST.

Type

GET, POST

URL Format

.../search/paginated

Java API

Method Name

Class Name

search

com.quark.qpp.service.facade Class QueryFacade

Parameters

 

 

Name

Type

Description

searchinfo=[xml]

string

An XML object containing metadata of the asset/collections to be found.

numberOfRows=[int]

int

 

offset=[int]

int

 

Returns

Returns a assetInfolist object containing the metadata of the number of assets defined through the numberofrows parameter starting from the value defined in the offset parameter.

Examples

URL:

http://serverName:serverPort/rest/service/search/paginated?search=<xml/>&offset=0&numberofows=100

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <assetInfoList>
    <assetInfo id="1004">
      <attributeValueList>
        <attributeValue value="XML2c4.xml>
      </attributeValueList>
    </assetInfo>
  </assetInfoList>

 

searchAssets

Function

Search assets for a particular attribute value.

Description

This request searchs for assets matching specfic search criteria.

Type

GET

URL Format

.../search/assets

 

Method Name

Class Name

searchAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

[attribute name or id]=[attribute value]

long or string

The attribute name and value that you are searching for. (Mandatory)

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment Checksum

  • Auxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page NameRelationship Status

  • Status

  • XPath

Functions to get assets based on two non-queryable atributes (Collection, Status) are given below.

You can pass more than one attribute as a paramater with the value to search for.

includechildcontenttypes = [true|false]

boolean

Parameter to include child content types in search criteria.

attributes =[comma-seperated list of attribute names or IDs]

 

You can pass the appropriate value for any queryable attribute. For a list of attributes, use a call to ..admin/attributes.

displaymode=[x]

long

The default display modes are documented in the JavaDoc SDK at com.quark.qpp.core.query.service.constants.DefaultDisplayModes. (Optional) Defaults to 1.

exploremode=[x]

long

For a list of explore modes, see ExploreModeTypes.java. (Optional)

Defaults to 0.

collections

string

Comma separated ids of collections in which assets are to be searched.

recursive=[true|false]

boolean

Indicates whether all of the hierarchy below and including collections are to be searched. Deffault value=true

Returns

Returns search results based upon specified attribute values.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets? Name=1quark2.jpg&Collection=Home

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfoList>
    <assetInfo id="4">
        <attributeValueList>
            <attributeValue type="popup" name="Workflow" id="54">Workflow1</attributeValue>
            <attributeValue type="popup" name="Collection" id="55">Home</attributeValue>
            <attributeValue type="popup" name="Routed to" id="25">Admin</attributeValue>
            <attributeValue type="popup" name="Status" id="24">Status1</attributeValue>
            <attributeValue type="popup" name="Content Type" id="62">Picture</attributeValue>
        </attributeValueList>
    </assetInfo>
</assetInfoList>

Function

Search for assets that contain a particular text string.

Description

This request will search for assets that contain a given text string. This is specific to content based searches in workspace and ConnectClient.

Type

GET

URL Format

.../search/assets

Java API

Method Name

Class Name

searchAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

text=[text to search for]

string

Specify the string to search for. (Mandatory)

attributes=[comma-seperated list of attribute names or IDs]

string

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment Checksum

  • Auxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns an assetInfoList object containing the assets that contain the specified text string.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets?text=box&attributes=Name

Result:

Example of a text search with specific attribute:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfoList>
    <assetInfo id="292">
        <attributeValueList>
            <attributeValue valueId="0" type="text" name="Name" id="2">15116462.qxp</attributeValue>
        </attributeValueList>
    </assetInfo>
    <assetInfo id="304">
        <attributeValueList>
            <attributeValue valueId="0" type="text" name="Name" id="2">15116c9a.qxp</attributeValue>
        </attributeValueList>
    </assetInfo>
    <assetInfo id="306">
        <attributeValueList>
            <attributeValue valueId="0" type="text" name="Name" id="2">15116d33.qxp</attributeValue>
        </attributeValueList>
    </assetInfo>
</assetInfoList>

Function

Search for a particular attachment.

Description

This request searches for all attachments for a given document.

Type

GET

URL Format

.../search/assets

Java API

Method Name

Class Name

searchAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

document=[ID of the project]

long

ID of the document whose attachments you want found. (Mandatory)

attributes=[comma-seperated list of attribute names or IDs]

long or string

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment Checksum

  • Auxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns an assetInfoList object containing the assets that contain child assets.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets?document=22

Result:

A QueryResultInfo object in XML format.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfoList>
    <assetInfo id="290">
        <attributeValueList>
            <attributeValue valueId="0" type="text" name="Name" id="2">153486e3.qcd</attributeValue>
        </attributeValueList>
    </assetInfo>
</assetInfoList>

Function

Search within an existing query.

Description

This request searchs an existiing query in the platform.

Type

GET

URL Format

.../search/assets

Java API

Method Name

Class Name

searchAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

query=[ID of the query]

long or string

Use /search to get IDs. (Mandatory)

attributes=[comma-seperated list of attribute names or IDs]

long or string

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment Checksum

  • Auxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns a QueryResultInfo object in XML format.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets?query=12

Result:

A QueryResultInfo object in XML format.

Function

Search for assets with a particular status.

Description

This request returns all assets associated with given status.

Type

GET

URL Format

.../search/assets

Java API

Method Name

Class Name

searchAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

status=[status name] and workflow=[workflow name]

string

Specify Status of a workflow. Specify Name or ID of a workflow. (Mandatory) Status and workflow will go hand in hand.

attributes=[comma-seperated list of attribute names or IDs]

long or string

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns an assetInfoList object containing an array of assets related to a given status.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets?workflow=Workflow1 &status=Status1&attributes=name,5,7,62,54,collection

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfoList>
    <assetInfo id="4">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">1quark2.jpg</attributeValue> ... </attributeValueList>
    </assetInfo>
    <assetInfo id="10">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">Tulips</attributeValue> ... </attributeValueList>
    </assetInfo>
</assetInfoList>

Function

Search for assets in a particular collection.

Description

This request searchs for the assets checked-in at given collection.

Type

GET

URL Format

.../search/assets

Java API

Method Name

Class Name

searchAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

collections =[comma-separated list of collection names or IDs]

long or string

To get a list of collection IDs for a particular collection, use a call to ..collectionsbypath/[path].(Mandatory)

recursive=[true|false]

boolean

Parameter to include child collections.

Defaults to true. (Optional)

attributes=[comma-seperated list of attribute names or IDs]

long or string

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns an assetInfoList object containing an array of assets checked-in at a specified collection.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets?collections=Home <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

Result:

<assetInfoList>
    <assetInfo id="4">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">1quark2.jpg</attributeValue> ... </attributeValueList>
    </assetInfo>
    <assetInfo id="10">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">Tulips</attributeValue> ... </attributeValueList>
    </assetInfo>
</assetInfoList>

searchCollections

Function

Search for collections in a particular collection.

Description

This request searchs all nested collections accessible to the user under a given collection ID or Name.

Type

GET

URL Format

.../search/collections

Java API

Method Name

Class Name

searchCollections

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

collections =[comma-separated list of collection names or IDs]

long or string

Parameter to include child collections. To get a list of collection IDs for a particular collection, use a call to ..collectionsbypath/[path].(Mandatory)

recursive=[true|false]

boolean

Defaults to true.(Optional)

includechildcontenttypes=[true | false]

boolean

Parameter to include child content types in search criteria.

attributes=[comma-seperated list of attribute names or IDs]

long or string

Specify the string to search for. (Mandatory)

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns a collectionInfoList object containing an array of existing and accessible collections.

Examples

URL:

http://serverName:serverPort/rest/service/search/collections ?collection path=Home/Collection&Creator=Admin

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<collectionInfoList>
    <collectionInfo templateId="0" collectionClass="General" collectionClassId="1416" collectionTemplate="false" accessibleChildrenAvailable="true" domainId="19" name="Collection" id="10">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">Collection</attributeValue>
            <attributeValue type="popup" name="Workflow" id="54"/>
            <attributeValue type="popup" name="Collection" id="55"/>
            <attributeValue type="popup" name="Routed to" id="25"/>
            <attributeValue type="popup" name="Status" id="24"/>
            <attributeValue type="popup" name="Content Type" id="62">General</attributeValue>
        </attributeValueList>
    </collectionInfo>
</collectionInfoList>

Function

Search for collections in a collection with particular attributes.

Description

This request searchs for assets in a specified collection and displasy results with the specified attributes.

Type

GET

URL Format

.../search/collections

Java API

Method Name

Class Name

searchCollections

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

attributes =[comma-separated list of attribute names or IDs]

long or string

For a list of attributes, use a call to ..admin/attributes.(Mandatory)

collecions =[comma-separated list of collections names or IDs]

long or string

Parameter to include child collections.

To get a list of collection IDs for a particular collection, use a call to ..collectionsbypath/[path]. (Mandatory)

recursive=[true|false]

boolean

Defaults to true. (Optional)

Returns

Returns a collectionInfoList object containing an array of existing and accessible collections.

Examples

URL:

http://serverName:serverPort/rest/service/search/ collections?collection path=Home&Creator=Admin&attributes=Name

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<collectionInfoList>
    <collectionInfo templateId="0" collectionClass="General" collectionClassId="1416" collectionTemplate="false" accessibleChildrenAvailable="true" domainId="19" name="Home" id="1">
        <attributeValueList>
            <attributeValue valueId="0" type="text" name="Name" id="2">Home </attributeValue>
        </attributeValueList>
        <groupInfoList/>
    </collectionInfo>
</collectionInfoList>

createSearches

Function

Create searches.

Description

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

Type

POST

URL Format

.../searchdefinitions

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://serverName:serverPort/rest/service/searchdefinitions?op=create&searchinfilist=<xml/>

Result:

<?xml version="1.0" encoding="UTF-8"?>
<searchInfoList>
    <searchInfo parameterized="false" id="110">
        <searchName>AllPictures</searchName>
        <owner id="1">Admin</owner>
        <queryContext context="ASSET"/>
        <queryConditionList>
            <queryCondition recursive="false" parameterized="false" negated="false" type="CONTENT_TYPE_CONDITION" comparisonOperator="IS" logicalOperator="OR" nestingLevel="1">
                <searchValue id="1103">System;Asset;Picture;</searchValue>
            </queryCondition>
        </queryConditionList>
        <queryDisplay exploreMode="PLAIN" displayMode="SNIPPET">
            <displayColumnList>
                <displayColumn attributeColumn="true" width="150" columnId="2">Name</displayColumn>
                <displayColumn attributeColumn="false" width="150" columnId="29"/>
                <displayColumn attributeColumn="false" width="150" columnId="62"/>
                <displayColumn attributeColumn="false" width="150" columnId="54"/>
                <displayColumn attributeColumn="false" width="150" columnId="25"/>
                <displayColumn attributeColumn="false" width="150" columnId="55"/>
            </displayColumnList>
            <sortInfoList>
                <sortInfo attributeColumn="true" order="ascending" columnId="2">Name</sortInfo>
            </sortInfoList>
        </queryDisplay>
    </searchInfo>
</searchInfoList>

getSearch

Function

Search for a saved search.

Description

This request returns the metadata of a specified search.

Type

GET

URL Format

.../searchdefinitions/{searchIdOrName}?

Java API

Method Name

Class Name

getSearch

com.quark.qpp.service.facade Class QueryDefinitionFacade

Parameters

Name

Type

Description

context=[true|false]

boolean

Defaults to false.

display=[true|false]

boolean

Defaults to false.

conditions=[true|false]

boolean

Defaults to false.

getSharedSearchTrustees=[true|false]

boolean

Defaults to false.

Returns

Returns a searchInfoList object containing metadata of all saved and shared searches. Metadata of QueryContext, QueryDisplay, QueryConditions will be added per the parameters.

Examples

URL:

http://serverName:serverPort/rest/service/searchdefinitions/Default

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<searchInfoList>
    <searchInfo parameterized="false" id="100">
        <searchName>Default</searchName>
        <owner id="1">Admin</owner>
    </searchInfo>
</searchInfoList>

getAllSearches

Function

Get all saved searches.

Description

This request returns all saved, shared searches.

Type

GET

URL Format

.../searchdefinitions?

Java API

Method Name

Class Name

getAllSearches

com.quark.qpp.service.facade QueryDefinitionFacade

Parameters

Name

Type

Description

context=[true|false]

boolean

Defaults to false.

display=[true|false]

boolean

Defaults to false.

conditions=[true|false]

boolean

Defaults to false.

getSharedSearchTrustees=[true|false]

boolean

Defaults to false.

Returns

Returns a searchInfoList object containing metadata of all saved and shared searches. Metadata of QueryContext, QueryDisplay, QueryConditions will be added per the parameters.

Examples

URL:

http://serverName:serverPort/rest/service/searchdefinitions

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<searchInfoList>
    <searchInfo parameterized="false" id="100">
        <searchName>Default</searchName>
        <owner id="1">Admin</owner>
    </searchInfo>
    <searchInfo parameterized="false" id="101">
        <searchName>Expired Content</searchName>
        <owner id="1">Admin</owner>
    </searchInfo>
</searchInfoList>

getSearchResultsForQuery

 

Function

Get the results of an existing search.

Description

This request returns the results of the execution of an already saved search.

Type

GET

URL Format

.../search/[search name or ID]

Java API

Method Name

Class Name

getSearchResultsForQuery

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

displaymode=[x].

long

Defaults to 1. The default display modes are documented in the JavaDoc SDK at com.quark.qpp.core.query. service.constants.DefaultDisplayModes.(Optional)

exploremode=[x]

long

Defaults to 0. For a list of explore modes, see ExploreModeTypes.java.

Returns

Returns an assetInfoList object containing the results of a specified search.

Examples

URL:

http://serverName:serverPort/rest/service/search/Default

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfoList>
    <assetInfo id="10">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">Tulips</attributeValue>
            <attributeValue type="popup" name="Collection" id="55">Home</attributeValue>
            <attributeValue type="popup" name="Workflow" id="54">Workflow1</attributeValue>
            <attributeValue type="popup" name="Status" id="24">Status1</attributeValue>
        </attributeValueList>
    </assetInfo>
    <assetInfo id="11">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">Duplicate_asset</attributeValue>
            <attributeValue type="popup" name="Collection" id="55">Home</attributeValue>
            <attributeValue type="popup" name="Workflow" id="54">Workflow1</attributeValue>
            <attributeValue type="popup" name="Status" id="24">Status1</attributeValue>
        </attributeValueList>
    </assetInfo>
    <assetInfo id="4">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">1quark2.jpg</attributeValue>
            <attributeValue type="popup" name="Collection" id="55">Home</attributeValue>
            <attributeValue type="popup" name="Workflow" id="54">Workflow1</attributeValue>
            <attributeValue type="popup" name="Status" id="24">Status1</attributeValue>
        </attributeValueList>
    </assetInfo>
    <assetInfo id="5">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">15116.qxp</attributeValue>
            <attributeValue type="popup" name="Collection" id="55">Home</attributeValue>
            <attributeValue type="popup" name="Workflow" id="54">Workflow1</attributeValue>
            <attributeValue type="popup" name="Status" id="24">Status1</attributeValue>
        </attributeValueList>
    </assetInfo>
</assetInfoList>

Function

Get the results of an existing search with specific display attributes.

Description

This request returns the results of the execution of an already saved search and displays only the specified attributes.

Type

GET

URL Format

.../search/[search name or ID]

Java API

Method Name

Class Name

getSearchResultsForQuery

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

attributes =[comma-separated list of attribute names or IDs]

long or string

For a list of attributes, use a call to ..admin/attributes.(Mandatory)

Returns

Returns an assetInfoList object containing the results of a specified search with only the specified attributes.

Examples

URL:

http://serverName:serverPort/rest/service/search/Default?attributes=Name,2,10,Collection

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assetInfoList>
    <assetInfo id="10">
        <attributeValueList>
            <attributeValue type="text" name="Name" id="2">Tulips</attributeValue>
            <attributeValue type="text" name="Name" id="2">Tulips</attributeValue>
            <attributeValue type="dateTime" name="Job jacket last modified" id="10"/>
            <attributeValue type="popup" name="Collection" id="55">Home</attributeValue>
        </attributeValueList>
    </assetInfo>
</assetInfoList>

Function

Get the results of an already saved "Ask" queries.

Description

This request returns the result of an already saved search (Ask Queries) by accepting required values of search criteria as its parameters.

Type

GET

URL Format

.../search/[search name OR id]

Java API

Method Name

Class Name

getSearchResultsForQuery

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

text=[text to search for]

string

Provide value for search criteria as its parameter. Parameter will be based upon the saved query. (Mandatory)

attributes=[comma-seperated list of attribute names or IDs]

string or long

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

Returns

Returns an assetInfoList containing the results of a specified search based on the given parameter and its value.

Examples

URL:

http://serverName:serverPort/rest/service/search/myAskQuery?File%20extension=qxp

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <assetInfoList>
    <assetInfo id="1">
      <attributeValueList>
        <attributeValue valueId="0"
           type="text" name="Name" id="2">Sample.qxp</attributeValue>
      </attributeValueList>
    </assetInfo>
  </assetInfoList>

 

Function

Search assets using pagination from a saved query.

Description

This request returns the results of the execution of an already saved search in a paginated manner.

Type

GET

URL Format

.../search/paginated/[search name OR id]

Java API

Method Name

Class Name

getSearchResultsForQuery

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

numberOfRows=[int]

int

. (Mandatory)

offset=[int]

int

.

Returns

Returns an assetInfoList containing the results of a specified search based on the given parameter and its value.

Examples

URL:

http://serverName:serverPort/rest/service/search/paginated/{QueryIdorName}?offset=0&numberofrows=100

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <assetInfoList>
    <assetInfo id="1004">
      <attributeValueList>
        <attributeValue value="XML2c4.xml>
      </attributeValueList>
    </assetInfo>
  </assetInfoList>

 

getTextSearchResults

Function

Search for assets using wild cards.

Description

This request executes a quick search for assets based on their name. Both simple and wildcard based comparison is performed for name.

Type

GET

URL Format

.../search/quicksearch/

Java API

Method Name

Class Name

getTextSearchResults

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

collections =[comma-separated list of collection names or IDs]

long or string

To get a list of collection IDs for a particular collection, use a call to ..collectionsbypath/[path].(Mandatory)

recursive=[true|false]

boolean

Parameter to include child collections.

Defaults to true. (Optional)

attributes=[comma-seperated list of attribute names or IDs]

long or string

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

includechildcontenttypes=[true | false]

boolean

Parameter to include child content types in search criteria.

sortby

long or string

attributeIds used for determining the sequence of asset elements in query results.

Returns

Returns an assetInfoList object .

Examples

URL:

http://serverName:serverPort/rest/service/search/quicksearch?text=*5*>

Result:

<assetInfoList>
    <assetInfo id="1">
        <attributeValueList>
            <attributeValue valueId="0" type="text" name="Name" id="2">151161dc.qxp</attributeValue>
            <attributeValue valueId="10" type="popup" name="Workflow" id="54">Workflow1</attributeValue>
            <attributeValue valueId="1" type="popup" name="Collection" id="55">Home</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="11021" type="popup" name="Content Type" id="62">QuarkXPress Project</attributeValue>
        </attributeValueList>
    </assetInfo>
</assetInfoList>

setSharedSearchTrustees

Function

Share a search.

Description

This request shares any specified search to any user or group.

Type

POST

URL Format

.../searchdefinitions/{searchIdOrName}?

Java API

Method Name

Class Name

getSharedSearchTrustees

com.quark.qpp.service.facade Class QueryDefinitionFacade

Parameters

Name

Type

Description

op=setsharedsearchtrustees

long

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

trusteeinfolist=[xml]

string

An XML object containing metadata of all trustees (users, groups) that the search will be shared with.

Returns

Returns a trusteeinfolist object containing metadata of all trustees (users, groups) that the search will be shared with.

Examples

URL:

http://serverName:serverPort/rest/service/searchdefinitions?op=setsharedsearchtrustees&trusteeinfolist=<xml/>

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<trusteeInfoList>
    <trusteeInfo id="10">
        <user>true</user>
        <deleted>false</deleted>
        <name>Admin2</name>
        <emailAddress>Editors@company.com</emailAddress>
        <nativeTrustee>false</nativeTrustee>
        <defaultUserClassId>2</defaultUserClassId>
        <ldapProfileId>10</ldapProfileId>
        <ldapDistinguishedName>Dist Name</ldapDistinguishedName>
    </trusteeInfo>
    <trusteeInfo id="12">
        <user>false</user>
        <deleted>false</deleted>
        <name>Group1</name>
        <emailAddress>Editors@company.com</emailAddress>
        <nativeTrustee>false</nativeTrustee>
        <defaultUserClassId>2</defaultUserClassId>
        <ldapProfileId>10</ldapProfileId>
        <ldapDistinguishedName>Dist Name</ldapDistinguishedName>
    </trusteeInfo>
</trusteeInfoList>

getSharedSearchTrustees

Function

Get the trustees of a shared search.

Description

This request returns the trustees that a specfied search has been shared with.

Type

GET

URL Format

.../searchdefinitions/{searchIdOrName}?

Java API

Method Name

Class Name

getSharedSearchTrustees

com.quark.qpp.service.facade Class QueryDefinitionFacade

Parameters

Name

Type

Description

op=getsharedsearchtrustees

long

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

Returns

Returns a trusteeInfoList object containing metadata of all trustees (users, groups) that a specified search has been shared with.

Examples

URL:

http://serverName:serverPort/rest/service/searchdefinitions?op=getsharedsearchtrustees

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<trusteeInfoList>
    <trusteeInfo id="10">
        <user>true</user>
        <deleted>false</deleted>
        <name>Admin2</name>
        <emailAddress>Editors@company.com</emailAddress>
        <nativeTrustee>false</nativeTrustee>
        <defaultUserClassId>2</defaultUserClassId>
        <ldapProfileId>10</ldapProfileId>
        <ldapDistinguishedName>Dist Name</ldapDistinguishedName>
    </trusteeInfo>
    <trusteeInfo id="12">
        <user>false</user>
        <deleted>false</deleted>
        <name>Group1</name>
        <emailAddress>Editors@company.com</emailAddress>
        <nativeTrustee>false</nativeTrustee>
        <defaultUserClassId>2</defaultUserClassId>
        <ldapProfileId>10</ldapProfileId>
        <ldapDistinguishedName>Dist Name</ldapDistinguishedName>
    </trusteeInfo>
</trusteeInfoList>

updateSearches

Function

Update searches.

Description

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

Type

POST

URL Format

.../searchdefinitions

Java API

Method Name

Class Name

updateSearch

com.quark.qpp.service.facade Class QueryDefinitionFacade

Parameters

Name

Type

Description

op=update

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 updated.

Returns

Returns a searchinfolist object containing metadata of successfully updated searches.

Examples

URL:

http://serverName:serverPort/rest/service/searchdefinitions?op=update&searchinfilist=<xml/>

Result:

<?xml version="1.0" encoding="UTF-8"?>
<searchInfoList>
    <searchInfo parameterized="false" id="110">
        <searchName>AllPictures</searchName>
        <owner id="1">Admin</owner>
        <queryContext context="ASSET"/>
        <queryConditionList>
            <queryCondition recursive="false" parameterized="false" negated="false" type="CONTENT_TYPE_CONDITION" comparisonOperator="IS" logicalOperator="OR" nestingLevel="1">
                <searchValue id="1103">System;Asset;Picture;</searchValue>
            </queryCondition>
        </queryConditionList>
        <queryDisplay exploreMode="PLAIN" displayMode="SNIPPET">
            <displayColumnList>
                <displayColumn attributeColumn="true" width="150" columnId="2">Name</displayColumn>
                <displayColumn attributeColumn="false" width="150" columnId="29"/>
                <displayColumn attributeColumn="false" width="150" columnId="62"/>
                <displayColumn attributeColumn="false" width="150" columnId="54"/>
                <displayColumn attributeColumn="false" width="150" columnId="25"/>
                <displayColumn attributeColumn="false" width="150" columnId="55"/>
            </displayColumnList>
            <sortInfoList>
                <sortInfo attributeColumn="true" order="ascending" columnId="2">Name</sortInfo>
            </sortInfoList>
        </queryDisplay>
    </searchInfo>
</searchInfoList>

deleteSearch

Function

Delete searches.

Description

This request deletes a specified search.

Type

POST

URL Format

.../searchdefinitions/{searchIdOrName}?

Java API

Method Name

Class Name

updateSearch

com.quark.qpp.service.facade Class QueryDefinitionFacade

Parameters

Name

Type

Description

op=delete

long

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

Returns

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

Examples

URL:

http://serverName:serverPort/rest/service/searchdefinitions/{SavedSearchIdORName}?op=delete

count

Function

Count assets/collection using a searchDefinition.

Description

This request counts assets/collections based on a given searchDefinition. This API has been exposd as both Get and POST. In the case of a large payload, POST API can be used.

Type

GET, POST

URL Format

.../search

Java API

Method Name

Class Name

count

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

searchinfo=[xml]

string

An XML object containing metadata of the asset/collections to be counted.

Returns

Returns a count of the assets, if the context of the given searchInfo is ASSET.

Returns a count of the collections, if the context of the given searchInfo is COLLECTION

Examples

URL:

http://serverName:serverPort/rest/service/search?search=<xml/>&op=count

Result:

30

countAssets

Function

Count assets.

Description

This request counts assets based on given conditions.

Type

GET

URL Format

.../search

Java API

Method Name

Class Name

countAssets

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

op=count

long

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

assets =[comma-separated list of assets names or IDs]

long or string

(Mandatory)

recursive=[true|false]

boolean

Defaults to true.(Optional)

includechildcontenttypes=[true | false]

boolean

Parameter to include child content types in search criteria.

attributes=[comma-seperated list of attribute names or IDs]

long or string

Specify the string to search for. (Mandatory)

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns a count of the assets satisfying the condition parameters specified.

Examples

URL:

http://serverName:serverPort/rest/service/search/assets?op=count

Result:

25

countCollections

Function

Count collections.

Description

This request counts collections based on given conditions.

Type

GET

URL Format

.../search

Java API

Method Name

Class Name

countCollections

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

op=count

long

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

collections =[comma-separated list of collection names or IDs]

long or string

Parameter to include child collections. To get a list of collection IDs for a particular collection, use a call to ..collectionsbypath/[path].(Mandatory)

recursive=[true|false]

boolean

Defaults to true.(Optional)

includechildcontenttypes=[true | false]

boolean

Parameter to include child content types in search criteria.

attributes=[comma-seperated list of attribute names or IDs]

long or string

Specify the string to search for. (Mandatory)

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns a count of the collections satisfying the condition parameters specified.

Examples

URL:

http://serverName:serverPort/rest/service/search/collections?op=count

Result:

25

countSearchResultsForQuery

Function

Count assets based on saved query.

Description

This request counts resultant assets of saved query.

Type

GET

URL Format

.../search/[Query ID or Name]

Java API

Method Name

Class Name

countSearchRestultsForQuery

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

op=count

long

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

attributes=[comma-seperated list of attribute names or IDs]

long or string

Specify the string to search for. (Mandatory)

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns a count of the assets satisfying the specified query.

Examples

URL:

http://serverName:serverPort/rest/service/search/AllAssets?op=count

Result:

2

countTextSearchResults

Function

Count text search results.

Description

This request counts assets based on given conditions.

Type

GET

URL Format

.../search/quicksearch

Java API

Method Name

Class Name

countTextSearchRestults

com.quark.qpp.service.facade Class QueryFacade

Parameters

Name

Type

Description

op=count

long

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

collections =[comma-separated list of collections names or IDs]

long or string

Parameter to include child collections. To get a list of collection IDs for a particular collection, use a call to ..collectionsbypath/[path].(Mandatory)

recursive=[true|false]

boolean

Defaults to true.(Optional)

includechildcontenttypes=[true | false]

boolean

Parameter to include child content types in search criteria.

attributes=[comma-seperated list of attribute names or IDs]

long or string

Specify the string to search for. (Mandatory)

You can pass the appropriate value for any queryable attribute to fetch specific attributes.

For a list of attributes, use a call to ..admin/attributes.

The attributes must be queryable.

The following is a lit of non-queryable attributes:

  • Article Component id

  • Article Component Reference Asset Id

  • Article Component Reference Asset Major Version

  • Article Component Reference Asset Minor Version

  • Article Id

  • Asset Checksum

  • Attached Component Id

  • Attached Layout Uid

  • Attachment ChecksumAuxillary Data

  • Box Height

  • Box Uid

  • Box Width

  • Collection

  • Component position

  • Dependent On Collection Resources

  • InDesign Object UID

  • Item Name

  • Item Type

  • Page Index

  • Page Name

  • Relationship Status

  • Status

  • XPath

Returns

Returns a count of the assets satisfying the condition parameters specified.

Examples

URL:

http://serverName:serverPort/rest/service/search/quicksearch?text=*quark*&op=count

Result:

2