As discussed into the Introduction, the REST API is the most used API for platform integrations and lets you access to the content in an on-premise Alfresco repository as well as Alfresco in the Cloud. The REST API is a collection of RESTful web services, which means that they allow the request to access and manipulate textual representations of web resources, using a uniform and predefined set of stateless operations.
In the REST API, requests made to a resource's URL will generate a response that may be in XML or more often in JSON. Using HTTP, the kind of operations available include those predefined by the HTTP verbs GET, POST, PUT, DELETE and so on.
The REST API into Alfresco can be classified in two different collections of services:
- The CMIS REST API , to allow the management of content and metadata in an on-premise Alfresco repository as well as Alfresco in the Cloud. Content Management Interoperability Services is a vendor-neutral standard, fully described into the OASIS Content Management Interoperability Services (CMIS) TC. Alfresco supports Content Management Interoperability Services (CMIS) Version 1.1.
- The REST API, which lets you manage Alfresco-specific features such as comments, workflows, audits and everything is not covered explicitly by the Content Management Interoperability Services standard. Also in this case the support is complete for the on-premise Alfresco as well as the Alfresco in the Cloud. To have access to the full list of each of the Alfresco entities operated on by the REST API, please take a look here.
Even if the CMIS REST API could be invoked using the standard HTTP methods, it’s more common (and easy) to use one of the many language-specific libraries that wrap CMIS. One such example for the Java language is the OpenCMIS Client API provided by the Apache Chemistry project. The intent of the Apache Chemistry project is to provide client libraries for many other languages, such as Python, PHP, and .NET.
About the REST API in general, we believe a key requirement for a modern day REST API is the adoption of the OpenAPI Specification (formerly known as Swagger). One of the benefits gained with this choice is the tooling support, most notably the Swagger UI. Swagger UI is used to provide customers with the so called API Explorer, an environment to allow the experimentation of the APIs without having to install anything. The API Explorer gives you full documentation of each endpoint and a “Try it out!” button, so you can use each method live.