Preservica CMIS Interface
Preservica provides a partial server-side implementation of the Content Management Interoperability Services (CMIS) interface (http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.html). Currently this provides read-only access to query / browse objects in the Preservica archive, but no ability to create / update / version objects.
Access Control
The CMIS interface accepts access tokens generated from the access token API. Pass a valid access token in the HTTP header Preservica-Access-Token.
It also accepts requests with HTTP basic authentication, using a user name and password for a valid Preservica account. These credentials must be passed with every request.
Mapping XIP Entities to CMIS Objects
Entities in XIP map to CMIS objects very simply:
- Folders map to CMIS folders.
- Assets map to CMIS documents.
Representations, content objects etc are not mapped to CMIS objects. Instead, the system will select a suitable access representation of an asset, and the content returned when downloading the content of an asset will come from that representation.
A CMIS object ID takes the form:
repository_id:type|reference
where:
- repository_id is the ID of the repository (sdb for the Preservica CMIS server).
- type indicates the type of the CMIS object: either SO or IO
- reference is the object’s unique identifier in the Preservica archive.
For example, the CMIS object ID for the folder with identifier d95c75fa-7871-4ab8-a097-d1a1d7c5ef34 is:
sdb:SO|d95c75fa-7871-4ab8-a097-d1a1d7c5ef34
CMIS Bindings
The Preservica CMIS server implements both the RESTful AtomPub binding and the SOAP web service binding. The AtomPub binding is recommended for clients.
CMIS Services Implemented by Preservica
Repository Services
Implemented methods:
- getRepositories
- getRepositoryInfo
- getTypeChildren
- getTypeDefinition
For full details of these methods, including their inputs and outputs, see http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.html#x1-1660002.
The Preservica CMIS server exposes a single repository with repository ID sdb.
Navigation Services
Implemented methods:
- getChildren
- getDescendants
- getFolderTree
- getFolderParent
- getObjectParents
For full details of these methods, including their inputs and outputs, see http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.html#x1-1990003.
These methods provide the means for a client application to browse through the objects in a Preservica archive.
Object Services
Implemented methods:
- getAllowableActions
- getObject
- getProperties
- getObjectByPath
- getContentStream
- getRenditions
For full details of these methods, including their inputs and outputs, see http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.html#x1-2240004.
These methods allow a client application to obtain detailed information about a specific object in a Preservica archive.
Note: Descriptive metadata for an object in the Preservica archive is included in the CMIS response for that object using a simple, hierarchical key / value pair schema; see Appendix B for details. To get descriptive metadata into the response you will need to upload transforms into Preservica through the Schema Management page.
Discovery Services
Implemented methods:
- query
For full details of this method, including its inputs and outputs, see http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.html#x1-3140006.
The syntax of CMIS queries is fully explained here: http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMIS-v1.1-cs01.html#x1-10500014.
How CMIS Queries are Interpreted by Preservica
Preservica interprets CMIS queries as follows:
- All fields of an object are returned by Preservica for any CMIS query; i.e. every query is interpreted as if the field selection is expressed as "SELECT * FROM…".
- If the FROM clause is "FROM cmis:folder" the search is carried out over collections and deliverable units in Preservica; if the FROM clause is "FROM cmis:document" the search is carried out over digital files.
- Given that the mapping of Preservica entity properties to CMIS object properties can be modified at runtime using XSLT transforms, whatever property is specified in the WHERE clause, Preservica carries out a simple keyword-style search; i.e. fielded search is not currently supported.
- Preservica supports the LIKE predicate, and the CMIS-specific IN_FOLDER(), IN_TREE() and CONTAINS() functions. When used to search over digital files (i.e. when the FROM clause is "FROM cmis:document"), the CONTAINS() function searches the full-text index entries of digital files.
- Preservica does not currently support the JOIN syntax in CMIS queries.
Some examples:
SELECT *
FROM cmis:folder
WHERE (IN_TREE('sdb:SO|d114b171-9a9e-4ee7-8df6-6ec61ab9b9b5')
AND (cmis:name = 'wells'))
This query will find any folders under the collection with reference d114b171-9a9e-4ee7-8df6-6ec61ab9b9b5 in the Preservica hierarchy that have the string "wells" somewhere in their metadata.
SELECT *
FROM cmis:document
WHERE ((cmis:name = 'wells')
OR CONTAINS('wells'))
This query will find any assets in the Preservica repository that have the string "wells" either in their metadata or in their full-text index.
Common Service Elements
Of the common service elements described here: http://docs.oasis-open.org/cmis/CMIS/v1.1/cs01/CMISv1.1-cs01.html#x1-1500001, the Preservica CMIS server supports paging and renditions.
By adding the query parameter renditionFilter=* to an HTTP query, information on the thumbnail renditions for objects will be included in the response where appropriate.
Open API library and latest developments on GitHub
Visit the Preservica GitHub page for our extensive API library, sample code, our latest open developments and more.
Protecting the world’s digital memory
The world's cultural, economic, social and political memory is at risk. Preservica's mission is to protect it.