[Search] [txt|pdf|bibtex] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02 03 04 05 06                                          
Network Working Group                                           R. Sayre
Internet-Draft                                          October 25, 2005
Expires: April 28, 2006


                  The Atom Publishing Protocol (Basic)
               draft-sayre-atompub-protocol-basic-05.txt

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. This document may only be posted in an Internet-Draft.

   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 April 28, 2006.

Copyright Notice

   Copyright (C) The Internet Society (2005).

Abstract

   This memo presents a protocol that uses XML and HTTP to publish and
   edit Web resources.

Editorial Note

   To provide feedback on this Internet-Draft, join the atom-protocol
   mailing list <http://www.imc.org/atom-protocol/index.html>.



Sayre                    Expires April 28, 2006                 [Page 1]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


Table of Contents

   1.   Introduction . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.   Notational Conventions . . . . . . . . . . . . . . . . . . .   3
   3.   The Atom Publishing Protocol Model . . . . . . . . . . . . .   3
   4.   APP Feeds  . . . . . . . . . . . . . . . . . . . . . . . . .   6
   5.   Media Feeds  . . . . . . . . . . . . . . . . . . . . . . . .   7
   6.   APP Outlines . . . . . . . . . . . . . . . . . . . . . . . .   9
   7.   Security Considerations  . . . . . . . . . . . . . . . . . .  10
   8.   References . . . . . . . . . . . . . . . . . . . . . . . . .  10
        Author's Address . . . . . . . . . . . . . . . . . . . . . .  11
   A.   Contributors . . . . . . . . . . . . . . . . . . . . . . . .  11
   B.   Change History . . . . . . . . . . . . . . . . . . . . . . .  11
        Intellectual Property and Copyright Statements . . . . . . .  13





































Sayre                    Expires April 28, 2006                 [Page 2]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


1.  Introduction

   The Atom Publishing Protocol (APP) protocol uses HTTP [RFC2616] and
   XML [W3C.REC-xml-20040204] to publish and edit Web resources.

2.  Notational Conventions

   The APP namespace is "http://purl.org/atom/app#".  This specification
   refers to it by using the prefix "pub", but that prefix is arbitrary.

   The terms 'URI' and 'IRI' are shorthand for the identifiers specified
   in [RFC3986] and [RFC3987].

3.  The Atom Publishing Protocol Model

   The APP uses HTTP to operate on collections of Web resources
   represented by Atom feeds [AtomFormat].  This section illustrates the
   editing cycle for Atom entries.

   o  GET is used to retrieve a representation of a resource or perform
      a read-only query.
   o  POST is used to create a new, dynamically-named resource.
   o  PUT is used to update a known resource.
   o  DELETE is used to remove a resource.

3.1  Discovery

   To discover the location of the feeds exposed by an APP service, the
   client must locate and request an APP Outline (Section 6).  APP
   Outlines describe the layout of an APP service.

   Client                      Server
   |                                |
   |  1.) GET Outline URI           |
   |------------------------------->|
   |                                |
   |  2.) Service Outline Doc       |
   |<-------------------------------|
   |                                |

   1.  The client sends a GET request to the Service Outline Resource.
   2.  The server responds with a APP Outline 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 April 28, 2006                 [Page 3]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


3.2  Listing

   Once the client has discovered the location of a feed in the outline,
   it can request a listing of the feed's entries.  However, a feed
   might contain an extremely large number of entries, so servers are
   likely to list a small subset of them by default.

   Client                      Server
   |                                |
   |  1.) GET to Atom Feed URI      |
   |------------------------------->|
   |                                |
   |  2.) 200 OK, Atom Feed Doc     |
   |<-------------------------------|
   |                                |

   1.  The client sends a GET request to the Atom Feed's URI.
   2.  The server responds with an Atom Feed Document containing a full
       or partial listing of the feed's membership.

3.3  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 entry.

3.3.1  Create

   Client                      Server
   |                                |
   |  1.) POST Entry to Feed URI    |
   |------------------------------->|
   |                                |
   |  2.) 201 Created @ Location    |
   |<-------------------------------|
   |                                |

   1.  The client sends an Atom Entry to the server via HTTP POST.  The
       Request URI is that of the Atom Feed.
   2.  The server responds with a response of "201 Created" and a
       "Location" header containing the URI of the newly-created Atom
       Entry.









Sayre                    Expires April 28, 2006                 [Page 4]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


3.3.2  Read

   Client                      Server
   |                                |
   |  1.) GET or HEAD to Entry URI  |
   |------------------------------->|
   |                                |
   |  2.) 200 OK Atom Entry         |
   |<-------------------------------|
   |                                |

   1.  The client sends a GET (or HEAD) request to the entry's URI.
   2.  The server responds with an Atom Entry document.

3.3.3  Update

   Client                      Server
   |                                |
   |  1.) PUT to Entry URI          |
   |------------------------------->|
   |                                |
   |  2.) 200 OK                    |
   |<-------------------------------|
   |                                |

   1.  The client PUTs an updated Atom Entry Document to the entry's
       URI.
   2.  The server responds with a successful status code.

