[[rest-api-shouldreturn404whenfailingtofindasinglepath]]
=== ShouldReturn404WhenFailingToFindASinglePath ===

.Final Graph
["dot", "Final-Graph-shouldReturn404WhenFailingToFindASinglePath.svg", "neoviz"]
----
  N42 [
    label = "{Node\[42\]|name = \'f\'\l}"
  ]
  N42 -> N43 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N43 [
    label = "{Node\[43\]|name = \'g\'\l}"
  ]
  N44 [
    label = "{Node\[44\]|name = \'d\'\l}"
  ]
  N44 -> N45 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N44 -> N43 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N45 [
    label = "{Node\[45\]|name = \'e\'\l}"
  ]
  N45 -> N43 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N46 [
    label = "{Node\[46\]|name = \'b\'\l}"
  ]
  N46 -> N42 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N47 [
    label = "{Node\[47\]|name = \'c\'\l}"
  ]
  N47 -> N46 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N47 -> N42 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N47 -> N43 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N48 [
    label = "{Node\[48\]|name = \'a\'\l}"
  ]
  N48 -> N47 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
  N48 -> N44 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "to\n"
  ]
----

_Example request_

* *+POST+*  +http://localhost:7474/db/data/node/48/path+
* *+Accept:+* +application/json+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{"to":"http://localhost:7474/db/data/node/43", "max_depth":1, "relationships":{"type":"dummy", "direction":"in"}, "algorithm":"shortestPath"}
----


_Example response_

* *+404:+* +Not Found+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{
  "exception" : "NotFoundException",
  "stacktrace" : [ "org.neo4j.server.rest.web.DatabaseActions.findSinglePath(DatabaseActions.java:1332)", "org.neo4j.server.rest.web.RestfulGraphDatabase.singlePath(RestfulGraphDatabase.java:1339)", "java.lang.reflect.Method.invoke(Method.java:597)", "org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)" ]
}
----


