Additional Endpoints
Query UI (/ui
)
Tentris' web UI for querying, which is based on Yasgui.
Login UI (/login
)
If auth is enabled in the configuration file users need to log in to run queries or updates.
⚠️ Warning: When using plain HTTP (not HTTPS) all communication occurs in plain text. This also applies to your username and password.
Login in the Browser
The Query Web UI automatically shows the login UI, if there are not any stored sessions.
The user can be changed in the /login
page.
Login on the Terminal
curl
can be used to log in via the terminal.
curl -c "/tmp/my-cookie" \
--data "username=YOUR_USERNAME&password=YOUR_PASSWORD" http://localhost:9080/login
After logging in, you need to send the cookie you received to the server every time you want to issue a query (with
-b
).
curl -b "/tmp/my-cookie" -H "Content-Type: application/sparql-query" \
--data "SELECT (COUNT(*) AS ?c) WHERE { ?s ?p ?o }" http://localhost:9080/sparql
Info Endpoint (/info
)
Tentris exposes version information about itself and its core components (rdf4cpp, libtentris, hypertrie).
The endpoint's supported formats include application/turtle
, application/ld+json
, and application/rdf+xml
.
Usage
The endpoint is intended to be used by an RDF-enabled application. To retrieve Tentris' version information, you can use
curl
and jq
.
curl -sL -H "Accept: application/ld+json" http://localhost:8080/info | jq -r '.["@graph"][] | select(."spdx:name" == "tentrisdb") | ."spdx:packageVersion"'
Similarly, the version of a single component can be retrieved (e.g., libtentris, rdf4cpp, hypertrie).
curl -sL -H "Accept: application/ld+json" http://localhost:8080/info | jq -r '.["@graph"][] | select(."spdx:from"."spdx:name" == "libtentris") | ."spdx:from"."spdx-software:packageVersion"'
Note: The info endpoint exposes only versions of core components. A complete list of Tentris' third-party components is available via a subcommand of the binary.
tentris thirdparty