2.0 REST API

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



HTTP APIWeb Scripts


Introduction


This page describes HTTP API functionality introduced in Alfresco v2.0 and is specific to v2.0 only.  Alfresco v2.1 expands upon the HTTP API considerably.

Alfresco v2.0 has HTTP support for:


HTTP APIs


API Index


The 'list all APIs' URL is:

GET http://<host>:<port>/alfresco/service/index

Response Formats:


  1. html (default)

Search


See OpenSearch.


HTTP Response Formats


All URLs support the format argument for specifying the response type.

Formats available are:


  • html  => text/html
  • atom  => application/atom+xml
  • rss  => application/rss+xml
  • xml  => text/xml
  • json  => application/json
  • opensearchdescription  => application/opensearchdescription+xml

e.g.

GET http://<host>:<port>/service/<service>?format=atom

Authentication


Alfresco is a secure server and requires authenticated access.

For now, the APIs (where applicable) support:


  1. Alfresco Web Client Authentication
  2. HTTP Basic Authentication

Other forms of authentication will also be considered:


  1. ATOM authentication mechanism (such as http://www.xml.com/pub/a/2003/12/17/dive.html)

Guest Access


Some Services allow guest access.  To force guest access specify the following url argument:

guest=true

e.g.

http://<host>:<port>/alfresco/service/search/keyword?q=tutorial&guest=true

Selecting an Authentication Mechanism


/alfresco/config/web-api-application-context.xml

<!-- Alfresco Web Client Authentication (Default) -->
<alias alias='web.api.Authenticator' name='web.api.AlfWebClientAuthenticator' />

or

<!-- Basic HTTP Authentication -->
<alias alias='web.api.Authenticator' name='web.api.BasicAuthenticator' />

Logging


Alfresco server debug information may be logged by adding the following log4j entry:

log4j.logger.org.alfresco.web.api=debug

Attachments

    Outcomes