Network Working Group R. Sayre Internet-Draft January 26, 2006 Expires: July 30, 2006 2-Way RSS draft-sayre-2-way-rss-00 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 July 30, 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 July 30, 2006 [Page 1] Internet-Draft 2-Way RSS January 2006 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Notational Conventions . . . . . . . . . . . . . . . . . . . . 3 3. The 2-Way RSS Model . . . . . . . . . . . . . . . . . . . . . 3 4. Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5. Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 6. Authoring . . . . . . . . . . . . . . . . . . . . . . . . . . 4 7. 2-Way RSS Feeds . . . . . . . . . . . . . . . . . . . . . . . 6 8. 2-Way Media RSS Feeds . . . . . . . . . . . . . . . . . . . . 7 9. Service Outlines . . . . . . . . . . . . . . . . . . . . . . . 9 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 11. Security Considerations . . . . . . . . . . . . . . . . . . . 11 12. Informative References . . . . . . . . . . . . . . . . . . . . 11 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12 Intellectual Property and Copyright Statements . . . . . . . . . . 13 Sayre Expires July 30, 2006 [Page 2] Internet-Draft 2-Way RSS January 2006 1. Introduction 2-Way RSS uses HTTP [RFC2616] and XML [W3C.REC-xml-20040204] to publish and edit Web resources. 2. Notational Conventions [@@ 2-Way RSS namespace docs] The terms 'URI' and 'IRI' are shorthand for the identifiers specified in [RFC3986] and [RFC3987]. 3. The 2-Way RSS Model 2-Way RSS uses HTTP to operate on collections of Web resources represented by RSS feeds [RSS]. 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, dynamically-named item. o PUT is used to update an existing item. o DELETE is used to remove an item. 4. 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 document. 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. Sayre Expires July 30, 2006 [Page 3] Internet-Draft 2-Way RSS January 2006 5. Listing 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. 6. 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. 6.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 July 30, 2006 [Page 4] Internet-Draft 2-Way RSS January 2006 6.2. Read Client Server | | | 1.) GET or HEAD to Item URI | |------------------------------->| | | | 2.) 200 OK RSS Item | |<-------------------------------| | | 1. The client sends a GET (or HEAD) request to the item's URI. 2. The server responds with an RSS item. 6.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. 6.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. Sayre Expires July 30, 2006 [Page 5] Internet-Draft 2-Way RSS January 2006 2. The server responds with successful status code. 6.5. Success and Failure HTTP defines classes of response. HTTP status codes of the form 2xx 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. 7. 2-Way RSS Feeds 7.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 started out simple... 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 [@@ TBD XX pub:edit element. Derived resources are located by examining an item's r:link elements] Sayre Expires July 30, 2006 [Page 6] Internet-Draft 2-Way RSS January 2006 7.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 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 /dilettante HTTP/1.1 Host: example.org User-Agent: Cosimo/1.0 Content-Type: application/rss+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 8. 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. 8.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 Sayre Expires July 30, 2006 [Page 7] Internet-Draft 2-Way RSS January 2006 to edit the item metadata.[@@TBD As with any RSS item, related and derived resources can be located by inspecting an item's r:link elements.] 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). 8.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 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. In addition, 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 July 30, 2006 [Page 8] Internet-Draft 2-Way RSS January 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 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 [@@TBD deal with response ambiguity] 9. Service Outlines Many 2-Way RSS applications require a basic resource layout in order to ease configuration requirements. Servers use Service Outline OPML 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. Example Service Outline document: <opml version="1.1"> <head> <title>My Blogs Sayre Expires July 30, 2006 [Page 9] Internet-Draft 2-Way RSS January 2006 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, the document can be upgraded to reflect that. Flickr Finally, more extensive services could require some amount of hierarchical grouping. Sayre Expires July 30, 2006 [Page 10] Internet-Draft 2-Way RSS January 2006 Flickr 9.1. Categories [@@ tbd] 10. IANA Considerations [@@ fill out for application/rss+xml and application/opml+xml] 11. Security Considerations [@@TBD] 12. Informative References Sayre Expires July 30, 2006 [Page 11] Internet-Draft 2-Way RSS January 2006 Author's Address Robert Sayre Email: rfsayre@boswijck.com Sayre Expires July 30, 2006 [Page 12] Internet-Draft 2-Way RSS January 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 July 30, 2006 [Page 13]