Network Working Group R. Sayre Internet-Draft April 22, 2006 Expires: October 24, 2006 2-Way RSS draft-sayre-2-way-rss-04 Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. This document may not be modified, and derivative works of it may not be created. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on October 24, 2006. Copyright Notice Copyright (C) The Internet Society (2006). Abstract This memo presents a protocol that uses XML and HTTP to publish and edit Web resources. Sayre Expires October 24, 2006 [Page 1] Internet-Draft 2-Way RSS April 2006 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. The 2-Way RSS Model . . . . . . . . . . . . . . . . . . . . . 3 3. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5. Authoring . . . . . . . . . . . . . . . . . . . . . . . . . . 4 6. 2-Way RSS Feeds . . . . . . . . . . . . . . . . . . . . . . . 6 7. 2-Way Media RSS Feeds . . . . . . . . . . . . . . . . . . . . 7 8. Service Outlines . . . . . . . . . . . . . . . . . . . . . . . 9 9. The 2-Way RSS Namespace . . . . . . . . . . . . . . . . . . . 11 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 13 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 14 Intellectual Property and Copyright Statements . . . . . . . . . . 15 Sayre Expires October 24, 2006 [Page 2] Internet-Draft 2-Way RSS April 2006 1. Introduction 2-Way RSS uses HTTP [RFC2616] and XML [XML 1.0] to publish and edit Web resources. 1.1. Editor's Note To discuss this draft, please join the 2-Way RSS mailing list [1]. Membership is open to all. 2. The 2-Way RSS Model 2-Way RSS uses HTTP to operate on collections of Web resources represented by RSS feeds [RSS]. In 2-Way RSS, individual RSS items have URIs [RFC3986]. This section illustrates the editing cycle for RSS items. o GET is used to retrieve an item or perform a read-only query. o POST is used to create a new item. o PUT is used to update an existing item. o DELETE is used to remove an item. 3. Discovery To discover the location of the feeds exposed by a 2-way RSS service, the client must locate and request the Service Outline, an OPML 2.0 document [OPML2]. Client Server | | | 1.) GET Service Outline URI | |------------------------------->| | | | 2.) Service OPML Document | |<-------------------------------| | | 1. The client sends a GET request to the Service Outline URI. 2. The server responds with an OPML Document containing the locations of feeds provided by the service. The content of this document can vary based on aspects of the client request, including, but not limited to, authentication credentials. 4. Listing Sayre Expires October 24, 2006 [Page 3] Internet-Draft 2-Way RSS April 2006 Once the client has discovered the location of a feed in the outline, it can request a listing of the feed's items. However, a feed might contain an extremely large number of items, so servers are likely to list a small subset of them by default. Client Server | | | 1.) GET to RSS Feed URI | |------------------------------->| | | | 2.) 200 OK, RSS Feed Doc | |<-------------------------------| | | 1. The client sends a GET request to the RSS Feed's URI. 2. The server responds with an RSS Feed Document containing a full or partial listing of the feed's membership. 5. Authoring After locating a feed, a client can add entries by sending a POST request to the feed; other changes are accomplished by sending HTTP requests to each item. 5.1. Create Client Server | | | 1.) POST Item to Feed URI | |------------------------------->| | | | 2.) 201 Created @ Location | |<-------------------------------| | | 1. The client sends an RSS item to the server via HTTP POST. The Request URI is that of the RSS Feed. 2. The server responds with a response of "201 Created" and a "Location" header containing the URI of the newly-created RSS item. Sayre Expires October 24, 2006 [Page 4] Internet-Draft 2-Way RSS April 2006 5.2. Read Client Server | | | 1.) GET to Item URI | |------------------------------->| | | | 2.) 200 OK RSS Item | |<-------------------------------| | | 1. The client sends a GET request to the item's URI. 2. The server responds with an RSS item. 5.3. Update Client Server | | | 1.) PUT to RSS Item URI | |------------------------------->| | | | 2.) 200 OK | |<-------------------------------| | | 1. The client PUTs an updated RSS item to the item's URI. 2. The server responds with a successful status code. 5.4. Delete Client Server | | | 1.) DELETE to Item URI | |------------------------------->| | | | 2.) 204 No Content | |<-------------------------------| | | 1. The client sends a DELETE request to the item's URI. 2. The server responds with successful status code. 5.5. Success and Failure HTTP defines classes of response. HTTP status codes of the form 2xx Sayre Expires October 24, 2006 [Page 5] Internet-Draft 2-Way RSS April 2006 signal that a request was successful. HTTP status codes of the form 4xx or 5xx signal that an error has occurred, and the request has failed. Consult the HTTP specification for more detailed definitions of each status code. 6. 2-Way RSS Feeds 6.1. GET RSS feeds can contain extremely large numbers of items. A naive client such as a web spider or web browser would be overwhelmed if the response to a GET contained every item in the feed, and the server would waste large amounts of bandwidth and processing time on clients unable to handle the response. As a result, responses to a simple GET request represent a server-determined subset of the items in the feed. An example 2-Way RSS feed: The Baron in the Trees http://example.org/trees.html Recent posts. Chapter One It was on the fifteenth of June, 1767, that Cosimo Piovasco di Rondò, my brother, sat among us for the last time. uuid:941e12b4-6eeb-4753-959d-0cbc51875387 http://example.org/chapter1.html Each member item is represented by an element, but those items are not an editable representation of the each item. To retrieve the source representation of the item, clients send a GET request to the URI found in each item's edit link, an 'r:link' element Section 9.1 with an 'edit' relation. 6.2. POST A 2-Way RSS feed also accepts POST requests. The client POSTs a new item to the RSS feed. Some feeds only accept POST requests with Sayre Expires October 24, 2006 [Page 6] Internet-Draft 2-Way RSS April 2006 certain media-types, so a POST request could result in a response with a status code of 415 ("Unsupported Media Type"). In the case of a successful creation, the status code is 201 ("Created"). Example HTTP request creating a new item in a feed: POST /wall HTTP/1.1 Host: example.org User-Agent: Cosimo/1.0 Content-Type: text/xml Content-Length: nnnn Chapter One It started out simple... uuid:941e12b4-6eeb-4753-959d-0cbc51875387 http://example.org/chapter1.html Example response. HTTP/1.1 201 Created Date: Mon, 21 Mar 2005 19:20:19 GMT Server: CountBasic/1.0 ETag: "4c083-268-423f1dc6" Location: http://example.org/items/foo13241234.xml 7. 2-Way Media RSS Feeds The items within 2-way Media RSS Feeds do not represent uniform types of content. For example, they might contain podcasts, JPEG images, text documents, MPEG movies, or any other type of resource the server allows. 7.1. GET 2-Way Media RSS Feeds return an RSS feed much like the textual 2-Way RSS feeds described above, but with a few additions. The entries also contain an element with a 'url' attribute pointing to the media object. This URL can be used to edit the uploaded media object, using PUT and DELETE. Such items may contain edit links used to edit the item metadata. Sayre Expires October 24, 2006 [Page 7] Internet-Draft 2-Way RSS April 2006 An example 2-Way Media RSS Feed: My Pics http://example.org/pics Recent photos. beach25 http://example.org/beach-pic1.html uuid:941e12b4-6eeb-4753-959d-0cbc51875387 This was awesome. Implementations require that each such item contain either a or <description> element. The value for the <title> element will likely be provided by the client, as a way for users to associate their local objects with those they have uploaded to the server (see POST below). 7.2. POST To add an item to a 2-Way Media RSS feed, clients POST the resource to the Media feed's URL. Clients should provide a 'Title' request header [OBJECT] to provide the server with a short string identifying the object to users. Clients may include a 'Content-Description' header [RFC2045] providing a more complete description of the content. Data gleaned from other entity headers, such as 'Keywords' [RFC2822] and 'From' [RFC2616], may also be exposed in the RSS feed. Servers may inspect the POSTed entity for additional metadata to be exposed in an <item> element when listed in a 2-Way Media RSS feed. For example, the server might inspect a JPEG file for EXIF headers containing creator data. Sayre Expires October 24, 2006 [Page 8] Internet-Draft 2-Way RSS April 2006 An example request: POST /pics HTTP/1.1 Host: example.org User-Agent: Cosimo/1.0 Content-Type: image/tiff Content-Length: nnnn Title: A trip to the beach From: Bobby <bobby@example.org> Keywords: beach, digginit, tags, mrpibb, redvines Content-Description: It was so fun. ...binary data... An example response: HTTP/1.1 201 Created Date: Mon, 21 Mar 2005 19:20:19 GMT Server: CountBasic/2.0 ETag: "4c083-268-423f1dc6" Location: http://example.org/stuff/beach.tiff <item> <title>A trip to the beach http://example.org/beach.jpg uuid:4019de8a-7d08-4ca7-aee4-1a7cb92f3173 The server's response contains a 'Location' header that gives the URI of the created media resource. The body of the response shows the created item. The enclosure element contains more detailed information about the created media resource. 8. Service Outlines Many 2-Way RSS applications require a basic resource layout in order to ease configuration requirements. Servers use Service Outline OPML 2.0 documents to convey information about related groups of 2-Way RSS feeds. On a blogging service, for example, each group might represent a distinct blog and associated resources. Normal feeds have a type attribute of 'rss', while media feeds have a type attribute of 'media rss'. Sayre Expires October 24, 2006 [Page 9] Internet-Draft 2-Way RSS April 2006 Example Service Outline document: My Blogs Servers are not required to expose a Service Outline OPML document, but experimental deployment experience has shown that a single document which signals some basic information about the server's configuration can greatly simplify client implementations. The simplest useful Service Outline OPML document shows the location of a single feed: Flickr If another 2-Way RSS feed is added, another element is added to the Service Outline. Flickr More extensive services could require some amount of hierarchical grouping. Sayre Expires October 24, 2006 [Page 10] Internet-Draft 2-Way RSS April 2006 Flickr Many publishing systems include a categorization system. An outline element with a type attribute value of 'categories' can be used to list the available categories. Flickr 9. The 2-Way RSS Namespace The 2-Way RSS namespace URI is 'http://example.org/2006/02/2WayRSS' [@ will update]. The examples in this specifcation use the prefix 'r', but any prefix will do in practice. 9.1. The 'r:link' Element The syntax and semantics of the 'r:link' element are identical to the XHTML link element [XHTML], except for the namespace, and one other exception: the r:link element allows arbitrary attributes. Sayre Expires October 24, 2006 [Page 11] Internet-Draft 2-Way RSS April 2006 10. References [OBJECT] Berners-Lee, T., "Object Header lines in HTTP", 1992, . [OPML2] Winer, D., "OPML 2.0 Specification", March 2006, . [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. [RSS] Cadenhead, et al., "Really Simple Syndication -- RSS Advisory Board Announcements", . [RSS091] Libby, D., "RSS 0.91 Spec, revision 3", June 1997, . [RSS092] Winer, D., "RSS 0.92", December 2005, . [RSS2] Winer, D., "RSS 2.0", July 2003, . [XHTML] Pemberton, S., "XHTML. 1.0 The Extensible HyperText Markup Language (Second Edition)", W3C REC REC-xhtml1-20020801, August 2002, . [XML 1.0] Bray, T., Sperberg-McQueen, C., Paoli, J., Maler, E., and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third Edition)", W3C REC REC-xml-20040204, February 2004, . [1] Sayre Expires October 24, 2006 [Page 12] Internet-Draft 2-Way RSS April 2006 Appendix A. Acknowledgements [@ will be updated prior to publication] Sayre Expires October 24, 2006 [Page 13] Internet-Draft 2-Way RSS April 2006 Author's Address Robert Sayre Email: rfsayre@boswijck.com Sayre Expires October 24, 2006 [Page 14] Internet-Draft 2-Way RSS April 2006 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society (2006). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society. Sayre Expires October 24, 2006 [Page 15]