2.1 REST API

From alfrescowiki

Jump to: navigation, search

Back to RESTful API.

NOTE: This document describes features to be found in Alfresco v2.1. (it seems the format parameter does not work in 2.1 yet, I only get JSON results, it does work in 3.1)


Contents

Introduction

Welcome to the reference documentation for the Alfresco RESTful API.

Alfresco REST Design Guidelines

This document was generated from the Alfresco Server URL

GET http://<host>:<port>/alfresco/service/index/all.mediawiki

on Jul 31, 2007 10:13:11 PM using Alfresco v2.1.0 (Beta @build-number@).

Web Script Reference

This section provides technical information for all 43 Web Scripts, organized by Web Script Package.

Documentation for each Web Script includes:

  • Short Name
  • Description
  • Available URL templates
  • Default response format
  • How to specify an alternative response
  • Authentication requirements
  • Transaction requirements
  • Location of Web Script description document



Package: /org/alfresco

Web Scripts Home

Web Scripts Home.

GET /alfresco/service/
GET /alfresco/service/index

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: any

Definition:

  • Id: org/alfresco/index.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/index.get.desc.xml

Web Script Maintenance

Maintain index of Web Scripts.

POST /alfresco/service/index?reset={reset?}
POST /alfresco/service/?reset={reset?}

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: any

Definition:

  • Id: org/alfresco/index.post
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/index.post.desc.xml

All Web Scripts Index

Retrieve an index of all Web Scripts.

GET /alfresco/service/index/all
GET /alfresco/service/index/all.mediawiki

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: any

Definition:

  • Id: org/alfresco/indexall.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/indexall.get.desc.xml

Web Script Package Index

Provide an index of Web Scripts for the specified Web Script package.

GET /alfresco/service/index/package/{package}

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: any

Definition:

  • Id: org/alfresco/indexpackage.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/indexpackage.get.desc.xml

Web Script URI Index

Provide an index of Web Scripts for the specified Web Script URI.

GET /alfresco/service/index/uri/{uri}

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: argument

Definition:

  • Id: org/alfresco/indexuri.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/indexuri.get.desc.xml

Javascript Debugger

Javascript Debugger.

GET /alfresco/service/api/javascript/debugger

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/jsdebugger.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/jsdebugger.get.desc.xml

Javascript Debugger Maintenance

Javascript Debugger Maintenance.

POST /alfresco/service/api/javascript/debugger?active={active?}

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/jsdebugger.post
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/jsdebugger.post.desc.xml

Web Script Description

Retrieve description document for identified Web Script.

GET /alfresco/service/description/{serviceId}

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: argument

Definition:

  • Id: org/alfresco/scriptdescription.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/scriptdescription.get.desc.xml

Display Web Script

Full inspection of Web Script implementation - useful for diagnostics and download/upload.

GET /alfresco/service/script/{serviceId}

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: argument

Definition:

  • Id: org/alfresco/scriptdump.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/scriptdump.get.desc.xml

Web Script Installer Form

Web Script Installer Form.

GET /alfresco/service/installer

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/scriptinstall.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/scriptinstall.get.desc.xml

Install Web Script

Install Web Script.

POST /alfresco/service/installer

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/scriptinstall.post
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/scriptinstall.post.desc.xml

Package: /org/alfresco/office

Document Actions (Office Add-In)

Used by the Office Add-In to perform actions on managed documents.

GET /alfresco/service/office/docActions

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/docActions.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/docActions.get.desc.xml

Document Details (Office Add-In)

Generate the Office Add-In Document Details page.

