announcement (xml)

Represents announcements for a given site (including merged announcements) or all announcements for a user. Also includes Message Of The Day and public announcements. There are three optional URL parameters available: 'n' to set the total number of announcements returned, 'd' to set the number of days in the past to retrieve announcements for, and 'a' to set an ascending sort order of true or false. If the system is configured with the (default) 'Announcement Reorder' property, announcements will be additionally sorted by the message_order. If these parameters are not set, they are retrieved from the tool configuration, or the standard defaults of n=3, d=10, a=0 are used. For example /announcements/site/mercury.json?n=20&d=100&a=1 will retrieve up to 20 total announcements for up to 100 days ago with an ascending order.
RESTful URLs: http://microformats.org/wiki/rest/urls
HTTP response codes as returned by the system:
200 - OK (request is ok and content returned)
201 - CREATED (request created new content, URL and id of content in the header)
204 - NO CONTENT (request is ok but no content to return)
400 - ERROR (general error in the request, probably invalid parameters or data)
401 - UNAUTHORIZED (user authentication required for this request)
403 - FORBIDDEN (authorization required, insufficient privileges, user is already authenticated)
404 - NOT FOUND (resource not found, URL is invalid in some way, id or action are invalid)
405 - METHOD NOT ALLOWED (the method is not supported for this entity type)
406 - NOT ACCEPTABLE (the data format requested is unavailable for this entity type)
500 - INTERNAL SERVER ERROR (general server failure, probably a failure in the provider)
501 - NOT IMPLEMENTED (indicates that a prefix is invalid)

Sample Entity URLs (_id=':ID:') [may not be valid]:

Show Entity URL: GET /announcement/:ID: (xml) (json)
Response Code Details: 200 plus data; 404 if not found, 406 if format unavailable

Custom Actions

msg : list (GET) : [/announcement/msg] (xml) (json)
Retrieve an announcement based on the path used by the announcements service internally, ie /announcement/msg/{siteId}/{channelId}/{announcementId}. Context is normally the site ID and the channelId is normally "main" unless there are multiple channels in a site. For example /announcement/msg/21b1984d-af58-43da-8583-f4adee769aa2/main/5641323b-761a-4a4d-8761-688f4928141b
motd : list (GET) : [/announcement/motd] (xml) (json)
Retrieve only the MOTD announcements.
site : list (GET) : [/announcement/site] (xml) (json)
Retrieve the announcements for a site. If you are not logged in, you will only receive the public announcements for this site.
message : list (GET) : [/announcement/message] (xml) (json)
Retrieve an announcement based on the given siteId and messageId. eg /announcement/message/{siteId}/{msgId}
user : list (GET) : [/announcement/user] (xml) (json)
Retrieve the announcements for the current user. If you are not logged in, you will only receive the MOTD announcements. Announcements will be sorted by date and ignore the system's 'Announcement Reorder' configuration.

Entity class : org.sakaiproject.announcement.entityprovider.AnnouncementEntityProviderImpl$DecoratedAnnouncement

Type :: bean
Name Type Status
1) announcementIdstringRead/Write
2) attachmentsjava.util.ListRead/Write
3) bodystringRead/Write
4) channelstringRead/Write
5) createdByDisplayNamestringRead/Write
6) createdOnjava.util.DateRead/Write
7) idstringRead Only
8) siteIdstringRead/Write
9) siteTitlestringRead/Write
10) titlestringRead/Write

Data and Request Handling

Output formats : xml, json
Input formats : No formats allowed
No Access Provider registered for request processing

Capabilities

NameTypeDescription
1EntityProviderorg.sakaiproject.entitybroker.entityprovider.EntityProvider
2ActionsExecutableorg.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable
3AutoRegisterEntityProviderorg.sakaiproject.entitybroker.entityprovider.capabilities.AutoRegisterEntityProvider
4Describeableorg.sakaiproject.entitybroker.entityprovider.capabilities.Describeable
5Outputableorg.sakaiproject.entitybroker.entityprovider.capabilities.Outputable
6Resolvableorg.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable
7Sampleableorg.sakaiproject.entitybroker.entityprovider.capabilities.Sampleable

REST:: 1.0.1 SVN: $Revision$ : $Date$