Skip to search.
rest-discuss · REST Discussion Mailing List

Group Information

  • Members: 1401
  • Category: Protocols
  • Founded: Nov 13, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

  Messages Help
Advanced
RESTifying   Message List  
Reply Message #1 of 18829 < Prev |
I'm trying to RESTify an existing Web application, and have a
stylistic question.

Imagine that a Web application fronts for a database, where all of the
records are available as resources.

For example, you could search the database at
http://www.example.org/search
and the results would point at records, like
http://www.example.org/records/theThing

One can add to the database by doing a get (for the form) and then a
POST to
http://www.example.org/add

Now, how should editing and deletion be done? One approach is to
expose an edit resource, similar to the add one;
http://www.example.org/edit
To edit a specific resource, one could use a query string;
http://www.example.org/edit?resource=theThing
and use GET and POST to get the form and POST the edit.

Another approach would be to use the resource's native URI, like
http://www.example.org/records/theThing?mode=edit
in a similar manner. This seems to be the approach taken by most
WIKIs, interestingly.

Is either approach preferable/horrible, or are they pretty much the
same? The specific application is a gateway to an LDAP database. I
haven't read Roy's full dissertation (still!), so apologies if I've
asked a FAQ.

Deletion is another interesting case; if each LDAP entry really is a
resource, DELETE would be most appropriate, no? Unfortunately, methods
other than GET and POST aren't available from HTML...

Cheers,

P.S.; Do queries identify a new resource? Their defined as a mechanism
to pass data to the server. Common use (as outlined above) seems to
indicate that people don't consider them separate, but in the URI
world, they're not lumped into URI-References with fragments...




Mon Jan 7, 2002 9:44 am

mnotting
Offline Offline
Send Email Send Email

Message #1 of 18829 < Prev |
Expand Messages Author Sort by Date

I'm trying to RESTify an existing Web application, and have a stylistic question. Imagine that a Web application fronts for a database, where all of the ...
mnotting Offline Send Email Jan 7, 2002
9:44 am

... I have a thought about that that I'll bring up in another thread shortly. ... Why not POST to http://www.example.org/search? The good thing about doing...
Mark Baker
distobj@... Send Email
Jan 7, 2002
3:02 pm

... hmm. Individual searches are separate resources; i.e., they have different query strings, so this wouldn't necessarily work, no? (It wouldn't make sense to...
Mark Nottingham
mnotting Offline Send Email
Jan 7, 2002
6:30 pm

... Why not? Don't think of the resource as being a search, but think of it as the result of a search. "http://www.google.com/search?q=foo" is the set of all...
Mark Baker
distobj@... Send Email
Jan 7, 2002
6:45 pm

... Well, there's no problem POSTing an update to /search (or whatever), but doing a query through POST doesn't seem very RESTy at all. So, to review (and make...
Mark Nottingham
mnotting Offline Send Email
Jan 7, 2002
11:07 pm

... Right. I guess I wasn't clear, my apologies. ... Hmm, if you're creating a new resource it should be returned with a 201. You won't get an auto redirect,...
Mark Baker
distobj@... Send Email
Jan 8, 2002
1:42 am

... Hmm. Seems good; will have to play. ... [...] ... What's the media type for an HTML form which is the editable representation of a resource again? ;) Also,...
Mark Nottingham
mnotting Offline Send Email
Jan 8, 2002
2:16 am

... I was hoping to allow requests to the record resource http://www.example.com/addresses/thePerson to negotiate the representation returned, so that the...
Mark Nottingham
mnotting Offline Send Email
Jan 8, 2002
9:20 am

... Oops, that should be [1] http://bugzilla.mozilla.org/show_bug.cgi?id=118696 -- Mark Nottingham http://www.mnot.net/...
Mark Nottingham
mnotting Offline Send Email
Jan 8, 2002
10:00 am

... I've used the ?method= approach for a couple years (actually used do:method for collision avoidance) to tunnel methods. I've also used ? accept= to tunnel...
mdierken Offline Send Email Jan 16, 2002
8:01 am

So, I'm inclined to make the jpg a subresource (along with other attributes), but this leaves me with a bit of a headache; how do I identify an HTML-editable...
Mark Nottingham
mnotting Offline Send Email
Jan 17, 2002
7:46 am

... Not sure if I understand method=PUT and accept together. PUT would have a content-type though. Identifying the editable representation is a bother. Once I...
mdierken Offline Send Email Jan 17, 2002
8:09 am

... Another reason to use 'view' is when accessing a heirchical collection of information or a database-like thing it can be fun to talk about 'slices' or...
mdierken Offline Send Email Jan 17, 2002
8:12 am

... Even if you tunnel Accept header in the URL (which means you need to control the server or have a generic intermediary that un-tunnels them) you'll want to...
mdierken Offline Send Email Jan 16, 2002
8:11 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help