You call a method on the CMIS ReST API by issuing an authenticated HTTP request with a URL.
The four HTTP methods are used to support the traditional Create, Read, Update, and Delete (CRUD) operations of content management when using the AtomPub binding:
- POST: is used to create a new entities
- GET: is used to retrieve information
- PUT: is used to update a single entity
- DELETE: is used to delete a single entity
Each request is a URL with a specific format. The format is dependent on the type of target repository.
For an on-premise Content Services repository it looks as follows for the AtomPub binding (CMIS 1.0):
https://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/content?id=a99ae2db-0e40-4fb6-bf67-3f331a358cfc
Each request URL is made up of the following elements:
- The protocol, which can be http or https.
- The hostname. This will be the host and port number of your alfresco instance. So if your Alfresco instance is running on the local machine on port 8080 this will be localhost:8080.
- The fixed string -default-.
- The API you want to call. In this case it is the public Alfresco CMIS API identified as /public/cmis.
- /versions/n. This specifies the version of the CMIS API you are using. 1.1 or 1.0.
- The CMIS binding. Alfresco supports the atom binding for the CMIS 1.0 protocol, and both the atom and browser bindings for the CMIS 1.1 protocol.
- The CMIS method itself. In this case the request is to get the content of a CMIS document with a specific id.