Earlier this week, Alfresco announced the general availability of the public Alfresco API and I also wrote about it at ECM Architect. The public Alfresco API allows developers to create custom applications (desktop, mobile, or cloud) that persist content to Alfresco in the Cloud. The API includes CMIS plus some Alfresco REST calls that provide functionality CMIS does not cover.
To help everyone also better connect the dots, our recently announced Alfresco Connector for Salesforce.com is the first enterprise cloud integration to use the new cloud API. Development teams for popular mobile applications such as Moprise and PDFPen for iPad and iPhone, in addition to cloud applications such as Filepicker, Otixo and Ephesoft have already started to adopt the new cloud Alfresco API so stay tuned as we highlight more of those partner integrations here.
Eventually, this public, versioned API will work against Alfresco in the cloud as well as Alfresco running on-premise. For now, it is only for Alfresco in the cloud, although the CMIS calls will work against both. For example, on my flight to California I worked on an example using CMIS and my local repository. When I got to the hotel, I added in the OAuth authentication and my example worked against Alfresco in the cloud.
To use the Alfresco API, all you have to do is become a registered developer at http://developer.alfresco.com. Once you’ve verified your email address, you can add applications to your profile. Each application has a unique authentication key and a secret. OAuth2 is used to handle authentication.
Once you have your authentication key and secret, you can start making calls against the API. Calls that hit the Alfresco REST part of the API return JSON. Calls that leverage CMIS return AtomPub XML. If you already know how to make CMIS calls, you already know how to use the Alfresco API–just grab the latest version of your favorite CMIS client, like OpenCMIS or cmislib, and pass in the authorization header. I believe you must use the 0.8.0-SNAPSHOT of OpenCMIS. If you are using cmislib, you’ll definitely need 0.5.1dev.
Here are some additional resources to help you get started:
- Alfresco Developer Portal
- Alfresco API Documentation
- Introduction Presentation from JavaOne
- Alfresco API Screencasts showing how to register for an application key and how to execute simple command-line Java applications that leverage the API.
- Sample Java code showing simple command-line examples with Google’s OAuth2 client and the Alfresco API. I have Python equivalents of those Java examples. I’ll get them added to their own Google Code project soon.
- CMIS and Apache Chemistry in Action. A forthcoming book now available on MEAP.