3.3.4  Delete

   Client                      Server
   |                                |
   |  1.) DELETE to Entry URI       |
   |------------------------------->|
   |                                |
   |  2.) 204 No Content            |
   |<-------------------------------|
   |                                |

   1.  The client sends a DELETE request to the entry's URI.
   2.  The server responds with successful status code.

3.4  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



Sayre                    Expires April 28, 2006                 [Page 5]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


   failed.  Consult the HTTP specification for more detailed definitions
   of each status code.

4.  APP Feeds

4.1  GET

   Feeds can contain extremely large numbers of resources.  A naive
   client such as a web spider or web browser would be overwhelmed if
   the response to a GET contained every entry 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
   entries in the feed.

   An example APP feed:

       <feed xmlns="http://www.w3.org/2005/Atom"
             xmlns:pub="http://purl.org/atom/app#">
         <title>My Posts1</title>
         <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefa6</id>
         <updated>2005-12-21T04:11:00-08:00</updated>
         <!-- 0 or more atom:entry elements follow -->
         <entry>
           <title type="text">title 25</title>
           <updated>2005-12-21T04:11:00-08:00</updated>
           <author>
             <name>Foo</name>
           </author>
           <summary>It started out looking simple enough...</summary>
           <id>urn:uuid:941e12b4-6eeb-4753-959d-0cbc51875387</id>
           <pub:edit href="./entry7.atom"/>
           <link href="/permalink7.html" />
          </entry>
          ...
       </feed>

   Each member entry is represented by an atom:entry element, but those
   entries are not an editable representation of the entry.  To retrieve
   the source representation of the entry, clients send a GET request to
   the URI found in each entry's pub:edit element (see Section 4.3.1).
   Derived resources are located by examining an entry's atom:link
   elements.

4.2  POST

   An APP feed also accepts POST requests.  The client POSTs a
   representation of the desired resource to the APP feed.  Some feeds



Sayre                    Expires April 28, 2006                 [Page 6]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


   only accept POST requests with certain media-types, so a POST MAY
   generate 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 request creating a new entry in a feed:

       POST /collection HTTP/1.1
       Host: example.org
       User-Agent: Cosimo/1.0
       Content-Type: application/atom+xml
       Content-Length: nnnn

       ...data...

   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/foo13241234.atom

   APP feeds contain primarily textual content.  Examples include
   weblogs, online journals, and wikis.  Clients add entries by sending
   POST requests containing Atom Entry Documents.  Existing entries are
   edited by sending HTTP requests to the URI found in an individual
   entry's pub:edit element.  Servers can determine the processing
   necessary to interpret a request by examining the request's HTTP
   method.  It is probably unwise to change an existing entry's atom:id
   value when issuing a PUT request.

4.3  Entry Extensions

4.3.1  The 'pub:edit' Element

   The pub:edit element is a child of atom:entry and has one attribute,
   'href'.  The value of this attribute is an IRI reference interpreted
   relative to xml:base.

4.3.2  The 'pub:control' Element

   The pub:control element is a child of atom:entry and is used to
   persist editing information and contains arbitrary markup.

5.  Media Feeds

   The entries within Media Feeds are feeds do not represent uniform



Sayre                    Expires April 28, 2006                 [Page 7]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


   types of content.  For example, they might contain JPEG images, text
   documents, MPEG movies, and any other type of resource the server
   allows.

5.1  GET

   Media Feeds return an Atom feed much like Text Feeds, but with a few
   additions.  The entries also contain an atom:content element with a
   'src' attribute pointing to the media resource.  This URI can be used
   to edit the uploaded media resource, using PUT and DELETE.  Such
   entries may contain pub:edit elements used to edit the entry
   metadata.  As with other entries, derived resources can be located by
   inspecting an entry's atom:link elements.

   An example Media Feed:

       <feed xmlns="http://www.w3.org/2005/Atom"
             xmlns:pub="http://purl.org/atom/app#">
         <title>My Posts1</title>
         <author>
            <name>Foo</name>
         </author>
         <id>urn:uuid:ce61592c-14e2-4557-978e-dfbd444aefa6</id>
         <updated>2005-12-21T04:11:00-08:00</updated>
         <!-- 0 or more atom:entry elements follow -->
         <entry>
           <title type="text">Title25</title>
           <updated>2005-12-21T04:11:00-08:00</updated>
           <id>urn:uuid:941e12b4-6eeb-4753-959d-0cbc51875387</id>
           <link href="/permalink7.html" type="text/html" />
           <link href="/stuff/public/beach.jpg" type="image/jpg"
                 title="Low res public version" />
           <summary>This was awesome.</summary>
           <content src="http://example.org/asdf.jpg" />
         </entry>
         ...
       </feed>

   The Atom Syndication Format requires that each such entry contain an
   atom:title and atom:summary element.  This requirement can be
   challenging to meet without requiring users to enter tedious
   metadata, but servers should attempt to provide textual data about
   the resource in the interests of accessibility.  The atom:title
   element will likely be provided by the client, as a way for users to
   associate their local resources with those they have uploaded to the
   server (see POST below).





