Procedures
This page provides a complete reference to Neo4j’s built-in procedures.
It also lists current deprecated procedures and the procedures removed in Neo4j 5, along with their replacements.
The available procedures on a server depends on several factors:
-
Neo4j Enterprise Edition provides a larger set of procedures than Neo4j Community Edition.
-
Neo4j’s APOC Core library and GenAI plugin are installed by default on Aura instances, but have to be installed separately on on-prem servers.
-
Cluster members have procedures that are not available in standalone mode.
To check which procedures are available in your Neo4j DBMS, use the Cypher command SHOW PROCEDURES
:
SHOW PROCEDURES
SHOW PROCEDURES YIELD *
Some procedures can only be run by users with For more information, see the |
Authentication and authorization
For more information, see Authentication and authorization.
dbms.security.clearAuthCache()
Syntax |
|
||
Description |
Clears authentication and authorization cache. |
||
Mode |
DBMS |
dbms.showCurrentUser()
Syntax |
|
||
Description |
Show the current user. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the current user. |
|
|
|
The roles assigned to the current user. |
|
|
|
The flags set on the current user. |
|
Mode |
DBMS |
Background job management
For more information, see Manage background jobs.
dbms.scheduler.failedJobs()
Syntax |
|
||
Description |
List failed job runs. There is a limit for amount of historical data. |
||
Return arguments |
Name |
Type |
Description |
|
|
The id of the failed job. |
|
|
|
The category of the failed job. |
|
|
|
The name of the database the job failed in. |
|
|
|
The creator of the failed job. |
|
|
|
Information about the failed job. |
|
|
|
The interval of the failed job. |
|
|
|
The submission time of the failed job. |
|
|
|
The start time of the failed job. |
|
|
|
The failure time of the failed job. |
|
|
|
Information about the job failure. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
dbms.scheduler.groups()
Syntax |
|
||
Description |
List the job groups that are active in the database internal job scheduler. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the job group. |
|
|
|
The number of active threads in that job group. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
dbms.scheduler.jobs()
Syntax |
|
||
Description |
List all jobs that are active in the database internal job scheduler. |
||
Return arguments |
Name |
Type |
Description |
|
|
The id of the job. |
|
|
|
The category of the job. |
|
|
|
The submission time of the job. |
|
|
|
The name of the database the job is in. |
|
|
|
The creator of the job. |
|
|
|
Information about the job. |
|
|
|
The interval of the job. |
|
|
|
The start time of the job. |
|
|
|
The interval for jobs run periodically. |
|
|
|
The state of the job: ('EXECUTING', 'SCHEDULED'). |
|
|
|
A description of the job state. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
Change Data Capture (CDC)
For more information, see the CDC documentation.
cdc.current()
Syntax |
|
||
Description |
Returns the current change identifier that can be used to stream changes from. |
||
Return arguments |
Name |
Type |
Description |
|
|
The change identifier. |
|
Mode |
READ |
||
Replaced by |
cdc.earliest()
Syntax |
|
||
Description |
Returns the earliest change identifier that can be used to stream changes from. |
||
Return arguments |
Name |
Type |
Description |
|
|
The change identifier. |
|
Mode |
READ |
||
Replaced by |
cdc.query()
Syntax |
|
||
Description |
Query changes happened from the provided change identifier. |
||
Input arguments |
Name |
Type |
Description |
|
|
The change identifier to query changes from. |
|
|
|
An optional list of selectors to filter out changes. |
|
Return arguments |
Name |
Type |
Description |
|
|
The change identifier for this change event. Used to continue querying from this change event. |
|
|
|
A number identifying which transaction the change happened in, unique in combination with seq. |
|
|
|
A number used for ordering changes that happened in the same transaction. |
|
|
|
Metadata from the transaction that caused this change event. |
|
|
|
The retrieved changes on the affected entity. |
|
Mode |
READ |
||
Replaced by |
db.cdc.current()
Syntax |
|
||
Description |
Returns the current change identifier that can be used to stream changes from. |
||
Return arguments |
Name |
Type |
Description |
|
|
The change identifier. |
|
Mode |
READ |
db.cdc.earliest()
Syntax |
|
||
Description |
Returns the earliest change identifier that can be used to stream changes from. |
||
Return arguments |
Name |
Type |
Description |
|
|
The change identifier. |
|
Mode |
READ |
db.cdc.query()
Syntax |
|
||
Description |
Query changes happened from the provided change identifier. |
||
Input arguments |
Name |
Type |
Description |
|
|
The change identifier to query changes from. |
|
|
|
An optional list of selectors to filter out changes. |
|
Return arguments |
Name |
Type |
Description |
|
|
The change identifier for this change event. Used to continue querying from this change event. |
|
|
|
A number identifying which transaction the change happened in, unique in combination with seq. |
|
|
|
A number used for ordering changes that happened in the same transaction. |
|
|
|
Metadata from the transaction that caused this change event. |
|
|
|
The retrieved changes on the affected entity. |
|
Mode |
READ |
Cluster management
For more information, see Clustering.
dbms.cluster.checkConnectivity()
Syntax |
|
||
Description |
Check the connectivity of this instance to other cluster members. Not all ports are relevant to all members. Valid values for 'port-name' are: [CLUSTER, INTRA_BOLT, RAFT] |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the port: ('CLUSTER', 'RAFT'). |
|
|
|
The id of the server to check connectivity of. |
|
Return arguments |
Name |
Type |
Description |
|
|
The id of the checked server. |
|
|
|
name :: STRING |
|
|
|
address :: STRING |
|
|
|
The instance mode constraint of the server. |
|
|
|
The name of the checked port. |
|
|
|
The address of the checked port. |
|
|
|
Whether the check was successful or not. |
|
Mode |
DBMS |
dbms.cluster.cordonServer()
Syntax |
|
||
Description |
Mark a server in the topology as not suitable for new allocations. It will not force current allocations off the server. This is useful when deallocating databases when you have multiple unavailable servers. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name or id of the server to be cordoned. |
|
Mode |
WRITE |
||
Required privileges |
|
Before Neo4j 5.23, the procedure |
dbms.cluster.moveToNextDiscoveryVersion()
Syntax |
|
||
Description |
The procedure triggers a switch to the next discovery service version for all known members of the cluster (as listed in the system database and discovery). For example, if the current member’s discovery version is V1_ONLY, it will switch all members to V1_OVER_V2. In case of failure, the user must manually resolve the issue. |
||
Mode |
DBMS |
dbms.cluster.deallocateDatabaseFromServer()
Syntax |
|
||
Description |
Deallocate a specific user database from a specific server. |
||
Input arguments |
Name |
Type |
Description |
|
|
The id of the server to deallocate from. |
|
|
|
The name of the database to deallocate. |
|
|
|
Set to |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The mode in which the database is hosted. |
|
Mode |
WRITE |
||
Required privileges |
|
dbms.cluster.deallocateDatabaseFromServers()
Syntax |
|
||
Description |
Deallocate a specific user database from a list of servers. |
||
Input arguments |
Name |
Type |
Description |
|
|
The ids of the servers to deallocate from. |
|
|
|
The id of the database to deallocate. |
|
|
|
Set to |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The mode in which the database is hosted. |
|
Mode |
WRITE |
||
Required privileges |
|
dbms.cluster.deallocateNumberOfDatabases()
Syntax |
|
||
Description |
Deallocate a number of user databases from a specific server. |
||
Input arguments |
Name |
Type |
Description |
|
|
The id of the server to deallocate from. |
|
|
|
The number of databases to deallocate. |
|
|
|
Set to |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The mode in which the database is hosted. |
|
Mode |
WRITE |
||
Required privileges |
|
dbms.cluster.protocols()
Syntax |
|
||
Description |
Overview of installed protocols |
||
Return arguments |
Name |
Type |
Description |
|
|
Direction of the protocol (inbound or outbound). |
|
|
|
The socket address this protocol is available on. |
|
|
|
The name of the protocol. |
|
|
|
The version of the protocol. |
|
|
|
Installed modifier protocols, for example, compression. |
|
Mode |
DBMS |
dbms.cluster.readReplicaToggle()
Syntax |
|
||
Description |
The toggle can pause or resume read replica (deprecated in favor of dbms.cluster.secondaryReplicationDisable) |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the database to toggle the secondary replication process for. |
|
|
|
Whether or not to enable/disable the secondary replication process. |
|
Return arguments |
Name |
Type |
Description |
|
|
The current state of the secondary replication process. |
|
Mode |
DBMS |
What is it for? You can perform a point-in-time backup, as the backup will contain only the transactions up to the point where the transaction pulling was paused. Follow these steps to do so:
If connected directly to a server hosting a database in secondary mode, Data Scientists can execute analysis on a specific database that is paused, the data will not unexpectedly change while performing the analysis. |
This procedure can only be executed on a database that runs in a secondary role on the connected server. |
neo4j
CALL dbms.cluster.readReplicaToggle("neo4j", true)
neo4j
CALL dbms.cluster.readReplicaToggle("neo4j", false)
dbms.cluster.reallocateDatabase()
Syntax |
|
||
Description |
Reallocate a specific database. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the database to reallocate. |
|
|
|
Set to |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The mode in which the database is hosted. |
|
Mode |
WRITE |
||
Required privileges |
|
dbms.cluster.reallocateNumberOfDatabases()
Syntax |
|
||
Description |
Reallocate a specified number of user databases. |
||
Input arguments |
Name |
Type |
Description |
|
|
The number of databases to reallocate. |
|
|
|
Set to |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The name of the server. |
|
|
|
The id of the server. |
|
|
|
The mode in which the database is hosted. |
|
Mode |
WRITE |
||
Required privileges |
|
dbms.cluster.recreateDatabase()
Syntax |
|
||
Description |
Recreates a database while keeping all RBAC settings. The procedure initiates a process, which when complete, will have synchronized and started all database instances within the cluster. |
||
Input arguments |
Name |
Type |
Description |
|
|
database :: STRING |
|
|
|
options = {} :: MAP |
|
Mode |
WRITE |
dbms.cluster.routing.getRoutingTable()
Syntax |
|
||
Description |
Returns the advertised bolt capable endpoints for a given database, divided by each endpoint’s capabilities. For example, an endpoint may serve read queries, write queries, and/or future |
||
Input arguments |
Name |
Type |
Description |
|
|
Routing context, for example, routing policies. |
|
|
|
The database to get a routing table for. |
|
Return arguments |
Name |
Type |
Description |
|
|
Time to live (in seconds) for the routing table. |
|
|
|
Servers grouped by whether they are readers, writers, or routers. |
|
Mode |
DBMS |
dbms.cluster.secondaryReplicationDisable()
Syntax |
|
||
Description |
The toggle can pause or resume the secondary replication process. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the database to toggle the secondary replication process for. |
|
|
|
Whether or not to enable/disable the secondary replication process. |
|
Return arguments |
Name |
Type |
Description |
|
|
The current state of the secondary replication process. |
|
Mode |
DBMS |
What is it for? You can perform a point-in-time backup, as the backup will contain only the transactions up to the point where the transaction pulling was paused. Follow these steps to do so:
If connected directly to a server hosting a database in secondary mode, Data Scientists can execute analysis on a specific database that is paused, the data will not unexpectedly change while performing the analysis. |
This procedure can only be executed on a database that runs in a secondary role on the connected server. |
neo4j
CALL dbms.cluster.secondaryReplicationDisable("neo4j", true)
neo4j
CALL dbms.cluster.secondaryReplicationDisable("neo4j", false)
dbms.cluster.setAutomaticallyEnableFreeServers()
Syntax |
|
||
Description |
With this method you can set whether free servers are automatically enabled. |
||
Input arguments |
Name |
Type |
Description |
|
|
Whether or not to automatically enable free servers. |
|
Mode |
WRITE |
||
Required privileges |
|
Before Neo4j 5.23, the procedure |
dbms.cluster.showParallelDiscoveryState()
Syntax |
|
||
Description |
Compare the states of Discovery service V1 and Discovery service V2. |
||
Return arguments |
Name |
Type |
Description |
|
|
mode :: STRING |
|
|
|
stateComparison :: STRING |
|
|
|
v1ServerCount :: STRING |
|
|
|
v2ServerCount :: STRING |
|
Mode |
DBMS |
dbms.cluster.statusCheck()
Syntax |
|
||
Description |
Performs a rafted status check. |
||
Input arguments |
Name |
Type |
Description |
|
|
databases :: LIST<STRING> |
|
|
|
timeoutMilliseconds = null :: INTEGER |
|
Return arguments |
Name |
Type |
Description |
|
|
database :: STRING |
|
|
|
serverId :: STRING |
|
|
|
serverName :: STRING |
|
|
|
address :: STRING |
|
|
|
replicationSuccessful :: BOOLEAN |
|
|
|
memberStatus :: STRING |
|
|
|
recognisedLeader :: STRING |
|
|
|
recognisedLeaderTerm :: INTEGER |
|
|
|
requester :: BOOLEAN |
|
|
|
error :: STRING |
|
Mode |
DBMS |
dbms.cluster.switchDiscoveryServiceVersion()
Syntax |
|
||
Description |
Allows you to select which discovery service should be started. Possible values are:
|
||
Input arguments |
Name |
Type |
Description |
|
|
mode :: STRING |
|
Mode |
DBMS |
dbms.cluster.uncordonServer()
Syntax |
|
||
Description |
Remove the cordon on a server, returning it to 'enabled'. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name or id of the server to be uncordoned. |
|
Mode |
WRITE |
||
Replaced by |
|||
Required privileges |
|
Before Neo4j 5.23, the procedure |
dbms.setDatabaseAllocator()
Syntax |
|
||
Description |
With this method you can set the allocator that is responsible for selecting servers for hosting databases. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the allocator. |
|
Mode |
WRITE |
dbms.setDefaultAllocationNumbers()
Syntax |
|
||
Description |
With this method you can set the default number of primaries and secondaries. |
||
Input arguments |
Name |
Type |
Description |
|
|
The default number of primaries. |
|
|
|
The default number of secondaries. |
|
Mode |
WRITE |
dbms.showTopologyGraphConfig()
Syntax |
|
||
Description |
With this method the configuration of the Topology Graph can be displayed. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the allocator. |
|
|
|
The default number of primaries. |
|
|
|
The default number of secondaries. |
|
|
|
The name of the default database. |
|
|
|
Whether or not to automatically enable free servers. |
|
Mode |
READ |
Configuration and DBMS info
For more information, see Configuration.
dbms.checkConfigValue()
Syntax |
|
||
Description |
Check if a potential config setting value is valid. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the setting. |
|
|
|
The setting value to verify. |
|
Return arguments |
Name |
Type |
Description |
|
|
Whether or not the setting value is valid. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
dbms.components()
Syntax |
|
||
Description |
List DBMS components and their versions. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the component. |
|
|
|
The installed versions of the component. |
|
|
|
The Neo4j edition of the DBMS. |
|
Mode |
DBMS |
dbms.info()
Syntax |
|
||
Description |
Provides information regarding the DBMS. |
||
Return arguments |
Name |
Type |
Description |
|
|
The id of the DBMS. |
|
|
|
The name of the DBMS. |
|
|
|
The creation date of the DBMS. |
|
Mode |
DBMS |
dbms.listCapabilities()
Syntax |
|
||
Description |
List capabilities. |
||
Return arguments |
Name |
Type |
Description |
|
|
The full name of the capability (e.g. "dbms.instance.version"). |
|
|
|
The capability description (e.g. "Neo4j version this instance is running"). |
|
|
|
The capability object if it is present in the system (e.g. "5.20.0"). |
|
Mode |
DBMS |
dbms.listConfig()
Syntax |
|
||
Description |
List the currently active configuration settings of Neo4j. |
||
Input arguments |
Name |
Type |
Description |
|
|
A string that filters on the name of config settings. |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the setting. |
|
|
|
The description of the setting. |
|
|
|
The set value of the setting. |
|
|
|
If the setting can be set dynamically or not. |
|
|
|
The default value of the setting. |
|
|
|
The value of the setting when the database started. |
|
|
|
Whether or not the setting was explicitly set. |
|
|
|
A description of the valid values. |
|
Mode |
DBMS |
dbms.setConfigValue()
Syntax |
|
||
Description |
Update a given setting value. Passing an empty value results in removing the configured value and falling back to the default value. Changes do not persist and are lost if the server is restarted. In a clustered environment, |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the setting. |
|
|
|
The value to set. |
|
Mode |
DBMS |
dbms.listPools()
Syntax |
|
||
Description |
List all memory pools, including sub pools, currently registered at this instance that are visible to the user. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the memory pool. |
|
|
|
The name of the database. |
|
|
|
The amount of heap memory used. |
|
|
|
The amount of heap memory used in bytes. |
|
|
|
The amount of native memory used. |
|
|
|
The amount of native memory used in bytes. |
|
|
|
The amount of free memory. |
|
|
|
The amount of free memory in bytes. |
|
|
|
The total pool memory. |
|
|
|
The total pool memory in bytes. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
Connection management
For more information, see Manage connections.
dbms.listConnections()
Syntax |
|
||
Description |
List all accepted network connections at this instance that are visible to the user. |
||
Return arguments |
Name |
Type |
Description |
|
|
The id of the connection. |
|
|
|
The time the connection was established, formatted according to the ISO-8601 Standard. |
|
|
|
The protocol of the connector. |
|
|
|
The username of the connected user. |
|
|
|
The active agent. |
|
|
|
The address of the connected server. |
|
|
|
The address of the connected client. |
|
Mode |
DBMS |
dbms.killConnection()
Syntax |
|
||
Description |
Kill network connection with the given connection id. |
||
Input arguments |
Name |
Type |
Description |
|
|
The id of the connection to kill. |
|
Return arguments |
Name |
Type |
Description |
|
|
The id of the connection killed. |
|
|
|
The username of the user of the killed connection. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
DBMS |
dbms.killConnections()
Syntax |
|
||
Description |
Kill all network connections with the given connection ids. |
||
Input arguments |
Name |
Type |
Description |
|
|
The ids of the connections to kill. |
|
Return arguments |
Name |
Type |
Description |
|
|
The id of the connection killed. |
|
|
|
The username of the user of the killed connection. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
DBMS |
Database management
For more information, see Database administration and Database internals and transactional behavior.
db.checkpoint()
Syntax |
|
||
Description |
Initiate and wait for a new check point, or wait any already on-going check point to complete. Note that this temporarily disables the |
||
Return arguments |
Name |
Type |
Description |
|
|
Whether the checkpoint has successfully completed. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.info()
Syntax |
|
||
Description |
Provides information regarding the database. |
||
Return arguments |
Name |
Type |
Description |
|
|
The id of the database. |
|
|
|
The name of the database. |
|
|
|
The creation date of the database, formatted according to the ISO-8601 Standard. |
|
Mode |
READ |
dbms.listActiveLocks()
Syntax |
|
||
Description |
List the active lock requests granted for the transaction executing the query with the given query id. |
||
Input arguments |
Name |
Type |
Description |
|
|
The id of the query to check for active locks on. |
|
Return arguments |
Name |
Type |
Description |
|
|
The lock type: ('SHARED', 'EXCLUSIVE'). |
|
|
|
The locked resource. |
|
|
|
The id of the locked resource. |
|
Mode |
DBMS |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.listLocks()
Syntax |
|
||
Description |
List all locks at this database. |
||
Return arguments |
Name |
Type |
Description |
|
|
The locking mode this lock is using, either "SHARED" or "EXCLUSIVE". |
|
|
|
The type of resource (e.g. nodes, relationships, labels) this lock protects. |
|
|
|
The id of the resource this lock protects. |
|
|
|
The id of the transaction that owns this lock. |
|
Mode |
DBMS |
db.ping()
Syntax |
|
||
Description |
This procedure can be used by client side tooling to test whether they are correctly connected to a database. The procedure is available in all databases and always returns true. A faulty connection can be detected by not being able to call this procedure. |
||
Return arguments |
Name |
Type |
Description |
|
|
Whether or not the connection call to the database has been successful. |
|
Mode |
READ |
dbms.routing.getRoutingTable()
Syntax |
|
||
Description |
Returns the advertised bolt capable endpoints for a given database, divided by each endpoint’s capabilities. For example, an endpoint may serve read queries, write queries, and/or future |
||
Input arguments |
Name |
Type |
Description |
|
|
Routing context, for example, routing policies. |
|
|
|
The database to get a routing table for. |
|
Return arguments |
Name |
Type |
Description |
|
|
Time to live (in seconds) for the routing table. |
|
|
|
Servers grouped by whether they are readers, writers, or routers. |
|
Mode |
DBMS |
dbms.setDefaultDatabase()
Syntax |
|
||
Description |
Change the default database to the provided value. The database must exist and the old default database must be stopped. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
Return arguments |
Name |
Type |
Description |
|
|
Information about the default database. |
|
Mode |
WRITE |
dbms.quarantineDatabase()
Syntax |
|
||
Description |
Place a database into quarantine or remove it from it. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the database to set the quarantine status of. |
|
|
|
Whether or not to quarantine the database. |
|
|
|
The reason to quarantine the database. |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the database. |
|
|
|
Whether or not the database is quarantined. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
DBMS |
dbms.upgrade()
Syntax |
|
||
Description |
Upgrade the system database schema if it is not the current schema. |
||
Return arguments |
Name |
Type |
Description |
|
|
The upgrade status of the system database. |
|
|
|
Information about the upgrade outcome. |
|
Mode |
WRITE |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
dbms.upgradeStatus()
Syntax |
|
||
Description |
Report the current status of the system database sub-graph schema. |
||
Return arguments |
Name |
Type |
Description |
|
|
The upgrade status of the system database. |
|
|
|
Information describing the upgrade status. |
|
|
|
Information about the steps necessary to upgrade. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
GenAI and vectors
For more information, see:
db.create.setNodeVectorProperty
Syntax |
|
||
Description |
Set a vector property on a given node in a more space efficient representation than Cypher’s |
||
Input arguments |
Name |
Type |
Description |
|
|
The node on which the new property will be stored. |
|
|
|
The name of the new property. |
|
|
|
The object containing the embedding. |
|
Mode |
WRITE |
Known issue
Procedure signatures from |
db.create.setRelationshipVectorProperty()
Syntax |
|
||
Description |
Set a vector property on a given relationship in a more space efficient representation than Cypher’s |
||
Input arguments |
Name |
Type |
Description |
|
|
The relationship on which the new property will be stored. |
|
|
|
The name of the new property. |
|
|
|
The object containing the embedding. |
|
Mode |
WRITE |
Known issue
Procedure signatures from |
db.create.setVectorProperty()
Syntax |
|
||
Description |
Set a vector property on a given node in a more space efficient representation than Cypher’s SET. |
||
Input arguments |
Name |
Type |
Description |
|
|
The node on which the new property will be stored. |
|
|
|
The name of the new property. |
|
|
|
The object containing the embedding. |
|
Return arguments |
Name |
Type |
Description |
|
|
The node on which the vector property was set. |
|
Mode |
WRITE |
||
Replaced by |
|
Known issue
Procedure signatures from |
db.index.vector.createNodeIndex()
Syntax |
|
||
Description |
Create a named node vector index for the specified label and property with the given vector dimensionality using either the EUCLIDEAN or COSINE similarity function.
Both similarity functions are case-insensitive.
Use the |
||
Input arguments |
Name |
Type |
Description |
|
|
indexName :: STRING |
|
|
|
label :: STRING |
|
|
|
propertyKey :: STRING |
|
|
|
vectorDimension :: INTEGER |
|
|
|
vectorSimilarityFunction :: STRING |
|
Mode |
SCHEMA |
As of Neo4j 5.15, vector indexes can be created with the Cypher Command CREATE VECTOR INDEX .
For more information, see the Cypher Manual → Create a vector index.
|
db.index.vector.queryNodes()
Syntax |
|
||
Description |
Query the given node vector index. Returns requested number of nearest neighbors to the provided query vector, and their similarity score to that query vector, based on the configured similarity function for the index. The similarity score is a value between [0, 1]; where 0 indicates least similar, 1 most similar. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the vector index. |
|
|
|
The size of the vector neighbourhood. |
|
|
|
The object to find approximate matches for. |
|
Return arguments |
Name |
Type |
Description |
|
|
A node which contains a vector property similar to the query object. |
|
|
|
The score measuring how similar the node property is to the query object. |
|
Mode |
READ |
db.index.vector.queryRelationships()
Syntax |
|
||
Description |
Query the given relationship vector index. Returns requested number of nearest neighbors to the provided query vector, and their similarity score to that query vector, based on the configured similarity function for the index. The similarity score is a value between [0, 1]; where 0 indicates least similar, 1 most similar. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the vector index. |
|
|
|
The size of the vector neighbourhood. |
|
|
|
The object to find approximate matches for. |
|
Return arguments |
Name |
Type |
Description |
|
|
A relationship which contains a vector property similar to the query object. |
|
|
|
The score measuring how similar the relationship property is to the query object. |
|
Mode |
READ |
genai.vector.encodeBatch()
Syntax |
|
||
Description |
Encode a given batch of resources as vectors using the named provider. For each element in the given resource LIST this returns:
|
||
Input arguments |
Name |
Type |
Description |
|
|
The object to transform into an embedding. |
|
|
|
The GenAI provider to use. |
|
|
|
The provider specific settings. |
|
Return arguments |
Name |
Type |
Description |
|
|
The index of the corresponding element in the input list. |
|
|
|
The name of the input resource. |
|
|
|
The generated vector embedding for the resource. |
|
Mode |
DEFAULT |
For more information, see the Cypher Manual → Generating a batch of embeddings.
Known issue
Procedure signatures from |
genai.vector.listEncodingProviders()
Syntax |
|
||
Description |
Lists the available vector embedding providers. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the GenAI provider. |
|
|
|
The signature of the required config map. |
|
|
|
The signature of the optional config map. |
|
|
|
The default values for the GenAI provider. |
|
Mode |
DEFAULT |
Index management
For more information, see:
db.awaitIndex()
Syntax |
|
||
Description |
Wait for an index to come online (for example: CALL db.awaitIndex("MyIndex", 300)). |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the awaited index. |
|
|
|
The maximum time to wait in seconds. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.awaitIndexes()
Syntax |
|
||
Description |
Wait for all indexes to come online (for example: CALL db.awaitIndexes(300)). |
||
Input arguments |
Name |
Type |
Description |
|
|
The maximum time to wait in seconds. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.index.fulltext.awaitEventuallyConsistentIndexRefresh()
Syntax |
|
||
Description |
Wait for the updates from recently committed transactions to be applied to any eventually-consistent full-text indexes. |
||
Mode |
READ |
db.index.fulltext.listAvailableAnalyzers()
Syntax |
|
||
Description |
List the available analyzers that the full-text indexes can be configured with. |
||
Return arguments |
Name |
Type |
Description |
|
|
The name of the analyzer. |
|
|
|
The description of the analyzer. |
|
|
|
The stopwords used by the analyzer to tokenize strings. |
|
Mode |
READ |
db.index.fulltext.queryNodes()
Syntax |
|
||
Description |
Query the given full-text index. Returns the matching nodes and their Lucene query score, ordered by score.
Valid key: value pairs for the
The |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the full-text index. |
|
|
|
The string to find approximate matches for. |
|
|
|
{skip :: INTEGER, limit :: INTEGER, analyzer :: STRING} |
|
Return arguments |
Name |
Type |
Description |
|
|
A node which contains a property similar to the query string. |
|
|
|
The score measuring how similar the node property is to the query string. |
|
Mode |
READ |
db.index.fulltext.queryRelationships()
Syntax |
|
||
Description |
Query the given full-text index. Returns the matching relationships and their Lucene query score, ordered by score.
Valid key: value pairs for the
The |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the full-text index. |
|
|
|
The string to find approximate matches for. |
|
|
|
{skip :: INTEGER, limit :: INTEGER, analyzer :: STRING} |
|
Return arguments |
Name |
Type |
Description |
|
|
A relationship which contains a property similar to the query string. |
|
|
|
The score measuring how similar the relationship property is to the query string. |
|
Mode |
READ |
db.resampleIndex()
Syntax |
|
||
Description |
Schedule resampling of an index (for example: CALL db.resampleIndex("MyIndex")). |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the index. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.resampleOutdatedIndexes()
Syntax |
|
||
Description |
Schedule resampling of all outdated indexes. |
||
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
Metrics
dbms.queryJmx()
Syntax |
|
||
Description |
Query JMX management data by domain and name. For instance, use : to find all JMX beans. |
||
Input arguments |
Name |
Type |
Description |
|
|
A query for MBeans on this MBeanServer (e.g. ':,name=neo4j' for all metrics in neo4j database). |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the metric. |
|
|
|
The description of the metric. |
|
|
|
A collection with the attributes (values) of that metric. |
|
Mode |
DBMS |
Schema and metadata
db.schema.nodeTypeProperties()
Syntax |
|
||
Description |
Show the derived property schema of the nodes in tabular form. |
||
Return arguments |
Name |
Type |
Description |
|
|
A name generated from the labels on the node. |
|
|
|
A list containing the labels on a category of node. |
|
|
|
A property key on a category of node. |
|
|
|
All types of a property belonging to a node category. |
|
|
|
Whether or not the property is present on all nodes belonging to a node category. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.schema.relTypeProperties()
Syntax |
|
||
Description |
Show the derived property schema of the relationships in tabular form. |
||
Return arguments |
Name |
Type |
Description |
|
|
A name generated from the type on the relationship. |
|
|
|
A property key on a category of relationship. |
|
|
|
All types of a property belonging to a relationship category. |
|
|
|
Whether or not the property is present on all relationships belonging to a relationship category. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.schema.visualization()
Syntax |
|
||
Description |
Visualizes the schema of the data based on available statistics. A new node is returned for each label. The properties represented on the node include: |
||
Return arguments |
Name |
Type |
Description |
|
|
A list of virtual nodes representing each label in the database. |
|
|
|
A list of virtual relationships representing all combinations between start and end nodes in the database. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.createLabel()
Syntax |
|
||
Description |
Create a label |
||
Input arguments |
Name |
Type |
Description |
|
|
Label name. |
|
Mode |
WRITE |
db.createProperty()
Syntax |
|
||
Description |
Create a Property |
||
Input arguments |
Name |
Type |
Description |
|
|
Property name. |
|
Mode |
WRITE |
db.createRelationshipType
Syntax |
|
||
Description |
Create a RelationshipType |
||
Input arguments |
Name |
Type |
Description |
|
|
Relationship type name. |
|
Mode |
WRITE |
db.labels()
Syntax |
|
||
Description |
List all labels attached to nodes within a database according to the user’s access rights. The procedure returns empty results if the user is not authorized to view those labels. |
||
Return arguments |
Name |
Type |
Description |
|
|
A label within the database. |
|
Mode |
READ |
db.propertyKeys()
Syntax |
|
||
Description |
List all property keys in the database. |
||
Return arguments |
Name |
Type |
Description |
|
|
A property key in the database. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.relationshipTypes()
Syntax |
|
||
Description |
List all types attached to relationships within a database according to the user’s access rights. The procedure returns empty results if the user is not authorized to view those relationship types. |
||
Return arguments |
Name |
Type |
Description |
|
|
A relationship type in the database. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
Statistics and query planning
For more information, see Statistics and execution plans
db.clearQueryCaches()
Syntax |
|
||
Description |
Clears all query caches. |
||
Return arguments |
Name |
Type |
Description |
|
|
Information about the number of cleared query caches. |
|
Mode |
DBMS |
db.prepareForReplanning()
Syntax |
|
||
Description |
Triggers an index resample and waits for it to complete, and after that clears query caches. After this procedure has finished queries will be planned using the latest database statistics. |
||
Input arguments |
Name |
Type |
Description |
|
|
The maximum time to wait in seconds. |
|
Mode |
READ |
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
db.stats.clear
Syntax |
|
||
Description |
Clear collected data of a given data section. Valid sections are 'QUERIES' |
||
Input arguments |
Name |
Type |
Description |
|
|
The section to clear. The only available section is: 'QUERIES'. |
|
Return arguments |
Name |
Type |
Description |
|
|
The section cleared. |
|
|
|
Whether the section was successfully cleared. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
READ |
db.stats.collect()
Syntax |
|
||
Description |
Start data collection of a given data section. Valid sections are 'QUERIES' |
||
Input arguments |
Name |
Type |
Description |
|
|
The section to collect. The only available section is: 'QUERIES'. |
|
|
|
{durationSeconds = -1 INTEGER} |
|
Return arguments |
Name |
Type |
Description |
|
|
The section collected. |
|
|
|
Whether the section was successfully collected. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
READ |
db.stats.retrieve()
Syntax |
|
||
Description |
Retrieve statistical data about the current database. Valid sections are 'GRAPH COUNTS', 'TOKENS', 'QUERIES', 'META' |
||
Input arguments |
Name |
Type |
Description |
|
|
A section of stats to retrieve: ('GRAPH COUNTS', 'TOKENS', 'QUERIES', 'META'). |
|
|
|
{maxInvocations = 100 INTEGER} |
|
Return arguments |
Name |
Type |
Description |
|
|
The section retrieved. |
|
|
|
Data pertaining to the retrieved statistics. |
|
Mode |
READ |
db.stats.retrieveAllAnonymized()
Syntax |
|
||
Description |
Retrieve all available statistical data about the current database, in an anonymized form. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the graph token. |
|
|
|
{maxInvocations = 100 INTEGER} |
|
Return arguments |
Name |
Type |
Description |
|
|
The section retrieved. |
|
|
|
Data pertaining to the retrieved statistics. |
|
Mode |
READ |
db.stats.status()
Syntax |
|
||
Description |
Retrieve the status of all available collector daemons, for this database. |
||
Return arguments |
Name |
Type |
Description |
|
|
String with the message "QUERIES". |
|
|
|
The status of the QueryCollector: "idle" or "collecting". |
|
|
|
data :: MAP |
|
Mode |
READ |
db.stats.stop()
Syntax |
|
||
Description |
Stop data collection of a given data section. Valid sections are 'QUERIES' |
||
Input arguments |
Name |
Type |
Description |
|
|
The section to stop. The only available section is: 'QUERIES'. |
|
Return arguments |
Name |
Type |
Description |
|
|
The stopped section. |
|
|
|
Whether the section was successfully stopped. |
|
|
|
Details about the outcome of the procedure. |
|
Mode |
READ |
Transaction management
List of deprecated procedures
Neo4j 5 contains several deprecated procedures. These procedures have been replaced either by Cypher commands or different procedures. The procedures deprecated in Neo4j 5 will be removed in the next major release of Neo4j.
See all deprecated procedures
Name | Community Edition | Enterprise Edition | Comment |
---|---|---|---|
No |
Yes |
Introduced in 5.13 Beta Deprecated in 5.17
Replaced by: |
|
No |
Yes |
Introduced in 5.13 Beta Deprecated in 5.17
Replaced by: |
|
No |
Yes |
Introduced in 5.13 Beta Admin Only Deprecated in 5.17
Replaced by: |
|
Yes |
Yes |
Introduced in 5.11 Beta Deprecated in 5.13 Replaced by: |
|
No |
Yes |
Admin Only Deprecated in 5.6. |
|
Yes |
Yes |
Deprecated in 5.21. |
|
No |
Yes |
Deprecated in 5.23. |
|
No |
Yes |
Admin Only Deprecated in 5.23 |
|
Yes |
Yes |
Admin Only Deprecated in 5.9 |
|
Yes |
Yes |
Admin Only Deprecated in 5.9 |
List of removed procedures
Several procedures were removed with the release of Neo4j. They were functionally replaced by Cypher commands or different procedures.
See all procedures removed in Neo4j 5.0 and their replacements
Name | Community Edition | Enterprise Edition | Replaced by |
---|---|---|---|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
Yes |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
Yes |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|
|
No |
Yes |
|