[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue: draft posts
> From: Robert Sayre <mint@xxxxxxxxxxxxxxx>
> Date: Tue, 22 Mar 2005 11:10:52 -0500
> To: Joe Gregorio <joe.gregorio@xxxxxxxxx>
> Cc: Dare Obasanjo <kpako@xxxxxxxxx>, Atom Protocol <atom-protocol@xxxxxxx>
> Subject: Re: issue: draft posts
>
> Me too. I was suggesting two separate collections, rather than
> sub-collections. I can think of two possible ways to move between them:
>
> MOVE /drafts/entryXYZ HTTP/1.1
> Target-Collection: /public
>
> or...
>
> POST /public HTTP/1.1
> With-Entry: /drafts/entryXYZ
>
> This has the advantage of happening above-board. ...
This is appealing in a way, but I'm worried about what might happen if we
need other flags or enumerations that require similar semantics. Imagine
there's a flag, "hasmonkeys", and that we need to be able to retrieve all
the items that have monkeys in one request. Do we MOVE
/hasnomonkeys/entryXYZ to a /hasmonkeys collection? Does it have to go into
one of /public/hasmonkeys or /drafts/hasmonkeys ? Does the client have to
know which? It seems like it would get tricky once we go beyond one such
property.
On the other hand, I do think that the set of draft entries should inherit
all the behavior of a collection (partial documents, date range queries, and
"prev" (?) and "next" links.). What's the best way for a collection request
to say "Give me the members of the collection but only the ones that have
status == draft"? This is slowly creeping into search-grammar world.... but
maybe this field is important enough to have "searchability"? Something
like:
GET /atom/collection HTTP/1.1
Where: status = draft
Is that offensive at all?
Also, it would be nice to be able to update an entry without modifying its
"status", or to set its status without modifying the rest of the entry. I
can think of a couple of ways to do this. (Brainstorming)
* Special semantics of PUT with missing elements:
- the absence of a <status> element indicates "leave status alone"
- the presence of a <status> element with no siblings indicates "set
this and leave everything else alone"?
* "Overlay" PUT
- An HTTP header indicates "just set the elements that are here, leave
others alone."
* New HTTP header "Set-status: draft" or "Set-field: status = draft"
Of these I like the special semantics option the best, but not sold yet. I
know this will get into religious REST issues, but let's talk about it.
Ezra