CMIS
Content Management Interoperability Services (CMIS) is an open standard that allows different content management systems to interoperate over the Internet. Specifically, CMIS defines an abstraction layer for controlling diverse document management systems and repositories using web protocols.
Note: If going from CMIS to CMIS, associations are only included if job type mappings are included
Authentication Connection
-
Name: The name of your CMIS authentication connector
-
Username: Username to authenticate with.
-
Password: Password to authenticate with.
-
URL: The full URL leading to your CMIS endpoint
-
Binding: AtomPub or Web Services. AtomPub is the default and most common choice.
-
Repository ID: You can specify a specific repository to query.
-
Vendor (CMIS 1.0 Only): No vendor, Alfresco, or FileNet
Discovery Connector
The CMIS Discovery Connector requires a CMIS Authentication Connection
-
Name: Unique name for your connector
-
Authentication Connection: Select the auth connector for this discovery
-
Ignore Types (comma delimited list): Chose document types to ignore when running discovery
-
Repository ID: You can specify a specific repository to discovery if supported by your specific CMS. The CMIS Discovery Connector will discover all content models including their metadata and properties.
Integration Connection
Utilising the CMIS Query Language, the CMIS Integration Connection allows the user to query the CMS system for content and metadata. It is also designed to write content, and it's associated metadata into a CMIS compliant Content Management System (CMS). This connector leverages the Apache OpenCMIS API v1.1.
To set up the CMIS Integration Connection fill in the following fields:
-
Connection Name: Name the Connector
-
Description: Add a description for the connector
-
Authentication Connection: Select the Auth connector
-
Secondary Auth Connection: Not used for CMIS
Job Configuration

A query to run against the source system using The CMIS Query Language. Must begin with
select * from cmis:document d
from there you can perform any type of query needed to collect the specific documents or types you wish. Most commonly, we walk a file tree using the root folder's node reference like so:
select * from cmis:document d WHERE in_tree('workspace://SpacesStore/3144f53f-55b9-478e-9ad8-bca477a54238')
As with most query based repo connections, we append the start and end times from the Details tab of the job to restrict the documents based on their last modified date
This appends the following to the query:
d.cmis:lastModificationDate >= TIMESTAMP (Your Configured Start Time) AND d.cmis:lastModificationDate <= TIMESTAMP (Your Configured End Time)
CMIS Query Order By:
The field and ordering in the form of (Field) [ASC/DESC]. This will be added as an ORDER BY clause
If left blank, the following will be added to the query, after the modified time clause
cmis:lastModificationDate DESC
Version Depth:
How many versions of a document to retrieve, going backwards. If the value is five, then the connector will attempt to retrieve the current document and its five most recent versions, if they exist.
Search All Versions:
Must be true if connecting to a Nuxeo repository. Must be false if connecting to an Alfresco repository.
Process Relationships:
Supported in most Alfresco systems. This will attach any relationships found as metadata, similar to version information.
Important: WARNING
If you are running with process relationships checked, and the source system does not support it, there will be an error in the logs, but the document should continue processing without error.

Output Folder Path: The folder where you wish the files to be written. This folder will be created if it does not exist.
Tip:
To write to a site, prepend 'site/[shortname]/' to the path
Strict Version Mode: Required to be true for most ECM systems. This simply means that if a document is retrieved by ID, it will retrieve that object, and not attempt to retrieve the latest version.
CMIS Cache Enabled: A setting for the cmis session. All retrieved objects will be cached for quicker lookup later. If false, the connector will search the source system each time for a document for folder.
Add ACLs: Requires a task to set the transformedPermissions field on a repository document before output. The acls should take the form of map with principals as the keys and sets of permissions as the values. Example:
{"principal1":["read","write"],"principal2":["read"]}
Include Aspects With No Field Mappings: Aspects will be applied to documents even if the data for their fields is missing or unmapped.
Aspect Remove Field Mapping: Takes a JSON string. Remove aspects if the listed fields are not present. The example of the UI:
{"myaspect:two":["field1","field2"],"myaspect:one":["field1","field2"]}
Meaning that if field 1 or field 2 is not present, do not add the aspects.
CMIS Update Query: If populated, this query will be run, for every document, before any other attempt to upload the document. Any document ids which are returned by this query will be updated using the metadata and content from the document being processed.
Check in In/Check Out on Updates: If using an update query, the documents being updated will be checked out, have updates to metadata applied, and then be checked back in.
Update Binary on Updates: If using an update query, the document's content will be updated in addition to metadata.
Content Service Connector
This section covers the CMIS specific configuration of the Content Service Connector. For a description of how to set up a content services connector generically see Content Service Connectors.

