Escolar Documentos
Profissional Documentos
Cultura Documentos
PART V
Appendices
This appendix contains the full list of the publicly available Web scripts that compose the
Alfresco RESTful API. The Web scripts are organized by package.
CALENDAR
This section describes the Calendar Web scripts within the /org/alfresco/calendar
package.
GET /alfresco/service/calendar/SaveCalendarEvent?what={whatEvent}
&where={whereEvent}&desc={descriptionEvent}&color={colorEvent}
&fd={fromDate}&ft={fromTime}&td={toDate}&tt={toTime}&e={eventId}
&d={toDelete}&s={spaceRef}
Calendar Events
The following Web script provides calendar events.
GET /alfresco/service/calendar/getCalendarEvents
Calendar
The following Web script provides a list of available calendars from which you can subscribe or
unsubscribe.
GET /alfresco/service/calendar/calendarInit
6 ❘ APPENDIX A RESTFUL API REFERENCE
Calendar Subscriptions
The following Web script provides calendar subscriptions.
POST /alfresco/service/calendar/calendarSubscriptions
Calendar Color
The following Web script provides the color of the subscribed calendar.
GET /alfresco/service/calendar/getColor
Event Listing
The following Web script provides a list of all upcoming events.
GET /alfresco/service/calendar/events/{nodeId}
Calendar Feed
The following Web script provides the calendar iCalendar feed.
GET /alfresco/service/calendar/feed/{nodeId}
Authentication
This section describes the authentication Web scripts.
Login
The following Web script provides a login and establishes a ticket.
GET /alfresco/service/api/login?u={username}&pw={password?}
For example, the JSON for this Web script would be:
{
"username" : "myuser",
"password" : "mypassword"
}
8 ❘ APPENDIX A RESTFUL API REFERENCE
It returns the new authentication ticket. The user name and password are provided as URL arguments
that may be logged by proxies or the Alfresco server. Use the alternative POST method of login instead
of the GET method.
The Web script description document specifies the following options:
➤ user: The authentication access
Login (POST)
The following Web script provides a login, establishes a ticket, and then returns the new
authentication ticket.
POST /alfresco/service/api/login
For example, the JSON for this Web script would be:
{
"username" : "myuser",
"password" : "mypassword"
}
Logout
After the user has logged out, the ticket is no longer valid, and subsequent attempts to use it will fail.
DELETE /alfresco/service/api/login/ticket/{ticket}
The ticket may be invalid, or expired, or the user may have been locked out.
For security reasons, this Web script does not validate the ticket of another user.
➤ If the ticket is valid, it returns STATUS_SUCCESS (200).
➤ If the ticket is not valid, it returns STATUS_NOT_FOUND (404).
➤ If the ticket does not belong to the current user, it returns STATUS_NOT_FOUND (404).
The Web script description document specifies the following options:
➤ user: The authentication access
Touch
The following Web script is an SSO authentication touch point.
GET /alfresco/service/touch
Activities
This section describes the Activities Web scripts within the /org/alfresco/repository/activities
package.
This package contains the following child packages:
➤ /org/alfresco/repository/activities/feed
➤ /org/alfresco/repository/activities/feed/control
GET /alfresco/service/api/activities/templates
GET /alfresco/service/api/activities/templates?format=json
GET /alfresco/service/api/activities/templates/{path}
GET /alfresco/service/api/activities/templates/{path}?format=json
Activities Feed
This section describes the Activity Feed Web scripts.
This package contains the following child packages:
➤ /org/alfresco/repository/activities/feed/sitefeed.get
➤ /org/alfresco/repository/activities/feed/userfeed-admin.get
➤ /org/alfresco/repository/activities/feed/userfeed.get
Blogs
This section describes the Blogs Web scripts within the /org/alfresco/repository/blogs
package.
This package contains the following child packages:
➤ /org/alfresco/repository/blogs/blog
➤ /org/alfresco/repository/blogs/post
➤ /org/alfresco/repository/blogs/posts
Blog
This section describes the Web scripts within the /org/alfresco/repository/blogs/blog child
package.
Blog GET
The following Web script gets the blog information.
GET /alfresco/service/api/blog/site/{site}/{container}/{path}
GET /alfresco/service/api/blog/site/{site}/{container}
GET /alfresco/service/api/blog/node/{store_type}/{store_id}/{id}
Blog PUT
The following Web script updates a blog.
PUT /alfresco/service/api/blog/site/{site}/{container}/{path}
PUT /alfresco/service/api/blog/site/{site}/{container}
PUT /alfresco/service/api/blog/node/{store_type}/{store_id}/{id}
Posting Blogs
This section describes the Web scripts within the/org/alfresco/repository/blogs/post child
package.
14 ❘ APPENDIX A RESTFUL API REFERENCE
Blog Posts
This section describes the Web scripts within the /org/alfresco/repository/blogs/posts child
package.
GET /alfresco/service/api/blog/site/{site}/{container}/{path}/posts/mydrafts
GET /alfresco/service/api/blog/site/{site}/{container}/posts/mydrafts
GET /alfresco/service/api/blog/node/{store_type}/{store_id}/{id}/posts/mydrafts
GET /alfresco/service/api/blog/site/{site}/{container}/{path}/posts/mypublished
GET /alfresco/service/api/blog/site/{site}/{container}/posts/mypublished
GET /alfresco/service/api/blog/node/{store_type}/{store_id}/{id}/posts/mypublished
Blog Posts
The following Web script gets all posts for a blog.
GET /alfresco/service/api/blog/site/{site}/{container}/{path}/posts/
new?numdays={numdays}
GET /alfresco/service/api/blog/site/{site}/{container}/posts/new?numdays={numdays}
GET /alfresco/service/api/blog/node/{store_type}/{store_id}/{id}/posts/
new?numdays={numdays}
16 ❘ APPENDIX A RESTFUL API REFERENCE
Comments
This section describes the Comments Web scripts within the /org/alfresco/repository/comments
package.
Delete a Comment
The following Web script deletes a comment.
DELETE /alfresco/service/api/comment/node/{store_type}/{store_id}/{id}
Comment
The following Web script gets the data for a comment.
GET /alfresco/service/api/comment/node/{store_type}/{store_id}/{id}
Update a Comment
The following Web script updates a comment.
PUT /alfresco/service/api/comment/node/{store_type}/{store_id}/{id}
All Comments
The following Web script gets all comments for a node.
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/comments
Add a Comment
The following Web script adds a new comment to a node.
POST /alfresco/service/api/node/{store_type}/{store_id}/{id}/comments
Dictionary
This section describes the Dictionary Web scripts within the /org/alfresco/repository/dictionary
package.
GET /alfresco/service/api/classes?cf={classFilter?}&nsp={namespacePrefix?}
&n={name?}
➤ classfilter
➤ namespaceprefix
➤ name
GET /alfresco/service/api/classes/{className}
Get Property Definitions for a Given Class Name and Property Name
The following Web script gets the collection of property definitions for a given class name and
property name.
GET /alfresco/service/api/classes/{classname}/property/{propname}
➤ classfilter
➤ namespaceprefix
➤ name
Discussions
This section describes the Discussion Web scripts within the /org/alfresco/repository/discussions
package.
This package contains the following child packages:
➤ /org/alfresco/repository/discussions/forum
➤ /org/alfresco/repository/discussions/posts
Discussion Forum
This section describes the Web scripts within the /org/alfresco/repository/discussions/forum
child package.
22 ❘ APPENDIX A RESTFUL API REFERENCE
Forum My Posts
The following Web script gets the forum posts created by the current user.
GET /alfresco/service/api/forum/site/{site}/{container}/{path}/posts/myposts
GET /alfresco/service/api/forum/site/{site}/{container}/posts/myposts
GET /alfresco/service/api/forum/node/{store_type}/{store_id}/{id}/posts/myposts
The Web script description document specifies the following options:
➤ user: The authentication access
Discussion Posts
This section describes the Web scripts within the /org/alfresco/repository/discussions/posts
child package.
Delete Topic
The following Web script deletes a topic.
DELETE /alfresco/service/api/forum/post/site/{site}/{container}/{path}
DELETE /alfresco/service/api/forum/post/node/{store_type}/{store_id}/{id}
Topic Details
The following Web script gets the details for a topic.
GET /alfresco/service/api/forum/post/site/{site}/{container}/{path}
GET /alfresco/service/api/forum/post/node/{store_type}/{store_id}/{id}
Update Topic
The following Web script updates a topic.
PUT /alfresco/service/api/forum/post/site/{site}/{container}/{path}
PUT /alfresco/service/api/forum/post/node/{store_type}/{store_id}/{id}
Forms
This section describes the Forms Web scripts within the /org/alfresco/repository/forms package.
PickerList
The following Web script provides a service to return metadata of child items in a parent space to
display in the object finder.
GET /alfresco/service/api/forms/picker/{type}/{store_type}/{store_id}/{id}/children
PickerItems
The following Web script provides a service to return metadata of multiple items to display in the
object finder.
POST /alfresco/service/api/forms/picker/items
Groups
This section describes the Groups Web scripts within the /org/alfresco/repository/groups package.
A user will not be deleted by this method. You must have administrator privileges to alter a group.
The Web script description document specifies the following options:
➤ user: The authentication access
You must have administrator privileges to change the name of a group. The following parameter
is available:
➤ displayName: The display name
Delete a Group
The following Web script deletes a group and all its dependents.
DELETE /alfresco/service/api/groups/{shortName}
List Groups
The following Web script searches for groups.
GET /alfresco/service/api/groups?shortNameFilter={shortNameFilter?}&zone={zone?}
IMAP
This section describes the IMAP Web scripts within the /org/alfresco/repository/imap package.
It is used in the IMAP email body links. (The optional feature is the reply email with a report.)
The Web script description document specifies the following options:
➤ user: The authentication access
Metadata
This section describes the Metadata Web scripts within the /org/alfresco/repository/metadata
package.
Person
This section describes the Person Web scripts within the /org/alfresco/repository/person package.
It can only be executed for the current user or by an admin to update any user.
Repository Web Scripts ❘ 31
Get People
The following Web script gets the collection of people stored in the repository.
GET /alfresco/service/api/people?filter={filterQuery?}
This can optionally be filtered according to some given filter query string.
The Web script description document specifies the following options:
➤ user: The authentication access
Add Person
The following Web script adds a new person based on the details provided.
POST /alfresco/service/api/people
➤ password: The new user’s password (optional). If not specified, a value of password is used,
which should be changed as soon as possible.
The Web script description document specifies the following options:
➤ admin: The authentication access
Delete Person
The following Web script deletes a person.
DELETE /alfresco/service/api/people/{userName}
32 ❘ APPENDIX A RESTFUL API REFERENCE
Get Person
The following Web script gets the details of a person.
GET /alfresco/service/api/people/{userName}
Update Person
The following Web script updates the details of a person.
PUT /alfresco/service/api/people/{userName}
Sites
The following Web script gets a collection of the sites of which a person is an explicit member.
GET /alfresco/service/api/people/{userid}/sites?size={pagesize?}&pos={position?}
Preference
This section describes the Preference Web scripts within the /org/alfresco/repository/preference
package.
Delete Preferences
The following Web script deletes a user’s preferences.
DELETE /alfresco/service/api/people/{userid}/preferences?pf={preferencefilter?}
Get Preferences
The following Web script gets the preferences for a user.
GET /alfresco/service/api/people/{userid}/preferences?pf={preferencefilter?}
Set Preferences
The following Web script sets a user’s preferences.
POST /alfresco/service/api/people/{userid}/preferences
Search
This section describes the Search Web scripts within the /org/alfresco/repository/search package.
&c={count?}&l={language?}
GET /alfresco/service/api/search/person.atom?q={searchTerms}&p={startPage?}
&c={count?}&l={language?}
GET /alfresco/service/search/person.atom?q={searchTerms}&p={startPage?}
&c={count?}&l={language?}
GET /alfresco/service/api/search/person.rss?q={searchTerms}&p={startPage?}
&c={count?}&l={language?}
GET /alfresco/service/search/person.rss?q={searchTerms}&p={startPage?}
&c={count?}&l={language?}
GET /alfresco/service/api/search/person.portlet?q={searchTerms}
&p={startPage?}&c={count?}&l={language?}
Search Engines
The following Web script lists the 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?}
Tagging
This section describes the Tagging Web scripts within the /org/alfresco/repository/tagging
package.
Add Tag
The following Web script adds one or more tags to the node.
POST /alfresco/service/api/node/{store_type}/{store_id}/{id}/tags
POST /alfresco/service/api/path/{store_type}/{store_id}/{id}/tags
➤ url
Tagscope Tags
The following Web script gets all tags of the nearest available tagscope.
GET /alfresco/service/api/tagscopes/node/{store_type}/{store_id}/{id}/tags
GET /alfresco/service/api/tagscopes/site/{site}/tags
GET /alfresco/service/api/tagscopes/site/{site}/{container}/tags
Thumbnail
This section describes the Thumbnail Web scripts within the /org/alfresco/repository/thumbnail
package.
Delete Thumbnail
The following Web script deletes a thumbnail for a content resource.
DELETE /alfresco/service/api/node/{store_type}/{store_id}/{id}/content{property}/
thumbnails/{thumbnailname}
DELETE /alfresco/service/api/path/{store_type}/{store_id}/{id}/content{property}/
thumbnails/{thumbnailname}
Get Thumbnail
The following Web script gets a named thumbnail for a content resource.
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/content{property}/
thumbnails/{thumbnailname}?c={queueforcecreate?}&ph={placeholder?}
GET /alfresco/service/api/path/{store_type}/{store_id}/{id}/content{property}/
thumbnails/{thumbnailname}?c={queueforcecreate?}&ph={placeholder?}
Update Thumbnail
The following Web script updates a thumbnail for a content resource.
PUT /alfresco/service/api/node/{store_type}/{store_id}/{id}/content{property}/
thumbnails/{thumbnailname}
PUT /alfresco/service/api/path/{store_type}/{store_id}/{id}/content{property}/
thumbnails/{thumbnailname}
Get Thumbnails
The following Web script gets the thumbnails for a content resource.
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/content{property}/
thumbnails
GET /alfresco/service/api/path/{store_type}/{store_id}/{id}/content{property}/
thumbnails
Upload
This section describes the Upload Web scripts within the /org/alfresco/repository/upload package.
File Upload
The following Web script uploads file content and metadata into the repository.
POST /alfresco/service/api/upload
➤ siteid
➤ containerid
➤ uploaddirectory
➤ updatenoderef
➤ filename
➤ description
➤ contenttype
➤ majorversion
➤ overwrite
➤ thumbnails
Version
This section describes the Version Web scripts within the /org/alfresco/repository/version
package.