Sayre                    Expires April 28, 2006                 [Page 8]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


5.2  POST

   To add an entry to a Media Feed, clients POST the resource to the
   Media Feed's URI.  Clients should provide a 'Title' request header to
   provide the server with a short string identifying the resource 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 atom:entry element when listed in a Media Feed.  For
   example, the server might inspect a JPEG file for EXIF headers
   containing creator data.

   An example request:

       POST /collection HTTP/1.1
       Host: example.org
       User-Agent: Cosimo/1.0
       Content-Type: image/jpg
       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.jpg


6.  APP Outlines

   In order for authoring to commence, a client must first discover the
   Atom Feeds offered by the server.

   The outline is an APP Outline Document [APPO].  The top level outline
   elements describe distinct groups of resources available on the
   server.  For example, a user with an account containing three blogs
   would have 3 <outline> elements under the root <app> element.  There
   is no requirement that servers support multiple top-level outlines,
   and a feed may appear in more than one location in the document.

   Clients read APP feeds by visiting the URI located in the 'href'
   attribute of an <outline> element.  This URI also serves as the



Sayre                    Expires April 28, 2006                 [Page 9]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


   location a client POSTs new entries to.  The 'class' attribute of the
   <outline> element indicates the type of feed.  This specification
   defines two values for the 'class' attribute:

   o  feed
   o  media feed

   These values correspond to standard feeds and media feeds,
   respectively.

   An example APP Outline:

   <app>
     <outline class="feed" text="Main Blog" href="/entries">
       <outline class="media feed" text="Photos" href="/photos"/>
       <outline class="feed" text="Drafts" href="/drafts">
     </outline>
     <outline class="feed" text="Side Bar Blog" href="/2/entries">
       <outline class="feed" text="Stuff" href="/2/stuff">
     </outline>
     <outline class="media feed" text="Moblog" href="/moblog"/>
   </app>



7.  Security Considerations

   APP relies on HTTP Authentication.  See [RFC2617] for a more detailed
   description of the security properties of HTTP Authentication.

8.  References

   [APPO]     Sayre, R., "APP Outline Format",  work-in-progress,
              draft-sayre-atompub-protocol-outline-00, October 2005.

   [AtomFormat]
              Nottingham, M. and R. Sayre, "The Atom Syndication
              Format",  work-in-progress, August 2005.

   [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.

   [RFC2617]  Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,



Sayre                    Expires April 28, 2006                [Page 10]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


              Leach, P., Luotonen, A., and L. Stewart, "HTTP
              Authentication: Basic and Digest Access Authentication",
              RFC 2617, June 1999.

   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
              Resource Identifier (URI): Generic Syntax", STD 66,
              RFC 3986, January 2005.

   [RFC3987]  Duerst, M. and M. Suignard, "Internationalized Resource
              Identifiers (IRIs)", RFC 3987, January 2005.

   [W3C.REC-xml-20040204]
              Yergeau, F., Paoli, J., Sperberg-McQueen, C., Bray, T.,
              and E. Maler, "Extensible Markup Language (XML) 1.0 (Third
              Edition)", W3C REC REC-xml-20040204, February 2004.


Author's Address

   Robert Sayre

   Email: rfsayre@boswijck.com
   URI:   http://boswijck.com

Appendix A.  Contributors

   This draft is a variant of the in-progress Atom Publishing Protocol
   specification from the IETF Atompub WG, and owes a debt to the WG's
   members.

Appendix B.  Change History

   -05:  Death to collections!
      Switch APPO instead of XOXO.
      State the obvious about the extension elements.
      Remove RFC2119 reference.
      Change "Normative References" to "References".
   -04:  Add pub:control element.
      Reword collection POST.
      Prophesize about atom:id.
   -03:  Remove search/query capabilities added in -02
      Drop round-tripping.  Most of them were writable, some folks
      wanted to edit atom:updated, that leaves atom:id, and that seems
      foolish to try and edit, so go ahead and try it if you think you
      can.






Sayre                    Expires April 28, 2006                [Page 11]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


      Drop ordering... let the server pop things up if it wants to.
   -02:  Add search/query capabilities.
   -01:  Split from WG draft, cut SOAP, and much other cruft.
   -interlude:  Becomes WG draft.
   -00:  Split from WG draft














































Sayre                    Expires April 28, 2006                [Page 12]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


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.

   The IETF has been notified of intellectual property rights claimed in
   regard to some or all of the specification contained in this
   document.  For more information consult the online list of claimed
   rights.


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 (2005).  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.





Sayre                    Expires April 28, 2006                [Page 13]


Internet-Draft    The Atom Publishing Protocol (Basic)      October 2005


Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.















































Sayre                    Expires April 28, 2006                [Page 14]