Using the GraphDB REST API

The Workbench REST API can be used to automate various tasks without having to open the Workbench in a browser and doing them manually.

You can find more information about each REST API functionality group and its operations under Help ‣ REST API Documentation in the Workbench, as well as execute them directly from there and see the results.


Click on a functionality group to expand it and see the operations it includes. Click on an operation to see details about it.


The REST API calls fall into the below major categories.

Cluster group controller


This feature requires a GraphDB Enterprise license.

Use the cluster group controller API to create a cluster, view its configuration, monitor the status of both the cluster group and each of its nodes, as well as to delete the cluster.

See these cURL examples for cluster group management.

Data import

Use the data import API to import data in GraphDB. You can choose between server files and a remote URL.

See these cURL examples for data import.

Location management

Use the location management API to attach, edit, or detach locations.

See these cURL examples for location management.

Repository management

Use the repository management API to add, edit, or remove a repository to/from any attached location. Unlike the RDF4J API, you can work with multiple remote locations from a single access point. When combined with the location management, it can be used to automate the creation of multiple repositories across your network.

See these cURL examples for repository management.

Saved queries

Use the saved queries API to create, edit or remove saved queries. It is a convenient way to automate the creation of saved queries that are important to your project.

See these cURL examples for saved queries.

Security management

Use the security management API to enable or disable security and free access, as well as add, edit, or remove users, thus integrating the Workbench security into an existing system.

See these cURL examples for security management.

SPARQL templates

Use the SPARQL template management API to create, edit, delete, and execute SPARQL templates, as well as to view all templates and their configuration.

See these cURL examples for SPARQL template management.

SQL views management

Use the SQL views management API to access, create, and edit SQL views (tables), as well as to delete existing saved queries and view all SQL views for the active repository.

See these cURL examples for SQL views management.


Use this login REST API endpoint to obtain a GDB token in exchange for username and password.

See this cURL example for authentication.


The GraphDB REST API currently exposes four endpoints suitable for scraping by Prometheus. See here the metrics that can be monitored, as well as how to configure the Prometheus scrapers.

Cluster monitoring

Use the cluster statistics monitoring API to diagnose problems and cluster slow-downs more easily.

See this cURL example for cluster monitoring.

Infrastructure statistics monitoring

Use the infrastructure statistics monitoring API to monitor GraphDB’s infrastructure so as to have better visibility of the hardware resources usage.

See this cURL example for infrastructure statistics monitoring.

Repository monitoring

Use the repository monitoring API to monitor query and transactions statistics in order to obtain a better understanding of the slow queries, suboptimal queries, active transactions, and open connections.

See this cURL example for repository monitoring.

Repository validation

Use the repository validation API to trigger bulk validation on the repository.

See this cURL example for repository SHACL validation.

GraphDB structures monitoring

Use the GraphDB structures monitoring API to monitor GraphDB structures – the global page cache and the entity pool, in order to get a better understanding of whether the current GraphDB configuration is optimal for your specific use case.

See this cURL example for structures statistics monitoring.