Using the Workbench 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.

The REST API calls fall into these major categories:

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, activate, 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.

Authentication

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

See this cURL example for authentication.

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

_images/swagger.png

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

_images/swagger_API_call_details.png