### Install and Start Live Preview Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Use these commands to install dependencies and start a live preview of the Aura documentation. ```bash npm install npm start ``` -------------------------------- ### Example Metric Output Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/metrics/metrics-integration/introduction.adoc This example shows the format of a metric output, including HELP and TYPE lines, followed by the metric value with its associated labels. ```shell # HELP neo4j_database_count_node The total number of nodes in the database. ``` -------------------------------- ### Install Python Requirements Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Installs the necessary Python packages from the requirements file within an activated virtual environment. ```bash pip install -r scripts/requirements.txt ``` -------------------------------- ### Start Prometheus Server Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/metrics/metrics-integration/examples.adoc Start the Prometheus server using the updated configuration file. This command assumes the Prometheus executable is in your PATH. ```shell ./prometheus --config.file=prometheus.yml ``` -------------------------------- ### Install graphdatascience and Initialize Client Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Arrow_examples.ipynb Installs the graphdatascience library and initializes the client, enabling Arrow by default for AuraDS connections. Ensure to replace placeholder credentials with your actual Aura connection details. ```python %pip install 'graphdatascience>=1.7' from graphdatascience import GraphDataScience # Replace with the actual connection URI and credentials AURA_CONNECTION_URI = "neo4j+s://xxxxxxxx.databases.neo4j.io" AURA_USERNAME = "neo4j" AURA_PASSWORD = "" # When initialized, the client tries to use Arrow if it is available on the server. # This behaviour is controlled by the `arrow` parameter, which is set to `True` by default. gds = GraphDataScience(AURA_CONNECTION_URI, auth=(AURA_USERNAME, AURA_PASSWORD), aura_ds=True) # Necessary if Arrow is enabled (as is by default on Aura) gds.set_database("neo4j") ``` -------------------------------- ### Install GDS Python Client Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Connecting_with_Python_(GDS_client).ipynb Install the Neo4j Graph Data Science client for Python. This is a prerequisite for using the client library. ```bash pip install --upgrade gds ``` -------------------------------- ### Verify Aura CLI Installation Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/installation.adoc Run this command to confirm that the Aura CLI has been installed correctly and display its version. ```shell aura-cli -v ``` -------------------------------- ### Install Graph Data Science Client Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Monitoring_the_progress_of_a_running_algorithm_(GDS_client).ipynb Install the GDS client library using pip. This is the first step to interact with AuraDS. ```python %pip install graphdatascience ``` -------------------------------- ### Install pandas Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Arrow_examples.ipynb Installs the pandas library, which is often used for data manipulation before constructing graphs. ```python %pip install pandas import pandas as pd ``` -------------------------------- ### Get Help for Instance Management Script Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Displays help information for the `manage_instances.py` script, detailing available options and usage. ```bash python scripts/manage_instances.py --help ``` -------------------------------- ### Example Metric Data Points Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/metrics/metrics-integration/introduction.adoc These are example metric data points that include labels for aggregation, instance ID, availability zone, and instance mode. ```text neo4j_aura_cpu_usage{aggregation="MAX",instance_id="a59d71ae",availability_zone="eu-west-1a",instance_mode="PRIMARY"} 0.025457 1724245310000 neo4j_aura_cpu_usage{aggregation="MAX",instance_id="a59d71ae",availability_zone="eu-west-1b",instance_mode="PRIMARY"} 0.047088 1724245310000 neo4j_aura_cpu_usage{aggregation="MAX",instance_id="a59d71ae",availability_zone="eu-west-1c",instance_mode="PRIMARY"} 0.021874 1724245310000 ``` -------------------------------- ### Install Aura CLI on Windows Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/installation.adoc Move the downloaded aura-cli executable to the system's system32 directory for global access. ```shell move aura-cli c:\\windows\\system32 ``` -------------------------------- ### Prepare Example Data with Cypher Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/bi.adoc Load sample data into your Aura instance using this Cypher query. This data will be used for subsequent BI tool connections. ```cypher CREATE (john:Person {name: "John", surname: "Doe", age: 42}), (jane:Person {name: "Jane", surname: "Doe", age: 40}), (john)-[:KNOWS]->(jane) ``` -------------------------------- ### Launch Spark Shell with Neo4j Connector Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/spark.adoc Start the Spark shell and include the Neo4j Connector JAR file. Ensure the connector version matches your Spark and Scala versions. ```shell $ spark-3.4.1-bin-hadoop3/bin/spark-shell --jars neo4j-connector-apache-spark_2.12-5.1.0_for_spark_3.jar ``` -------------------------------- ### Get Deployment Details Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Fetch detailed information about a specific deployment using its ID. ```bash aura-cli deployment get $DEPLOYMENT_ID --organization-id $YOUR_ORG_ID --project-id $YOUR_PROJECT_ID ``` -------------------------------- ### Get Help for Replace Partials Script Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Displays help information for the `replace_partials.py` script, including details on the `--outdir` option. ```bash scripts/replace_partials.py --help ``` -------------------------------- ### Install GDS Python Client Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/aurads/setup.adoc Install the Graph Data Science client for Python. This is a prerequisite for using the GDS client to connect to AuraDS. ```shell pip install graphdatascience ``` -------------------------------- ### Run PageRank Algorithm Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Connecting_with_Python_(GDS_client).ipynb Execute the PageRank algorithm on the loaded graph. This is an example of running a common graph algorithm. ```python from gds.algorithms import PageRank page_rank_results = PageRank(client, graph_name).run() print(page_rank_results.to_json(indent=2, default_handler=default)) ``` -------------------------------- ### Create Example Graph Data Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Persisting_and_sharing_machine_learning_models_(GDS_client).ipynb Uses a Cypher query to create sample nodes and relationships for demonstrating graph algorithms. This data is essential for training and testing models. ```python gds.run_cypher(""" MERGE ( dan:Person:ExampleData {name: 'Dan', age: 20, heightAndWeight: [185, 75]}) MERGE ( annie:Person:ExampleData {name: 'Annie', age: 12, heightAndWeight: [124, 42]}) MERGE ( matt:Person:ExampleData {name: 'Matt', age: 67, heightAndWeight: [170, 80]}) MERGE ( jeff:Person:ExampleData {name: 'Jeff', age: 45, heightAndWeight: [192, 85]}) MERGE ( brie:Person:ExampleData {name: 'Brie', age: 27, heightAndWeight: [176, 57]}) MERGE ( elsa:Person:ExampleData {name: 'Elsa', age: 32, heightAndWeight: [158, 55]}) MERGE ( john:Person:ExampleData {name: 'John', age: 35, heightAndWeight: [172, 76]}) MERGE (dan)-[:KNOWS {relWeight: 1.0}]->(annie) MERGE (dan)-[:KNOWS {relWeight: 1.6}]->(matt) MERGE (annie)-[:KNOWS {relWeight: 0.1}]->(matt) MERGE (annie)-[:KNOWS {relWeight: 3.0}]->(jeff) MERGE (annie)-[:KNOWS {relWeight: 1.2}]->(brie) MERGE (matt)-[:KNOWS {relWeight: 10.0}]->(brie) MERGE (brie)-[:KNOWS {relWeight: 1.0}]->(elsa) MERGE (brie)-[:KNOWS {relWeight: 2.2}]->(jeff) MERGE (john)-[:KNOWS {relWeight: 5.0}]->(jeff) RETURN True AS exampleDataCreated "); ``` -------------------------------- ### Create Graph Schema with Cypher Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Executing_the_different_algorithm_modes_(GDS_client).ipynb Use `run_cypher` to create nodes and relationships for the graph. This example sets up a basic web page link structure. ```python gds.run_cypher(""" CREATE (home:Page {name:'Home'}), (about:Page {name:'About'}), (product:Page {name:'Product'}), (links:Page {name:'Links'}), (a:Page {name:'Site A'}) (b:Page {name:'Site B'}) (c:Page {name:'Site C'}) (d:Page {name:'Site D'}), (home)-[:LINKS {weight: 0.2}]->(about), (home)-[:LINKS {weight: 0.2}]->(links), (home)-[:LINKS {weight: 0.6}]->(product), (about)-[:LINKS {weight: 1.0}]->(home), (product)-[:LINKS {weight: 1.0}]->(home), (a)-[:LINKS {weight: 1.0}]->(home), (b)-[:LINKS {weight: 1.0}]->(home), (c)-[:LINKS {weight: 1.0}]->(home), (d)-[:LINKS {weight: 1.0}]->(home), (links)-[:LINKS {weight: 0.8}]->(home), (links)-[:LINKS {weight: 0.05}]->(a), (links)-[:LINKS {weight: 0.05}]->(b), (links)-[:LINKS {weight: 0.05}]->(c), (links)-[:LINKS {weight: 0.05}]->(d) ") ``` -------------------------------- ### Install Aura CLI on Mac Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/installation.adoc Move the downloaded aura-cli executable to the system's bin directory for global access. Requires administrator privileges. ```shell sudo mv aura-cli /usr/local/bin ``` -------------------------------- ### Generate Example Graph Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Estimating_memory_usage_and_resizing_an_instance_(GDS_client).ipynb Generates a synthetic graph for testing purposes. This is useful for demonstrating algorithm execution and memory estimation. ```python # Run the graph generation algorithm and retrieve the corresponding graph object g, result = gds.beta.graph.generate( "example-graph", 50000000, 3, relationshipDistribution="POWER_LAW" ) # Print prettified graph stats print(result) ``` -------------------------------- ### Load OGBN Dataset Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Arrow_examples.ipynb Installs the necessary extras for OGB datasets and loads the 'ogbn-arxiv' dataset. The dataset is immediately dropped to ensure it's cached for subsequent use. ```python %pip install 'graphdatascience[ogb]>=1.7' # Load and immediately drop the dataset to download and cache the data ogbn_arxiv = gds.graph.ogbn.load("ogbn-arxiv") ogbn_arxiv.drop() ``` -------------------------------- ### Run Community Detection Algorithm Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Connecting_with_Python_(GDS_client).ipynb Execute the Louvain community detection algorithm on the loaded graph. This is another example of a graph algorithm. ```python from gds.algorithms import Louvain community_results = Louvain(client, graph_name).run() print(community_results.to_json(indent=2, default_handler=default)) ``` -------------------------------- ### Create Sample Graph for Map Visualization Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/dashboards/visualizations/map.adoc This Cypher script sets up constraints and creates nodes and relationships for a Nordic geography example. It demonstrates creating nodes with different spatial property types: dual 'Point' properties for cities, 'latitude'/'longitude' for airports, and shorthand 'lat'/'long' for places. It also creates relationships between these entities and flight paths between airports. ```cypher // 1. Setup Constraints CREATE CONSTRAINT city_name IF NOT EXISTS FOR (c:City) REQUIRE c.name IS UNIQUE; CREATE CONSTRAINT airport_name IF NOT EXISTS FOR (a:Airport) REQUIRE a.name IS UNIQUE; CREATE CONSTRAINT place_name IF NOT EXISTS FOR (p:Place) REQUIRE p.name IS UNIQUE; // 2. Create Cities (With dual native Point properties) CREATE (sto:City { name: "Stockholm", location: point({latitude: 59.3293, longitude: 18.0686}), location2: point({latitude: 59.3400, longitude: 18.0800}) }) CREATE (got:City { name: "Göteborg", location: point({latitude: 57.7089, longitude: 11.9746}), location2: point({latitude: 57.7150, longitude: 11.9900}) }) CREATE (mal:City { name: "Malmö", location: point({latitude: 55.6059, longitude: 13.0008}), location2: point({latitude: 55.5900, longitude: 13.0100}) }) CREATE (upp:City { name: "Uppsala", location: point({latitude: 59.8586, longitude: 17.6389}), location2: point({latitude: 59.8650, longitude: 17.6500}) }); // 3. Create Airports (Using 'latitude' and 'longitude') CREATE (arn:Airport {name: "Arlanda Airport", iata: "ARN", latitude: 59.6498, longitude: 17.9237}) CREATE (land:Airport {name: "Landvetter Airport", iata: "GOT", latitude: 57.6628, longitude: 12.2798}) CREATE (mmx:Airport {name: "Malmö Airport", iata: "MMX", latitude: 55.5395, longitude: 13.3649}); // 4. Create Places (Using shorthand 'lat' and 'long') CREATE (sh:Place {name: "Stadshuset", kind: "Landmark", lat: 59.3275, long: 18.0543}) CREATE (tt:Place {name: "Turning Torso", kind: "Building", lat: 55.6132, long: 12.9767}) CREATE (sk:Place {name: "Slottsskogen", kind: "Park", lat: 57.6826, long: 11.9405}); // 5. Create Relationships (Place/Airport -> City) MATCH (a:Airport {name: "Arlanda Airport"}), (c:City {name: "Stockholm"}) MERGE (a)-[:SERVES_CITY]->(c); MATCH (a:Airport {name: "Landvetter Airport"}), (c:City {name: "Göteborg"}) MERGE (a)-[:SERVES_CITY]->(c); MATCH (a:Airport {name: "Malmö Airport"}), (c:City {name: "Malmö"}) MERGE (a)-[:SERVES_CITY]->(c); MATCH (p:Place {name: "Stadshuset"}), (c:City {name: "Stockholm"}) MERGE (p)-[:SERVES_CITY]->(c); MATCH (p:Place {name: "Slottsskogen"}), (c:City {name: "Göteborg"}) MERGE (p)-[:SERVES_CITY]->(c); MATCH (p:Place {name: "Turning Torso"}), (c:City {name: "Malmö"}) MERGE (p)-[:SERVES_CITY]->(c); // 6. Add Flight Paths between Airports MATCH (arn:Airport {iata: "ARN"}), (land:Airport {iata: "GOT"}) MERGE (arn)-[:FLIGHT_PATH {distance_km: 395}]->(land); MATCH (arn:Airport {iata: "ARN"}), (mmx:Airport {iata: "MMX"}) MERGE (arn)-[:FLIGHT_PATH {distance_km: 530}]->(mmx); MATCH (land:Airport {iata: "GOT"}), (mmx:Airport {iata: "MMX"}) ``` -------------------------------- ### Power BI ODBC Connection String Example Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/bi.adoc Configure your Power BI connection to Neo4j Aura using this ODBC connection string. Specify the host and enable SSL. ```text Host=xxxxxxxx.databases.neo4j.io;SSL=1 ``` -------------------------------- ### PromQL Query for Aura CPU Usage Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/metrics/metrics-integration/examples.adoc Example PromQL query to visualize Aura instance CPU usage by availability zone for capacity planning. This query calculates the ratio of current CPU usage to the CPU limit. ```promql max by(availability_zone) (neo4j_aura_cpu_usage{instance_mode="PRIMARY"}) / sum by(availability_zone) (neo4j_aura_cpu_limit{instance_mode="PRIMARY"}) ``` -------------------------------- ### Get AuraDB instances for a tenant Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-tenants.adoc Retrieve all available AuraDB instance configurations for a specific tenant. Replace `TENANT-ID` with the actual tenant identifier. Consider filtering the output for large result sets. ```shell aura-cli tenant get TENANT-ID ``` -------------------------------- ### Get Help for Code Extraction Script Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Displays help information for the `extract_code.py` script, including options for specifying code type. ```bash python scripts/extract_code.py --help ``` -------------------------------- ### Retrieve Activity Feed (With Filters) Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/logging/activity-feed.adoc Fetch activity feed entries within a specific date range and with a defined page limit. This example filters for entries between January 1st and January 15th, 2026, with a limit of 10 entries per page. Replace placeholders with your actual organization ID and API token. ```shell curl https://api.neo4j.io/v2beta1/organizations/$YOUR_ORG_ID/activity-feed?start=2026-01-01T00:00:00Z&end=2026-01-15T23:59:59Z&page_limit=10 \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer $YOUR_AURA_API_TOKEN" ``` -------------------------------- ### Get Activity Feed (With Filters) Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/logging/activity-feed.adoc Retrieves a filtered activity feed based on start time, end time, and page limit. ```APIDOC ## GET /v2beta1/organizations/$YOUR_ORG_ID/activity-feed?start={start_time}&end={end_time}&page_limit={limit} ### Description Retrieves a filtered activity feed for the organization. ### Method GET ### Endpoint /v2beta1/organizations/$YOUR_ORG_ID/activity-feed ### Query Parameters - **start** (string) - Optional - The start time for filtering logs (ISO 8601 format). Defaults to 30 days prior to the current date. - **end** (string) - Optional - The end time for filtering logs (ISO 8601 format). - **page_limit** (integer) - Optional - The maximum number of items to return per page. ### Request Example ```shell curl https://api.neo4j.io/v2beta1/organizations/$YOUR_ORG_ID/activity-feed?start=2026-01-01T00:00:00Z&end=2026-01-15T23:59:59Z&page_limit=10 \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer $YOUR_AURA_API_TOKEN" ``` ### Response #### Success Response (200) - **logs** (array) - Contains the filtered activity feed information. - **links** (object) - Contains pagination URLs. #### Response Example ```json { "logs": [ { "timestamp": "2026-01-10T12:30:00Z", "action_id": "0002", "user_id": "user-456", "details": "Instance 'staging-instance' paused." } ], "links": { "next": "https://api.neo4j.io/v2beta1/organizations/$YOUR_ORG_ID/activity-feed?start=2026-01-01T00:00:00Z&end=2026-01-15T23:59:59Z&page_limit=10&page_token=next_page_token" } } ``` ``` -------------------------------- ### Create a Free Tier AuraDB Instance Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Use this command to create a free tier AuraDB instance. The `--await` flag ensures the command waits for the instance to be ready. ```shell aura-cli instance create --name YOUR_INSTANCE_NAME --type free-db --await ``` -------------------------------- ### List Aura Instances via CLI Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/initial-configuration.adoc Verify that your Aura CLI configuration is working correctly by listing all your Aura instances. This command requires valid credentials to be set up. ```shell aura-cli instance list --output table ``` -------------------------------- ### Install Neo4j Python Driver Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/aurads/setup.adoc Install the official Neo4j Python driver. This driver is used for general interaction with Neo4j databases, including AuraDS. ```shell pip install neo4j ``` -------------------------------- ### Create an Aura Instance Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Creates a Neo4j Aura instance with a specified name. Use `--instance-type` to select the type and `--tenant` for different projects. ```bash python scripts/manage_instances.py --create INSTANCE_NAME ``` -------------------------------- ### Create a New Deployment Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Register a new Neo4j database with Fleet Manager by creating a deployment. Requires organization and project IDs, and optionally a connection URL. ```bash aura-cli deployment create --name $DEPLOYMENT_NAME --connection_url $OPTIONAL_CONNECTION_URL --organization-id $YOUR_ORG_ID --project-id $YOUR_PROJECT_ID ``` -------------------------------- ### Example of a Neo4j routing table error Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/troubleshooting.adoc This is an example of the error message encountered when the Neo4j JavaScript driver cannot discover routing servers, often due to connectivity issues or a missing default database. ```shell Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1644933316983, routers=[], readers=[], writers=[]] ``` -------------------------------- ### Create Python Virtual Environment Source: https://github.com/neo4j/docs-aura/blob/console/README.adoc Sets up a Python virtual environment for managing project dependencies. Activate it using `source venv/bin/activate` (Linux/macOS) or `venv\Scripts\activate` (Windows). ```bash python -m venv venv ``` -------------------------------- ### Aura API Authentication Response Body Example Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/api/authentication.adoc This is an example of the JSON response body received when successfully authenticating with the Aura API. It includes the access token, its validity period in seconds, and the token type. ```json { "access_token": "", "expires_in": 3600, "token_type": "bearer" } ``` -------------------------------- ### apoc.version Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns the currently installed APOC version. ```APIDOC ## apoc.version ### Description Returns the APOC version currently installed. ### Type label:procedure[] ``` -------------------------------- ### apoc.rel.startNode Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns the start NODE for the given virtual RELATIONSHIP. ```APIDOC ## apoc.rel.startNode ### Description Returns the start NODE for the given virtual RELATIONSHIP. ### Type function ``` -------------------------------- ### List Databases for a Deployment Server Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Retrieve a list of databases hosted on a specific server within a deployment. ```bash aura-cli deployment server database list --deployment-id $DEPLOYMENT_ID --server-id $SERVER_ID --organization-id $YOUR_ORG_ID --project-id $YOUR_PROJECT_ID ``` -------------------------------- ### apoc.refactor.from Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Redirects the given RELATIONSHIP to the given start NODE. ```APIDOC ## CALL apoc.refactor.from(relationship, startNode) ### Description Redirects the given `RELATIONSHIP` to the given start `NODE`. ### Method CALL ### Parameters #### Path Parameters - **relationship** (RELATIONSHIP) - Required - The relationship to redirect. - **startNode** (NODE) - Required - The new start node for the relationship. ``` -------------------------------- ### List Databases for a Deployment Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Retrieve a list of all databases associated with a specific deployment. ```bash aura-cli deployment database list --deployment-id $DEPLOYMENT_ID --organization-id $YOUR_ORG_ID --project-id $YOUR_PROJECT_ID ``` -------------------------------- ### apoc.path.create Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns a PATH from the given start NODE and LIST. ```APIDOC ## apoc.path.create ### Description Returns a `PATH` from the given start `NODE` and `LIST`. ### Type function ``` -------------------------------- ### apoc.path.subgraphAll Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns the sub-graph reachable from the start NODE following the given RELATIONSHIP types to max-depth. ```APIDOC ## apoc.path.subgraphAll ### Description Returns the sub-graph reachable from the start `NODE` following the given `RELATIONSHIP` types to max-depth. ### Type procedure ``` -------------------------------- ### apoc.path.expandConfig Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns PATH values expanded from the start NODE with the given RELATIONSHIP types from min-depth to max-depth. ```APIDOC ## apoc.path.expandConfig ### Description Returns `PATH` values expanded from the start `NODE` with the given `RELATIONSHIP` types from min-depth to max-depth. ### Type procedure ``` -------------------------------- ### Project Graph Using Shorthand Syntax Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Projecting_graphs_and_using_the_Graph_Catalog_(GDS_client).ipynb Projects a graph from Neo4j data using the simplified shorthand syntax for the `gds.graph.project` method. This is useful for straightforward projections. ```python # Project a graph using the shorthand syntax shorthand_graph, result = gds.graph.project( "shorthand-example-graph", ["EngineeringManagement", "Developer"], ["MANAGES"] ) print(result) ``` -------------------------------- ### Get Project ID Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/create-auradb-instance-from-terminal.adoc Use cURL with your bearer token to retrieve your project ID from the tenants endpoint. ```cURL curl --location 'https://api.neo4j.io/v1/tenants' --header 'Accept: application/json' --header 'Authorization: Bearer YOUR_BEARER_TOKEN' ``` -------------------------------- ### Get Aura CLI Configuration Setting Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/configuration.adoc Retrieve the value of a specific configuration setting for the Aura CLI. ```shell aura-cli config set SETTING_NAME ``` -------------------------------- ### apoc.path.subgraphNodes Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns the NODE values in the sub-graph reachable from the start NODE following the given RELATIONSHIP types to max-depth. ```APIDOC ## apoc.path.subgraphNodes ### Description Returns the `NODE` values in the sub-graph reachable from the start `NODE` following the given `RELATIONSHIP` types to max-depth. ### Type procedure ``` -------------------------------- ### List All Deployments Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Retrieve a list of all registered deployments within your organization and project. ```bash aura-cli deployment list --organization-id $YOUR_ORG_ID --project-id $YOUR_PROJECT_ID ``` -------------------------------- ### apoc.path.expand Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns PATH values expanded from the start NODE following the given RELATIONSHIP types from min-depth to max-depth. ```APIDOC ## apoc.path.expand ### Description Returns `PATH` values expanded from the start `NODE` following the given `RELATIONSHIP` types from min-depth to max-depth. ### Type function ``` -------------------------------- ### Delete an AuraDB Instance Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Delete an AuraDB instance. This operation starts immediately and does not require confirmation, so use with caution. ```shell aura-cli instance delete YOUR_INSTANCE_ID ``` -------------------------------- ### List AuraDB Instances Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Use this command to list available AuraDB instances. This is often a prerequisite for other instance operations. ```shell aura-cli instance list --output table ``` -------------------------------- ### Create an AuraDB Instance for Other Tiers Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Create an AuraDB instance for tiers other than free. You must provide details like cloud provider, region, memory, instance type, and tenant ID. The `--tenant-id` can be omitted if a default tenant is set. ```shell aura-cli instance create --name YOUR_INSTANCE_NAME --cloud-provider YOUR_CLOUD_PROVIDER --region CLOUD_REGION --memory MEMORY --type AURA_INSTANCE_TYPE --tenant-id YOUR_TENANT_ID ``` -------------------------------- ### Get Details for a Specific Snapshot Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Obtain detailed information about a single snapshot using its ID and the instance ID. ```shell aura-cli instance snapshot SNAPSHOT_ID --instance-id YOUR_INSTANCE_ID ``` -------------------------------- ### Okta SSO Configuration Steps Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/security/single-sign-on.adoc Follow these steps in the Okta admin portal to create an app integration for OIDC and obtain the necessary details for Okta SSO integration with Aura. ```text In the *Okta admin portal* go to *Applications* and then *Create App Integration*. For *Sign-in method* select *OIDC - OpenID Connect*. For *Application type* select *Web Application*. Select *Next*. For *Grant type* select *Authorization Code*. For *Sign-in redirect URIs* add https://login.neo4j.com/login/callback as the redirect URI. Save. ``` -------------------------------- ### apoc.path.spanningTree Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/partials/apoc-procedures.adoc Returns spanning tree PATH values expanded from the start NODE following the given RELATIONSHIP types to max-depth. ```APIDOC ## apoc.path.spanningTree ### Description Returns spanning tree `PATH` values expanded from the start `NODE` following the given `RELATIONSHIP` types to max-depth. ### Type function ``` -------------------------------- ### Get Activity Feed (No Filters) Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/logging/activity-feed.adoc Retrieves the entire activity feed for the organization. The response includes logs and pagination links. ```APIDOC ## GET /v2beta1/organizations/$YOUR_ORG_ID/activity-feed ### Description Retrieves the organization's activity feed without any filters. ### Method GET ### Endpoint /v2beta1/organizations/$YOUR_ORG_ID/activity-feed ### Query Parameters None ### Request Example ```shell curl https://api.neo4j.io/v2beta1/organizations/$YOUR_ORG_ID/activity-feed \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer $YOUR_AURA_API_TOKEN" ``` ### Response #### Success Response (200) - **logs** (array) - Contains all activity feed information. - **links** (object) - Contains pagination URLs. #### Response Example ```json { "logs": [ { "timestamp": "2023-10-27T10:00:00Z", "action_id": "0001", "user_id": "user-123", "details": "Instance 'my-instance' created." } ], "links": { "next": "https://api.neo4j.io/v2beta1/organizations/$YOUR_ORG_ID/activity-feed?page_token=next_page_token" } } ``` ``` -------------------------------- ### Discover Deployments with Neo4j Admin CLI Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/setup.adoc This command scans your network for running Neo4j servers. The output provides a registration code necessary for adding discovered deployments to Fleet Management. ```bash neo4j-admin fleet discover ``` -------------------------------- ### Create a Fleet Manager Deployment Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-api.adoc Send a POST request to the /deployments endpoint to create a deployment. Supply a name and an optional connection_url in the body. The response contains the deployment ID. ```shell curl --request 'POST' https://api.neo4j.io/v2beta1/organizations/$YOUR_ORG_ID/projects/$YOUR_PROJECT_ID/fleet-manager/deployments \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer $YOUR_AURA_API_TOKEN" \ --data '{"connection_url": "$OPTIONAL_CONNECTION_URL", "name": "$DEPLOYMENT_NAME"}' ``` -------------------------------- ### Get AuraDB Instance Details Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Fetch detailed information about a specific AuraDB instance using its ID. This includes the URL for metrics. ```shell aura-cli instance get YOUR_INSTANCE_ID ``` -------------------------------- ### List Servers for a Deployment Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Retrieve a list of all servers belonging to a specific deployment. ```bash aura-cli deployment server list --deployment-id $DEPLOYMENT_ID --organization-id $YOUR_ORG_ID --project-id $YOUR_PROJECT_ID ``` -------------------------------- ### Azure SSO Configuration Steps Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/security/single-sign-on.adoc Follow these steps in the Azure Portal to register an application and obtain the necessary credentials for Microsoft Entra ID SSO integration with Aura. ```text In the *Azure Portal*, go to *App Registrations* and then *New Registration*. Add a name for the new app registration and select *Register*. Skip redirect URI’s for now. On the app overview page, take note of the Application (client) ID. Select the *Client Credentials* link to open the client credentials page. Create a new secret and *copy the Value field*, it won’t be visible after leaving the page. Go back to the *App Overview* page and open the *App Endpoints* and take note of the OpenID Connection metadata document URI Under *Authentication* in the left-hand navigation, setup redirect URLs: Adding a new Web platform Enter `https://login.neo4j.com/login/callback` as the redirect URI. ``` -------------------------------- ### Get GDS Version Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Connecting_with_Python_(GDS_client).ipynb Call the `gds.version()` procedure to retrieve the version of Graph Data Science running on your instance. This is useful for compatibility checks. ```python # Call a GDS method directly print(gds.version()) ``` -------------------------------- ### Create Deployment Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-api.adoc Creates and registers a new deployment. This involves creating the deployment and then creating a token for it. ```APIDOC ## POST /deployments ### Description Creates a new deployment and returns its ID. ### Method POST ### Endpoint /organizations/:organization_id/projects/:project_id/fleet-manager/deployments ### Parameters #### Request Body - **name** (string) - Required - The name of the deployment. - **connection_url** (string) - Optional - The connection URL for the deployment. ### Request Example ```json { "connection_url": "$OPTIONAL_CONNECTION_URL", "name": "$DEPLOYMENT_NAME" } ``` ### Response #### Success Response (200) - **deployment_id** (string) - The ID of the created deployment. ``` -------------------------------- ### Initial Dashboard Prompt Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/dashboards/create-dashboards-with-ai.adoc Use this prompt to describe the initial focus and desired overview for your dashboard. The AI will use this to generate suggestions for prompts and a dashboard layout. ```text Focus on the French market, giving me an overview over recent top customers, top selling products, currently available stock, a category overview and sales volume per quarter. ``` -------------------------------- ### Load Data with Native Projections Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Projecting_graphs_and_using_the_Graph_Catalog_(GDS_client).ipynb Loads sample data into Neo4j using Cypher `MERGE` statements. This data will be used for graph projection examples. ```python gds.run_cypher(""" MERGE (a:EngineeringManagement {name: 'Alistair'}) MERGE (j:EngineeringManagement {name: 'Jennifer'}) MERGE (d:Developer {name: 'Leila'}) MERGE (a)-[:MANAGES {start_date: 987654321}]->(d) MERGE (j)-[:MANAGES {start_date: 123456789, end_date: 987654321}]->(d) ") ``` -------------------------------- ### Initialize Spark Session and Aura Credentials Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/spark.adoc Create a SparkSession and configure the connection details for your Aura instance, including the connection URI, username, and password. ```scala import org.apache.spark.sql.{SaveMode, SparkSession} val spark = SparkSession.builder().getOrCreate() // Replace with the actual connection URI and credentials val url = "neo4j+s://xxxxxxxx.databases.neo4j.io" val username = "neo4j" val password = "" ``` -------------------------------- ### Register Deployment Token via Docker Exec Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/fleet-management/aura-cli.adoc Register a deployment token to a Neo4j database running in a Docker container using `docker exec` and `cypher-shell`. ```bash docker exec -it $CONTAINER_NAME ./bin/cypher-shell -a $SERVICE_NAME:$PORT -d system -u $NEO4J_USERNAME -p$NEO4J_PASSWORD "call fleetManagement.registerToken('"$TOKEN"');" ``` -------------------------------- ### Displaying Graph Configuration and Properties Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Executing_the_different_algorithm_modes_(GDS_client).ipynb This snippet shows the configuration and properties of a graph, including node count, relationship count, density, and schema. It is useful for understanding the structure of a graph before running algorithms. ```python nodeCount 8 relationshipCount 14 configuration {} density 0.25 creationTime 2022-03-29T13:59:06.598241000+00:00 modificationTime 2022-03-29T14:01:18.194290000+00:00 schema {'relationships': {'LINKS': {'weight': 'Float ... Name: 0, dtype: object ``` -------------------------------- ### Get PageRank Algorithm Statistics Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Executing_the_different_algorithm_modes_(GDS_client).ipynb Execute the PageRank algorithm and retrieve its statistics. This mode is useful for understanding algorithm performance and convergence without modifying the graph. ```python result = gds.pageRank.stats( g, maxIterations=20, dampingFactor=0.85 ) print(result) ``` -------------------------------- ### List Aura CLI Configuration Settings Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/configuration.adoc View all current configuration settings for the Aura CLI, including any enabled beta features. ```shell aura-cli config list ``` -------------------------------- ### Import and Configure GDS Client Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Executing_the_different_algorithm_modes_(GDS_client).ipynb Import the GraphDataScience client and configure connection details for Neo4j Aura. Replace placeholders with your actual Aura instance URI, username, and password. ```python # Import the client from graphdatascience import GraphDataScience # Replace with the actual URI, username, and password AURA_CONNECTION_URI = "neo4j+s://xxxxxxxx.databases.neo4j.io" AURA_USERNAME = "neo4j" AURA_PASSWORD = "" ``` -------------------------------- ### Get AuraDB CMEK Details Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/aura-cli/auradb-instances.adoc Retrieves detailed information for a specific customer-managed key (CMEK) using its ID. This command provides configuration details for a particular CMEK. ```shell aura-cli customer-managed-key get YOUR_CMEK_ID ``` -------------------------------- ### Project Graph Using Extended Syntax Source: https://github.com/neo4j/docs-aura/blob/console/notebooks/Projecting_graphs_and_using_the_Graph_Catalog_(GDS_client).ipynb Projects a graph using the extended syntax for `gds.graph.project`, allowing for detailed configuration of node and relationship projections, including property mapping and default values. ```python # Project a graph using the extended syntax extended_form_graph, result = gds.graph.project( "extended-form-example-graph", { "PersonEM": { "label": "EngineeringManagement" }, "PersonD": { "label": "Developer" } }, { "KNOWS": { "type": "MANAGES", "orientation": "UNDIRECTED", "properties": { "start_date": { "property": "start_date" }, "end_date": { "property": "end_date", "defaultValue": 999999999 } } } } ) print(result) ``` -------------------------------- ### Verify Users After Creation Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/upgrade.adoc Run this command to confirm that users have been successfully created in the target Neo4j Aura instance. ```cypher SHOW USERS; ``` -------------------------------- ### Cypher Query with Literal Values Source: https://github.com/neo4j/docs-aura/blob/console/modules/ROOT/pages/tutorials/performance-improvements.adoc Avoid using literal values directly in Cypher queries. This example shows inefficient query execution due to repeated parsing and plan generation. ```cypher MATCH (tg:asset) WHERE tg.name = "ABC123" MERGE (tg)<-[:TAG_OF]-(z1:tag {name: "/DATA01/" + tg.name + "/Top_DOOR"}) MERGE (tg)<-[:TAG_OF]-(z2:tag {name: "/DATA01/" + tg.name + "/Data_Vault"}) ```