-
The API supports GET, POST, and DELETE calls.
-
All the endpoints take the "id" parameter, which takes the form of a string.
Ex. 5dba1525-44a6-45ed-a42e-4a155a3f0539

Request: GET /api/repo/(connectorid)/acls?id=(id)
Description: Retrieves a list of in the format of ["principalID:permission1,permissions2",..... ]
Path Parameters:
-
connectorid :The connector id of your content service connector
Query Parameters:
-
id:The repository id of the item.
GET /api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539
Returns:
{
"results": [
"user@alfresco.com:cmis:all"
],
"success": true
}
Example With CURL
curl -u admin:admin "localhost:8081/3sixty-admin/api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539" | json_pp

Request:
POST /repo/(connectorid)/acls?id=(id)&acls=(acls)
Description: Adds a principal to an object with the specified permissions. If the object exists, replace its permissions with those supplied.
Path Parameters:
-
connectorid :The connector id of your content service connector
Query Parameters:
-
id:The repository id of the item.
-
acls: A JSON String in the format of {"principalID":"permission1,permission2",....}
POST /api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&acls={"newuser@alfresco.com":"cmis:read,cmis:write"}
Returns:
{
"results": [
"user@alfresco.com:cmis:all",
"newuser@alfresco.com:cmis:read,cmis:write"
],
"success": true
}
Example With CURL
curl -u admin:admin -X POST "localhost:8081/3sixty-admin/repo/fn/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&acls={%22newuser@alfresco.com%22:%22cmis:read,cmis:write%22}" | json_pp

Request:
DELETE /repo/(connectorid)/acls?id=(id)&acls=(acls)
Description: Remove a principle from an object.
Path Parameters:
-
connectorid: The connector id of your content service connector
Query Parameters:
-
id:The repository id of the item.
-
aclId:a comma delimited link of principal Ids to remove from the target document.
DELETE /api/repo/cmis/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&aclId=newuser@alfresco.com
Returns:
{
"success": true
}
And the following GET call should return:
{
"results": [
"user@alfresco.com:cmis:all"
],
"success": true
}
Example With CURL
curl -u admin:admin -X DELETE "localhost:8081/3sixty-admin/repo/fn/acls?id=5dba1525-44a6-45ed-a42e-4a155a3f0539&aclId=newuser@alfresco.com| json_pp

-
checkIn
-
checkOut
-
createFile
-
createFolder
-
deleteACL
-
deleteFolder
-
deleteObjectByID
-
findTypeDefinition
-
getACLs
-
getFileContent
-
getObjectProperties
-
getTypes
-
listFolderItems
-
listVersions
-
setACLs
-
updateFile
-
updateProperties
API Keys
CMIS Connector: Read=true: Write=true: MIP=false
Repo (Read) Specs
Key |
Description |
Data Type |
---|---|---|
cmisQuery | CMIS Query You must select from cmis document d. We use d.cmis lastModificationDate for date range queries | String |
cmisQueryOrderBy |
CMIS Query Order By |
String |
versionDepth |
Version Depth |
Integer |
includeRelationships |
Include Relationships will make the connector look for relationships on each document. |
Boolean |
searchallversions |
Search All Versions? |
Boolean |
Output (Write) Specs
Key |
Description |
Data Type |
---|---|---|
outputfolderpath | Output Folder Path | String |
strictversionmode |
Strict Version Mode (true/false) |
Boolean |
cacheenabled |
CMIS Cache Enabled (true/false) |
Boolean |
addacl |
Add ACLs |
Boolean |
incaspnofm |
Include Aspects With No Field Mappings |
Boolean |
eanvfl |
Aspect Remove Field Mapping |
String |
cmisUpdateQuery |
CMIS Update Query |
String |
cicoou |
Check In / Check Out On Updates |
Boolean |
cmisupbin |
Update Binary on Updates |
Boolean |
Looking to integrate a CMIS compliant system? We can help.