Hi Jim,

Yes I know what you mean, the "{}" are part of the JAX-RS specification.

I hope that I am not too controversy :-)

The Neo4j Rest server uses HTTP and JSON thats true, but it violates IMHO
some of the REST principles. I think that a technical interface should
contain, if the content is a link, a "well formed" URI. I know that a String
like "GET /node/123/relationships/{dir}/{-list|&|types}" means that there
are optional parameter or something like this. Thats OK for a description in
a Wiki page but not in a returned JSON object.

The String "GET /node/123/relationships/out/KNOWS&LOVES" is used as a
query parameter. If it is used as a parameter for a query it should be a
URL-query parameter.

Using "POST /node/123/traverse/{returnType}" I can traverse though the
nodes, where returnType is the definition of the kind of objects I want to
have returned. In the basic REST sense POST is a Insert method where a newly
created ressource will be returned in the Location tag of a HTTP Header. For
me this POST is a GET as well, maybe with some query parameter.

If you want to distinguish the returned Types, maybe it is a good idea to
use custom mime types for node, path and relation, if you want to use the
same URI for all.

And to be clear, I like this interface very much :-)

Christopher

On Thu, Nov 18, 2010 at 9:53 AM, Jim Webber <j...@neotechnology.com> wrote:

> Hi Christopher,
>
> > http://localhost:9999/node/1/relationships/in/{-list|&|types}"
>
> This is a URI template, inviting you to replace the {...} with values of
> your own. In this case it's giving you the opportunity to provide a list of
> ampersand separated types.
>
> Now I believe this URI template syntax is out of date compared to the
> current spec, but I'll have to validate that.
>
> Perhaps it's even worth thinking about designing this out of the REST API
> as we move forwards with Neo4j server. Hmmm....
>
> Jim
>
>
>
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Christopher
twitter: @fakod
blog: http://blog.fakod.eu
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to