What I meant was that URIs shouldn't be handcrafted by the client, but instead retrieved (discoverable) from the server.
And the original question was if it's ok to send a payload to a DELETE request. In that case the intermediate index URI can be skipped in favor of a URI template which is discoverable from the server (any input here Jim?). Your suggestion here is roughly the same as our first brainstorm as well, so that's good so far :) 2010/3/23, Rick Bullotta <[email protected]>: > Not sure I'm following the question, but let me take a guess: > > To find all "indexes": > > GET /index > > To find all "nodes in an index" > > GET /index/IndexName/*/* > > To find all values for a given key: > > GET /index/IndexName/key > > To find all nodes that contain any value for a given key: > > GET /index/IndexName/key/* > > To find all nodes that match a key/value pair > > GET /index/IndexName/key/value > > To add a new index > > PUT /index/NewIndexName > > To add a new entry: > > PUT /index/IndexName/key/value/<nodeURI> > > To delete an entry: > > DELETE /index/IndexName/key/value/<nodeURI> > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Mattias Persson > Sent: Tuesday, March 23, 2010 12:41 PM > To: Neo user discussions > Subject: Re: [Neo] Indexing in the REST API > > 2010/3/23 Rick Bullotta <[email protected]> > >> Ah, got it. In that case, I would just use an extended URI instead of >> passing a parameter, as in: >> >> If the index URI = /index/MyIndex >> >> ...and the node URI = /node/12134 >> >> ...the compound URI to delete could be either: >> >> /index/MyIndex/node/12134 >> >> ...or... >> >> /index/MyIndex/12134 >> > And how would those URIs be discoverable? > >> >> Rick >> >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] >> On >> Behalf Of Mattias Persson >> Sent: Tuesday, March 23, 2010 12:21 PM >> To: Neo user discussions >> Subject: Re: [Neo] Indexing in the REST API >> >> DELETE on a node URI means delete the Node. >> DELETE on an index URI means remove a particular key-value pair from the >> index for a Node. >> >> i.e. two different things >> >> 2010/3/23 Rick Bullotta <[email protected]> >> >> > Why not just process the DELETE on the index URI as a delete on the node >> > URI >> > by doing the lookup/cross-reference on the server side? I heard that >> Neo4J >> > is pretty good at tracking relationships like that. ;-) >> > >> > >> > -----Original Message----- >> > From: [email protected] [mailto:[email protected]] >> > On >> > Behalf Of Mattias Persson >> > Sent: Tuesday, March 23, 2010 12:15 PM >> > To: Neo4j user discussions >> > Subject: [Neo] Indexing in the REST API >> > >> > I'm adding indexing to the REST API now and we just come up with a first >> > solution where you POST a node URI to /index/{key}/{value}. What you get >> > back is an "index URI" which is kind of an intermediate URI so that you >> can >> > do GET on the index URI and get back a node representation, just as if >> you >> > would have done a GET /node/{id}. This intermediate index URI will also >> > serve its purpose when you'd like to remove a node from an index (DELETE >> > "index URI"). >> > >> > My question now is: can we get rid of the intermediate index URI by >> > including a payload in such DELETE requests instead (passing along a > node >> > URI)? Is it good/bad to do something like that? >> > >> > -- >> > Mattias Persson, [[email protected]] >> > Neo Technology, www.neotechnology.com >> > _______________________________________________ >> > Neo mailing list >> > [email protected] >> > https://lists.neo4j.org/mailman/listinfo/user >> > >> > _______________________________________________ >> > Neo mailing list >> > [email protected] >> > https://lists.neo4j.org/mailman/listinfo/user >> > >> >> >> >> -- >> Mattias Persson, [[email protected]] >> Neo Technology, www.neotechnology.com >> _______________________________________________ >> Neo mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user >> >> _______________________________________________ >> Neo mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user >> > > > > -- > Mattias Persson, [[email protected]] > Neo Technology, www.neotechnology.com > _______________________________________________ > Neo mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [[email protected]] Neo Technology, www.neotechnology.com _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

