[[rest-api-nodes-are-represented-as-nodes]]
=== Nodes are represented as nodes ===



[source,cypher]
----
START n = node(%I%)
MATCH n-[r]->()
RETURN n, r
----


.Final Graph
["dot", "Final-Graph-nodes-are-represented-as-nodes.svg", "neoviz"]
----
  N33 [
    label = "{Node\[33\]|}"
  ]
  N34 [
    label = "{Node\[34\]|name = \'him\'\l}"
  ]
  N35 [
    label = "{Node\[35\]|prop = \'Hello\'\l}"
  ]
  N35 -> N34 [
    color = "#2e3436"
    fontcolor = "#2e3436"
    label = "know\nprop = \'World\'\l"
  ]
----

_Example request_

* *+POST+*  +http://localhost:7474/db/data/cypher+
* *+Accept:+* +application/json+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{"query": "start n = node(35) match n-[r]->() return n, r","params": {}},
----


_Example response_

* *+200:+* +OK+
* *+Content-Type:+* +application/json+
[source,javascript]
----
{
  "columns" : [ "n", "r" ],
  "data" : [ [ {
    "outgoing_relationships" : "http://localhost:7474/db/data/node/35/relationships/out",
    "data" : {
      "prop" : "Hello"
    },
    "traverse" : "http://localhost:7474/db/data/node/35/traverse/{returnType}",
    "all_typed_relationships" : "http://localhost:7474/db/data/node/35/relationships/all/{-list|&|types}",
    "property" : "http://localhost:7474/db/data/node/35/properties/{key}",
    "self" : "http://localhost:7474/db/data/node/35",
    "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/35/relationships/out/{-list|&|types}",
    "properties" : "http://localhost:7474/db/data/node/35/properties",
    "incoming_relationships" : "http://localhost:7474/db/data/node/35/relationships/in",
    "extensions" : {
    },
    "create_relationship" : "http://localhost:7474/db/data/node/35/relationships",
    "paged_traverse" : "http://localhost:7474/db/data/node/35/paged/traverse/{returnType}{?pageSize,leaseTime}",
    "all_relationships" : "http://localhost:7474/db/data/node/35/relationships/all",
    "incoming_typed_relationships" : "http://localhost:7474/db/data/node/35/relationships/in/{-list|&|types}"
  }, {
    "start" : "http://localhost:7474/db/data/node/35",
    "data" : {
      "prop" : "World"
    },
    "self" : "http://localhost:7474/db/data/relationship/12",
    "property" : "http://localhost:7474/db/data/relationship/12/properties/{key}",
    "properties" : "http://localhost:7474/db/data/relationship/12/properties",
    "type" : "know",
    "extensions" : {
    },
    "end" : "http://localhost:7474/db/data/node/34"
  } ] ]
}
----