GET /alfresco/service/office/documentDetails?p={path?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/documentDetails.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.desc.xml

Get Users (Office Add-In)

Used by the Office Add-In to query for users.

GET /alfresco/service/office/getUsers?s={searchTerm}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/getUsers.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/getUsers.get.desc.xml

My Alfresco (Office Add-In)

Generate the Office Add-In My Alfresco page.

GET /alfresco/service/office/myAlfresco?p={path?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/myAlfresco.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.desc.xml

My Tasks (Office Add-In)

Generate the Office Add-In My Tasks page.

GET /alfresco/service/office/myTasks?p={path}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/myTasks.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/myTasks.get.desc.xml

My Tasks Detail (Office Add-In)

Generate the Office Add-In Task Detail page.

GET /alfresco/service/office/myTasksDetail?t={taskId}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/myTasksDetail.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.desc.xml

Navigation (Office Add-In)

Generate the Office Add-In Navigation page.

GET /alfresco/service/office/navigation?p={path?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/navigation.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/navigation.get.desc.xml

Search (Office Add-In)

Generate the Office Add-In Search page.

GET /alfresco/service/office/search?p={path?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/search.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/search.get.desc.xml

Search Results (Office Add-In)

Generate the Office Add-In Search Results page.

GET /alfresco/service/office/searchResults?search={searchString?}&maxresults={maxresults?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/office/searchResults.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/office/searchResults.get.desc.xml

Package: /org/alfresco/portlets

Document List

Generate the Document list portlet page.

GET /alfresco/service/ui/doclist?f={filter?}&p={path?}&q={query?}
GET /alfresco/service/ui/doclist.atom?f={filter?}&p={path?}&q={query?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/doclist.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/doclist.get.desc.xml

Document List Panel

Generate the inner panel for the Document List portlet page.

GET /alfresco/service/ui/doclistpanel?f={filter}&p={path}&h={home};q={query?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/doclistpanel.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/doclistpanel.get.desc.xml

My Spaces

Generate the My Spaces portlet page.

GET /alfresco/service/ui/myspaces?f={filter?}&p={path?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/myspaces.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/myspaces.get.desc.xml

My Spaces Panel

Generate the inner panel for the My Spaces portlet page.

GET /alfresco/service/ui/myspacespanel?f={filter}&p={path}&h={home}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/myspacespanel.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/myspacespanel.get.desc.xml

My Tasks

Generate the My Tasks portlet page.

GET /alfresco/service/ui/mytasks?f={filter?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/mytasks.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/mytasks.get.desc.xml

My Tasks Panel

Generate the Generate the inner panel for the My Tasks portlet page.

GET /alfresco/service/ui/mytaskspanel?f={filter?}

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/mytaskspanel.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/mytaskspanel.get.desc.xml

My Web Modified Files

Generate the My Web Modified Files portlet page.

GET /alfresco/service/ui/mywebfiles

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/mywebfiles.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/mywebfiles.get.desc.xml

My Web Forms

Generate the My Web Forms portlet page.

GET /alfresco/service/ui/mywebforms

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/portlets/mywebforms.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/portlets/mywebforms.get.desc.xml

Package: /org/alfresco/repository

Login

Establish a ticket.

GET /alfresco/service/api/login?u={username}&pw={password?}

Requirements:

  • Default Format: xml
  • Authentication: none
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/repository/login.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/login.get.desc.xml

Delete Login Ticket

Delete Login Ticket.

DELETE /alfresco/service/api/login/ticket/{ticket}

Requirements:

  • Default Format: xml
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/repository/loginticket.delete
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/loginticket.delete.desc.xml

Get Login Ticket

Get Login Ticket.

GET /alfresco/service/api/login/ticket/{ticket}

Requirements:

  • Default Format: xml
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/repository/loginticket.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/loginticket.get.desc.xml


Example communication between the server and client:

curl "http://localhost:8080/alfresco/service/api/login?u=admin&pw=admin"

<?xml version="1.0" encoding="UTF-8"?>
<ticket>TICKET_fecc7ad5382c99006330474a1bdd7d4e5510342c</ticket>

Package: /org/alfresco/repository/search

Alfresco Keyword Search (OpenSearch Enabled)

Execute Keyword Search against Alfresco Repository (Company Home and below).

GET /alfresco/service/api/search/keyword.html?q={searchTerms}&p={startPage?}&c={count?}&l={language?}
GET /alfresco/service/search/keyword.html?q={searchTerms}&p={startPage?}&c={count?}&l={language?}
GET /alfresco/service/api/search/keyword.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?}
GET /alfresco/service/search/keyword.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?}
GET /alfresco/service/api/search/keyword.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}
GET /alfresco/service/search/keyword.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}
GET /alfresco/service/api/search/keyword.portlet?q={searchTerms}&p={startPage?}&c={count?}&l={language?}

Requirements:

  • Default Format: html
  • Authentication: guest
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/repository/search/keywordsearch.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/search/keywordsearch.get.desc.xml

Keyword Search Description

OpenSearch description document for Alfresco Repository keyword search.

GET /alfresco/service/api/search/keyword/description.xml
GET /alfresco/service/search/keyword/description.xml

Requirements:

  • Default Format: opensearchdescription
  • Authentication: none
  • Transaction: none
  • Format Style: argument

Definition:

  • Id: org/alfresco/repository/search/keywordsearchdescription.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/search/keywordsearchdescription.get.desc.xml

Search Engines

Lists "search engines" registered with this Alfresco Repository.

GET /alfresco/service/api/search/engines?type={type?}
GET /alfresco/service/search/engines?type={type?}
GET /alfresco/service/api/search/engines.atom?type={type?}
GET /alfresco/service/search/engines.atom?type={type?}

Requirements:

  • Default Format: html
  • Authentication: none
  • Transaction: none
  • Format Style: any

Definition:

  • Id: org/alfresco/repository/search/searchengines.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/search/searchengines.get.desc.xml

Proxied (OpenSearch) Search

Search engine proxy for issuing a search against a remote search engine.

GET /alfresco/service/api/search/engine/{engine}/{format}
GET /alfresco/service/search/engine/{engine}/{format}

Requirements:

  • Default Format: Determined at run-time
  • Authentication: none
  • Transaction: none
  • Format Style: any

Definition:

  • Id: org/alfresco/repository/search/searchproxy.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/search/searchproxy.get.desc.xml

Package: /org/alfresco/repository/store

Content Retrieval

Stream a content property from the Repository.

GET /alfresco/service/api/node/content{;property}/{store_type}/{store_id}/{node_id}?a={attach?}
GET /alfresco/service/api/path/content{;property}/{store_type}/{store_id}/{path}?a={attach?}

Requirements:

  • Default Format: Determined at run-time
  • Authentication: guest
  • Transaction: required
  • Format Style: argument

Definition:

  • Id: org/alfresco/repository/store/content.get
  • Description: classpath:alfresco/templates/webscripts/org/alfresco/repository/store/content.get.desc.xml

Package: /org/alfresco/sample

AVM Browse Sample

Sample demonstrating the listing of AVM folder contents.

GET /alfresco/service/sample/avm/path/{storeid}/{path}

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: argument

Definition:

  • Id: org/alfresco/sample/avmbrowse.get
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/avmbrowse.get.desc.xml

AVM Stores Sample

Sample demonstrating the listing of AVM stores.

GET /alfresco/service/sample/avm/stores

Requirements:

  • Default Format: html
  • Authentication: admin
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/sample/avmstores.get
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/avmstores.get.desc.xml

Blog Search Sample

Sample that finds all blog entries whose content contains the specified search term.

GET /alfresco/service/sample/blog/search?q={searchTerm}
GET /alfresco/service/sample/blog/search.atom?q={searchTerm}
GET /alfresco/service/sample/b/s?q={searchTerm}
GET /alfresco/service/sample/b/s.atom?q={searchTerm}

Requirements:

  • Default Format: html
  • Authentication: guest
  • Transaction: required
  • Format Style: extension

Definition:

  • Id: org/alfresco/sample/blogsearch.get
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/blogsearch.get.desc.xml

Category Search Sample

Sample that finds all blog entries tagged with specified categories.

GET /alfresco/service/sample/blog/category/{category}

Requirements:

  • Default Format: html
  • Authentication: guest
  • Transaction: required
  • Format Style: argument

Definition:

  • Id: org/alfresco/sample/categorysearch.get
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/categorysearch.get.desc.xml

Folder Listing Sample

Sample demonstrating the listing of folder contents.

GET /alfresco/service/sample/folder/{path}

Requirements:

  • Default Format: html
  • Authentication: guest
  • Transaction: required
  • Format Style: argument

Definition:

  • Id: org/alfresco/sample/folder.get
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/folder.get.desc.xml

File Upload Form Sample

(sorry, 2.1 Enterprise ownwards)

Form for uploading file content and meta-data into Repository.

GET /alfresco/service/sample/upload

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/sample/upload.get
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/upload.get.desc.xml

File Upload Sample

(sorry, 2.1 Enterprise ownwards)

Upload file content and meta-data into Repository.

POST /alfresco/service/sample/upload

Requirements:

  • Default Format: html
  • Authentication: user
  • Transaction: required
  • Format Style: any

Definition:

  • Id: org/alfresco/sample/upload.post
  • Description: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts/org/alfresco/sample/upload.post.desc.xml
Personal tools
Download and go
© 2014 Alfresco Software, Inc. All Rights Reserved. Legal | Privacy | Accessibility