You'll need the following information from the Console:
- The Host or hostname
- The Username
- The Password
- The BOLT Port or the HTTPS Port. If your driver supports BOLT, use that
Read the documentation for your Neo4j library/driver to see exactly how to use this information to connect.
To test the connection, you can use the curl program from a macOS or Linux (or *BSD) command prompt. The curl command should look like this (where you've replaced <USERNAME>, <PASSWORD> and <HOST> with the values from the Console:
curl -u <USERNAME>:<PASSWORD> https://<HOST>:7473/db/data/
{
"extensions" : {
"SpatialPlugin" : {
"addSimplePointLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer",
"addNodesToLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/addNodesToLayer",
"findClosestGeometries" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/findClosestGeometries",
"addGeometryWKTToLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer",
"findGeometriesWithinDistance" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/findGeometriesWithinDistance",
"addEditableLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/addEditableLayer",
"addCQLDynamicLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/addCQLDynamicLayer",
"addNodeToLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer",
"getLayer" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/getLayer",
"findGeometriesInBBox" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/findGeometriesInBBox",
"updateGeometryFromWKT" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/updateGeometryFromWKT",
"findGeometriesIntersectingBBox" : "https://HOST:7473/db/data/ext/SpatialPlugin/graphdb/findGeometriesIntersectingBBox"
}
},
"node" : "https://HOST:7473/db/data/node",
"relationship" : "https://HOST:7473/db/data/relationship",
"node_index" : "https://HOST:7473/db/data/index/node",
"relationship_index" : "https://HOST:7473/db/data/index/relationship",
"extensions_info" : "https://HOST:7473/db/data/ext",
"relationship_types" : "https://HOST:7473/db/data/relationship/types",
"batch" : "https://HOST:7473/db/data/batch",
"cypher" : "https://HOST:7473/db/data/cypher",
"indexes" : "https://HOST:7473/db/data/schema/index",
"constraints" : "https://HOST:7473/db/data/schema/constraint",
"transaction" : "https://HOST:7473/db/data/transaction",
"node_labels" : "https://HOST:7473/db/data/labels",
"neo4j_version" : "3.1.0"
}
If you make this request without the correct username and password, an error will be returned.
> curl https://HOST:7473/db/data/ 2 ↵
{
"errors" : [ {
"code" : "Neo.ClientError.Security.Unauthorized",
"message" : "No authentication header supplied."
} ]
}