Skip to content

Query Interface

There are two ways you can query brahmand database:

  • CLI: Write Cypher queries directly in the brahmand-client shell
  • http query interface: Brahmamnd server runs on port 8080.

Check the installation page to run the brahmand-client CLI.

POST /query

Executes a Cypher query against the brahmand graph database and returns the results in the specified format and mode.

  • URL: http://<host>:<port>/query
  • Method: POST
  • Headers:
    • Content-Type: application/json
FieldTypeRequiredDefaultDescriptionPossible Values
querystringYesA Cypher query string to execute.
formatstringNoJSONEachRowOutput serialization format.JSONEachRow, Pretty, PrettyCompact, CSV, CSVWithNames
modestringNoCteTraversal mode.Cte, TempTable
Terminal window
curl --request POST \
--url http://0.0.0.0:8080/query \
--header 'Content-Type: application/json' \
--data '{
"query": "MATCH (p:Post)-[:CREATED_BY]->(u:User) RETURN u.Id AS UserId, u.DisplayName, count(p) AS PostCount ORDER BY PostCount DESC LIMIT 10;",
"format": "JSONEachRow"
}'
  • 200 OK A successful JSON payload or other serialization according to format.
  • 500 Internal Server Error Unexpected server-side error during query execution.