Query content This is the specification for applications that want to create and execute a query.
The API supports querying by sending XML binary content across the wire in the form of the Quickr Query schema to describe the query to be created.
URL endpoints
POST (Query) Resource XML to the following URL format:
| URL | Description |
| /query/feed | Create and execute the query |
Authentication This method requires authentication.
Arguments
The following HTTP headers are supported on this operation:
| Header | Description |
| Content-Type | This must be set to quickr/query+xml for this operation. POST and PUT operations will return HTTP response code 400 (Bad request) when this header is not present in the incoming request. If value is not set to quickr/query+xml, the server will return HTTP response code 415 (Unsupported media type). |
The following URL arguments are supported on this operation:
| Argument | Values | Required/Optional | Description |
| libraryId | UUID of a library | optional | Indicates the library to query on |
| folderId | UUID of a folder | optional | Indicates the folder to query on |
| isRecursive | true|false
| required | Indicates how deep the query will go. recursive set to true will query all levels. |
| page | Number | optional | Specifies the page number to be retrieved |
| pagesize | Number | optional | Specifies the number of items to include in a page |
| category | folder | document | draft | documenttype | propertysheettype | required | Indicates the type to filter the query on. When multiple categories are specified they should be separated by a comma(,). Category draft, documenttype, propertysheettype cannot be combined with other categories. When they are included only 1 will be returned, others will be ignored. |
If libraryId and folderId are both specified, libraryId will be ignored and folderId will be used.
If neither libraryId or folderId are specified, the query will be on all of the content
Otherwise whichever id is passed will be used.
Error Codes
| Error Code | Description |
| Unknown | Returned when the cause of the error is unknown |
| Invalid Query | Returned when the query is invalid (syntax or other error) |
| HTTP Response Code 400 - Bad Request | When Content-Type header is not present in request. |
| HTTP Response Code 415 - Unsupported media type | When anything other than quickr/query+xml is passed for Content-Type request header |
Service Provider Details The following details the level of support for each service provider:
| Provider | Component Type | Has support |
| IBM Lotus Quickr Services for WebSphere Portal | Document Library | yes
|
| IBM Lotus Quickr Services for WebSphere Portal | Blog | no |
| IBM Lotus Quickr Services for WebSphere Portal | Wiki | no |
| IBM Lotus Quickr services for Lotus Domino | Document Library | no |
| IBM FileNet Services for Lotus Quickr 1.0.0.0 | Document Library | no |
| IBM Content Manager Services for Lotus Quickr 1.0.0.0 | Document Library | no |
Example Request POST /query/feed HTTP/1.1 Host: example.com Content-Type: quickr/query+xml Authorization: Basic ... <?xml version="1.0" encoding="UTF-8"? <qkr:query xmlns:qkr="http://query.quickr.content.ibm.com/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://query.quickr.content.ibm.com/1.0 GenericQuerySet.xsd" <qkr:predicate conditionalOperator="and" <qkr:condition dataOperator="=" caseInsensitve="false" <qkr:leftAttribute multivalue="true" instanceClass="java.lang.String" attributeName="creator" / <qkr:rightValue value="uid=wpsadmin,o=default organization" dataType="string" / </qkr:condition </qkr:predicate </qkr:query |
Example Response The response will be an Atom Feed document for the category type that you specified in the Query parameters.