[[rest-api-return-paths]]
=== Return paths ===

Paths can be returned
together with other return types by just
specifying returns.


[source,cypher]
----
START x  = node(%I%)
MATCH path = (x--friend)
RETURN path, friend.name
----


.Final Graph
["dot", "Final-Graph-return-paths.svg", "neoviz"]
----
  N213 [
    label = "{Node\[213\]|name = \'you\'\l}"
  ]
  N214 [
    label = "{Node\[214\]|name = \'I\'\l}"
  ]
  N214 -> N213 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "know\n"
  ]
----

_Example request_

* *+POST+*  +http://localhost:7474/db/data/cypher+
* *+Accept:+* +application/json+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{"query": "start x  = node(214) match path = (x--friend) return path, friend.name","params": {}},
----


_Example response_

* *+200:+* +OK+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{
  "data" : [ [ {
    "start" : "http://localhost:7474/db/data/node/214",
    "nodes" : [ "http://localhost:7474/db/data/node/214", "http://localhost:7474/db/data/node/213" ],
    "length" : 1,
    "relationships" : [ "http://localhost:7474/db/data/relationship/92" ],
    "end" : "http://localhost:7474/db/data/node/213"
  }, "you" ] ],
  "columns" : [ "path", "friend.name" ]
}
----


