Atomenabled beta
Home Developers Publishers Everyone
The Atom API
Developers>
API> API SPEC
RFC TOC
Yes J. C. Gregorio Bitworking, Inc December 2003
Draft-Gregorio-09.html
Abstract
TECHNIQUE for Using XML (EXTENSIBLE MARKUP LANGUAGE) AND HTTP (Hypertext Transport Protocol) to Edit Content.
.
RFC TOC
Table of contents
1 Introduction 2 Terminology 3 Scope 4 Introduction 4.1 Purpose 4.2 Terminology 4.3 The AtomAPI Model 5 Functional Specification 5.1 PostURI 5.1.1 Locating 5.1.2 Request 5.1.3 Response 5.1.3.1 201 5.1.3.2 303 5.1.3.3 400 5.1.3.4 500 5.2 Edituri 5.2.1 Locating 5.2.2 Request 5.3 Feeduri 5.3.1 Locating 5.3.2 Request 5.3.3 Response 5.3.3.1 301 5.3.3.2 307 5.4 LINK TAG 5.4.1 Rel 5.4.2 HREF 5.4.3 Title 5.4.4 Type 5.5 Atom Request and Response Body Constraints 5.5.1 ID 5.5.2 Link 5.5.3 Title 5.5.4 Summary 5.5.5 Content 5.5.6 Issued 5.5.7 Modified 5.5.8 Created 5.5.9 Author 5.5.10 Contributor 5.5.11 generator 6 Security Considerations 7 Appendices 7.1 SOAP Enabling 7.1.1 Servers 7.1.2 Clients 7.2 Example for a weblog 7.3 Example for a wiki 8 Revision History 9 Copyright § References § Author's Address § Full Copyright Statement
TOC
1 Introduction
THE ATOMAPI IS AN Application Level Protocol for Publishing and Editing Web Resources. The Protocol At Its Core Is The Http Transport of Atom Formatted Repesentations.
.
TOC
2 Terminologythe Key Words "Must", "Must Not", "Required", "SHALL", "SHALL NOT", "Should Not", "Recommended", "May", The and "Optional" in this Document is to be interpreted as described in RFC2119.
TOC
3 Scope
. All of the http and xml. All of the xml payloads are in Atom Format, Which is Documented in The Draft Atom Syndication Format RFC.
TOC
4 Introduction
4.1 Purpose
THE ATOMAPI IS An Application Level Protocol for Publishing and Editing Web Resources.
4.2 TERMINOLOGY
Atom Entry
A Fragment of a Full Atom Feed. In this case 'Element and all it's child elements.
Posturi
.
Edituri
A Uri That Is Used to Edit A Resource. The Editing IS DONE Using The Http Verbs Get, Put and Delete. The Reperesent of The Resource IS Always That of an atom entry.
FEEDURI
A Uri That Has A Reperestation As a full atom feed.
4.3 The atomapi model
Atomapi is an application level protocol for publishing and editing web resources. Using The Common Http Verbs Provides a Pattern for Working WITH ALL SUCH Web Resources:
GET is used to retrieve a representation of a resource or perform a read-only query. PUT is used to update a known resource. POST is used to create a new dynamically-named resource. DELETE is used to remove a resource.
There are different kinds of resources managed by the AtomAPI, each of these have URIs and those URIs support a subset of the above methods There are three major classes of URIs in this specification:.. PostURI, FeedURI and EditURI This specification defines the expected actions for each of the methods listed. Note that this does not restrict a URI to only supporting just those methods listed, for example an EditURI could support a POST method, or the OPTIONS method, what those methods do is beyond the scope of this specification. Edituri: PUT, GET, DELETE POSTURI: POST feeduri: Get
This RFC does not specify the form of the URIs that are used. The URI space of each server is controlled, as defined by HTTP, by the server alone. What this RFC does specify are the formats of the files that are exchanged and the actions That Can Be Performed on The Uris Embedded in Those Files.
TOC
5 Functional Specification
5.1 Posturi
The PostURI is used to create entries. These can be either full entries, such as a weblog post, or they can be comments, or even a wiki page. The client POSTs a filled in Atom Entry to this URI. If the request is succesful then multiple new URIs may be created that contain representations of varying types. For example, POSTing an Atom entry to a PostURI may create a new weblog entry with both an HTML and Atom representation now available. The URI of the newly created Atom representation may in Fact be an edituri through heich the resource can be edited.
5.1.1 Locating
For Creating A New Site Entry, The Link Tag IS Used. Note That A LINK TAG IS Used In Both HTML AND IN TAG IS USED IN Both HTML AND IN TAG INTORT POINTS TAG OF THE FOLLOWFORMAT POINTS TAG OF TAGLOWOR for A Site. In Html The Link Tags Are Always found in the head element, while in atom the feed and entry elements.
TYPE = "Application / X.atom XML"
href = "Uri for Posting Goes Here"
Title = "The name of the site.">
NOTE: MULTIPLE LINK TAGS May Appear TOGETHER AND CAN be Distinguished by Having DiffERENT 'REL', 'TYPE' AND 'TITLE' Attributes.
5.1.2 REQUEST
The Request Contains a Filled In at Atom EnTry, Subject To The Constraints in Section @@ TBD @@.
5.1.3 Response
The Expected Status Codes from A Post Are 201, 303, 400, And 410 Area, 404, and 410 Are Also Possible.
5.1.3.1 201
Response includes a Location: header with the URI of the created resource, ie the URI used to edit the entry, as opposed to the URI used to display the content The body of the response will contain the entry "filled in" with time stamps. and any other data the server choses to reveal. This must contain enough information to enable a client to issue a subsequent PUT to this location. Note that the server may chose to omit the content in the response, particularly if it is large.
5.1.3.2 303
The body of this response does not contain the filled in Entry, but the filled in Entry can be found under a different URI and SHOULD be retrieved using a GET method on that resource. The different URI SHOULD be given by the Location field in the response .
5.1.3.3 400
Invalid Request. A Short Description of the Error Will Appear on The Status Line Itself. A LONGER Description Will Appear in the body.5.1.3.4 500
Indicates that the server detected an internal error on the server processing this request (such as an unhandled exception). A short description of the error will appear on the status line itself. A longer description will appear in the body.
5.2 Edituri
An EditURI is used to edit a single entry. Each entry that is editable MUST have a unique URI. This URI supports both GET and PUT and they are used in tandem for an editing cycle. The client GET's the represenation which is formatted as an Atom .................... ..
Note that the value of the content element in the Atom entry does not have to exactly match the content element for the same entry when it is represented in an Atom feed. For example, a server may allow the client to post entries whose content is formatted as WikiML, yet the server may clean up such markup and transform it into well-formed XHTML before placing it in the publicly avialable Atom feed. Another scenario is summaries, the EditURI is for editing the full content of an entry, but the server may Only Present Excerpts When IT Products An atom feed.
A Client Will Send a delete to the edituri to delete an entry.
5.2.1 Locating
For Editing a Site Entry, The Link Tag IS Used. Note That A LINK TAG IS USED IN Both HTML AND IN TAG IS USED IN Both HTML AND IN TAG INTOT. A LINK TAG OF TAGLLOWING FORMAT POINTS TAG OF THE FOLLOWORMAT POINTS TAG OF THE FOLLOWORMATE. In Html The Link Tags for Editing Are ALWAYS FOUND in The Head Element, WHILIN Of the entry elements.
TYPE = "Application / X.atom XML"
href = "Uri for Editing Goes Here"
Title = "Readable Description of the entry.">
Note: The critical characteristic of this link tag is the @rel of 'service.edit' and the @Type of 'Application / x.atom XML'.
5.2.2 REQUEST
A Put Request, And A Get Response Both Contain A Filled In Atom Entry, Subject To The Constraints in Section @@ TBD @@.
5.3 Feeduri
The FeedURI is used to retrieve a represenation in Atom format. Note that this feed is different from a typical Atom feed in that it contains "link" elements for navigating and manipulating the content of the site. For example there should be a "link" element with rel = "next" whose URI points to the next block of entries on the site. Similarly the feed element can contain a "link" element with rel = "service.post", the URI of which is a PostURI. Individual entries Should Contain "LINK" Elements with rel = "service.edit" Whose uris is edituris.
@@ Editor's Note: @@ Note that the "service.feed" takes the place of the Introspection File and the Search facet in previous versions of the specification That is, facet discovery, which was previously done by inspecting the Introspection file is now. Done by looking for "Link" tags with an attribute "Rel" set to "service. [Something]" in the "service.feed" file. at the Same Time THE SAME REPRESENTATION REPLECES The Search Facet by Having "LINK" tags That point to other feeds using well knows 'rel' attribute values such as 'next' and 'prev', or the search can branch in multiple directions by specifying multiple link tags with rel = "service.feed" and having differing title attributes that announce The Kind of Search Results in That Feed.5.3.1 Locating
A Link Tag of The Following Format Points to the feeduri.
TYPE = "Application / X.atom XML"
href = "URI Goes Here"
Title = "The name of the site.">
5.3.2 REQUEST
The Request Is A Simple Get. No Other Verbs Are Currently Specified for this URI.
5.3.3 Response
THE EXPECTED Status Codes from A Get Are 200, 301, 307, And 410 Area Also Possible.
5.3.3.1 301
The feed has moveer.
5.3.3.2 307
The feeding has moveer.
5.4 LINK TAG
The link tag is buy in Both HTML and atom Formats. There Are Slight Differences Between The Two Usages. Here The CommonAlities, Differences, And A List of Well-KNown Values for the rel attribute.
The link tag in HTML documents appears in the 'head' of the document. The 'head' section only allows a linear list of 'link' tags. The Atom format allows 'link' tags as children of both the 'feed' element and Of the 'Entry' Element. Note That THS GIVES The Information Prest in The Link Tag More Context. for example ... @@ TBD @@ 5.4.1 REL
This attribute describes the relationship from the current document, be it HTML or Atom, to the anchor specified by the href attribute. The value of this attribute is a space-separated list of link types. Note that these values are case insensitive. With type = "Application / x.atom XML" We Have The Following Interpretations of The Relations.
Alternate
The Uri in The Href Attribute Points to an Alternate Reperestation of The Containing Resource.
Start
THE ATOM feed at the Uri Supplied in The Href Attribute Contains The First Feed In a linear sequence of entries.
NEXT
.............. ..
Prev
THE ATOM feed at the Uri Supplied in The Href Attribute Contains The Previous N Entries in a linear sequence of entries.
Service.edit
The Uri Given In The Href Attribute IS Used To Edit A Repesentation of The Referred Resource.
Service.post
The Uri in The Href Attribute IS Used To Create New Resources.
Service.Feed
The Uri Given In The Href Attribute IS A Starting Point for Navigating Content and Services.
5.4.2 HREF
Uri of the resource being described by this link element.
5.4.3 Title
Offers Advisory Information About The Link. Rendered to The User To Help The Hoose Among A Set of Links with the Same Rel and type attributes.5.4.4 Type
The Content Type of the Resource AvaiaLable at the Uri Given in The Href Attribute of the Link Element. Most of the Link Type 'Application / X.atom XML'.
5.5 Atom Request and Response Body Constraints
The Atom format is used as the representation of all the resources in this specification. As it is used in differing contexts, there are different constraints of which elements may be present, and how their values should be interpreted.
5.5.1 ID
Posturi
Must Not Be Present.
FEEDURI
Must be present.
Edituri
Get
Must be present.
PUT
Must be present.
5.5.2 LINK
Posturi
May Be Present. Servers May Use The Information To Determine The Uri of The Created Resource. Relative Urls Are To Be Interpreted Relative To XML: Base.
FEEDURI
Must be present.
Edituri
Get
Must be present.
PUT
Must be present.
5.5.3 Title
Posturi
MUST be present. The element may be empty, to explicitly indicate "no title". Servers SHOULD NOT try to generate a title if one is not provided. The type attribute MAY be present, and if not it defaults to "text / plain" . .. IT MUST REPRESENT A MIME TYPE That The Server Supports The Mode Attribute May Be present
FEEDURI
Must be present.
Edituri
Get
Must be present.
PUT
Must Be Present. The Element May Be Empty, To Explicitly Indicate "No Title". Servers SHOULD NOT TRY GENERATE A TITLE IF One IS Not Provided.
5.5.4 Summary
Posturi
MAY be present, if not present, indicates the server is welcome to produce its own summary. If present but empty then the server SHOULD NOT generate a summary of its own. The type attribute MAY be present, if not it defaults to "text / ". if presents..................... .י.
May be present.
Edituri
Get
May be present.
PUT
May Be Present. TO Explicitly Indicate "No Summary". Servers Should Not Try To Generate A Title if one is not provides providies.
5.5.5 Content
Posturi
MAY be present but may be empty, to explicitly indicate "no content". The type attribute MAY be present, but defaults to "text / plain" if not present. It must represent a mime type that the server supports. The MODE attribute may Be present and defaults to "xml" if not present. It must be "xml", "base64", or "escaped".
FEEDURI
May be present.
Edituri
Get
May be present.
PUT
May Be Present. The Element May Be Empty, TO Explicitly Indicate "No Content".
5.5.6 Issued
Posturi
Must Be Present But May Be Empty in Which Case It Signifies "Now" in The Timezone of the Server.
FEEDURI
Must be present.
Edituri
Get
Must be present.
PUT
Must be present. Server policy determines if an updated time is access.
5.5.7 modified
Posturi
Must Not Be Present.
FEEDURI
May be present.
Edituri
Get
May be present.
PUT
May Be Present. To Explicitly Indicate That 'Now' on The Server Time Is To BE Used.
5.5.8 CREATED
Posturi
May Be Present.Feeduri
May be present.
Edituri
Get
May be present.
PUT
May Be Present. The Server May OR MAY NOT ACCEPT AN Updated Value. If The Server Does Not Allow Updating The Issued Time Ten Any Put Request with a Diffenderct Issued Value Must Be Rejected.
5.5.9 AUTHOR
Posturi
May Be Present The Server Determines The Author. If present and it confgetmined by The Server, The Server May Change The Value Of Author.
FEEDURI
May be present.
Edituri
Get
May be present.
PUT
May be present.
5.5.10 Contributor
Posturi
May be present.
FEEDURI
May be present.
Edituri
Get
May be present.
PUT
May be present.
5.5.11 Generator
Posturi
.
FEEDURI
Must Not Be Present.
Edituri
Get
Must Not Be Present.
PUT
Must Not Be Present.
TOC
6 Security Considances
@@ TBD @@ Talk Here About Using http Basic and Digest Authentication.
@@ TBD @@ Talk Here About Denial of Service Attacks Using Large XML Files, or The Billion Laughs DTD Attack.
TOC
7 Appendices
7.1 SOAP ENABLING
All servers SHOULD support the following alternate interface mechanisms to enable a wider variety of clients to interact with AtomAPI servers. The following requirements are in addition to the ones listed in the Functional Specification Section. If a server supports SOAP Enabling then it MUST support all of The folload.
7.1.1 Servers
All servers MUST support the limited use of the SOAPAction HTTP Header as described below in the Client section. All servers MUST be able to process well formed XML. Servers need not be able to handle processing instructions or DTDs. Servers MUST accept content in a SOAP Envelope, and if The Receive A Request That Is Wrapped in A Soap Envelope THEY MUST Wrap Their Responses in Soap Envelopes Or Produce A SOAP FAULT.7.1.2 Clients
. Clients SHOULD use the appropriate HTTP Method when possible When not possible, they should use POST and include a SOAPAction HTTP header which is constrained as follows: SOAPAction: "http://schemas.xmlsoap.org/wsdl/http/[METHOD] "Where [method] is replaced by the desired http method. Clients May Wrap Their XML PAYLOAD IN A SOAP ENVELOPE. IF SO, They Must Also Wrap It in An Element Which Exactly Matches The Http Method.
7.2 Example for A Weblog
Fill this in with an example for how all the above is used for a weblog. Start with main HTML page, link tag of type service.feed to the 'introspection' file. 1. Creating a new entry 2. Finding an old entry 3 An Old Entry 4. Commenting on a Entry (VIA HTML and Atom)
7.3 EXAMPLE for A Wiki
Fill this in Like Above But for a wiki.
TOC
8 Revision History
Rev 09 - 10dec2003 - Added The Section On SOAP Enabled Clients and Servers.
Rev 08 - 01Dec2003 -. Refactored the specification, merging the Introspection file into the feed format Also dropped the distinction between the type of URI used to create new entries and the kind used to create comments Dropped user preferences..
Rev 07 - 06Aug2003 -... Removed the use of the RSD file for auto-discovery Changed copyright until a final standards body is chosen Changed query parameters for the search facet to all begin with atom- to avoid name collisions Updated all the Entries to follow the 0.2 version Changed the format of the search results and template file to a pure element based syntax.Rev 06 -. 24Jul2003 - Moved to PUT for updating Entries Changed all the mime-types to application / x.atom xml Added.. Template editing. Changed 'Edit-entry' to 'create-entry' in The Introspection File to more Accurately Reflectled it's purpose.
REV 05 - 17JUL2003 - RENAMED EVERYTHING ECHO INTO Atom. Added Version Numbers in The Revision History. Changed All The Mime-Types To Application / Atom XML.
Rev 04 - 15Jul2003 -. Updated the RSD version used from 0.7 to 1.0 Change the method of deleting an Entry from POSTing
Rev 03 - 10Jul2003 -... Added a link to the Wiki near the front of the document Added a section on finding an Entry Retrieving an Entry now broken out into it's own section Changed the HTTP status code for a successful editing of an Entry to 205.
Rev 02 - 7Jul2003 - Entries are no longer returned from POSTs, instead they are retrieved via GET Cleaned up figure titles, as they are rendered poorly in HTML All content-types have been changed to application / atom xml...
Rev 01 - 5Jul2003 - Renamed from EchoAPI.html to follow the more commonly used format:.... Draft-gregorio-NN.html Renamed all references to URL to URI Broke out introspection into it's own section Added the Revision History section Added more To The Warning That The Example Uris Are Not NormalATIVE.TOC
9 CopyRight
CopyRight (c) Joe Gregorio (2003). All Rights Reserved.
TOC
References
[RFC 2119] BRADNER, S., "Key Words for Use in RFCS to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
TOC
Author's address
Joe Gregorio Bitworking, Inc 1002 Heathwood Dairy Rd. Apex, NC 27502 USPHONE: 1 919 272 3764Email: joe@bitworking.comuri: http://bitworking.com/
About |
Contact |
Sitemap |
Terms of Service
Copyright © 2004, Atomenabled Alliance