cancel
Showing results for 
Search instead for 
Did you mean: 

Create URL to neo4j browser including defined cypher statement

hafeja
Node Link

Hello,

I'd like to create a URL pointing to a neo4j browser including a defined cypher query.

Example:
https://<neo4j-instance>:7474/browser&query="match(e) RETURN e LIMIT 10"

How is this possible?

In case it's not possible: What else can be done to share a browsable query result without the need to install additional tools?

Any feedback appreciated!

1 ACCEPTED SOLUTION

Yes you can use ?cmd=edit&arg=MATCH (n) RETURN n

View solution in original post

5 REPLIES 5

Yes you can use ?cmd=edit&arg=MATCH (n) RETURN n

hafeja
Node Link

Hello @michael.hunger ,

interesting! I'll have closer look.

Three more questions related to the first one:

  1. Is it also possible to tweak such a URL in a way to directly execute the query (without the need to press the "Run" button)?
  2. Is it possible to generate a URL that includes executes the "Connect" to the database?
  3. Any documentation (or source code file) existing regarding this feature(s)?

Greetings.

  1. no for security reasons that's not supported
  2. there is a dbms command line parameter, that you can see here in action https://demo.neo4jlabs.com
  3. as neo4j-browser is open source you can find the PR's here: Pull requests · neo4j/neo4j-browser · GitHub
    minimal documentation is here: Browser operations - Neo4j Browser

e.g. https://demo.neo4jlabs.com:7473/browser/?dbms=neo4j://recommendations@demo.neo4jlabs.com&db=recommen...

hafeja
Node Link

Hello @michael.hunger,

If I understand correctly, I can "pre-populate" my connection settings like e.g. user but I cannot directly
establish the connection with one URL.

Can a browser session after "Connect" has been clicked be "re-used"? Each time I open a URL like proposed above, I need to press "Connect" again...

In the past we had to fork and patch browser to do things like that.

I suggest adding a feature request to

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.