Atom API POST request validation/interpretation rules -- HTML format
See AtomApiTest, ParticleWave, AtomApiTestDiscussion
Request
<html><head><meta name="atom.id" content="http://example.org/e48">:
-
SHOULD NOT be present.
-
Servers will ignore this value.
<html><head><meta name="atom.entry.uri" content="URI">:
-
MAY be present.
-
Some servers MAY use this to determine the URI of the created resource. Relative URLs are to be interpreted relative to xml:base.
<html><head><title>:
-
SHOULD be present.
-
may be empty, to explicitly indicate "no title". Servers SHOULD NOT try to generate a title is one is not provided. (Note: syndication clients MAY, but that's a different scenario)
<html><head><meta name="description" content="Citrus fruit wholesaler.">:
-
MAY be present. If not present, indicates the server is welcome to produce its own summary (perhaps by truncation).
-
Content is plain text.
-
Maps to Atom feed element <summary>
<html><body>:
-
MUST be present.
-
MAY be empty, to explicitly indicate "no content"
-
Maps to Atom feed element <content>, with appropriate type and mode as supported bu the server.
<html><head><meta name="DC.Date.Issued" content="20031103">:
-
SHOULD be present. May be empty, in which case it means "now" in the timezone of the server.
-
Maps to Atom feed element <issued>
<html><head><meta name="DC.Date.Modified" content="20031103">
-
MUST NOT be present on a POST. Set by server.
<html><head><meta name="DC.Date.Created" content="20031103">:
-
MUST NOT be present on a POST. Set by server.
<html><head><meta name="DC.Creator" content="Jane Doe">:
-
MAY be present. If not present, the server determines the author based on authentication.
-
Maps to Atom feed element <author>
<html><head><meta name="DC.Contributor" content="John Roe">:
-
MAY be present. If not present, there are no contributors
<html><head><meta name="generator" content="Name/1.0">:
-
MUST be present in conforming Atom clients. Indicates the code base used to create this request.
-
MUST contain either a valid URL or a valid email address
-
MUST contain a version number
-
Maps to Atom feed element <generator>
Response
Expected status codes from a POST are 201, 400, and 500. 401, 404, and 410 are also possible.
201 specifies the location of the resource created. Response includes a Location: header with the URI of the created resource, i.e. 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: the server may chose to omit the content in the response, particularly if it is large.
400 indicates that the server believes that that data sent constitutes an invalid request. A short description of the error will appear on the status line itself. A longer description (in plain text format) will appear in the body.
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 (in plain text format) will appear in the body.
