Reputation: 241
How do you execute a saved (shared) graphDB-SPARQL-Query with curl?
$ curl http://192.168.188.23:7200/repositories/01?savedQueryName=myquery
does not work, graphdb asks for the query (Missing parameter: query)
thank you for your efforts
Upvotes: 2
Views: 734
Reputation: 2601
Queries are saved per Workbench instance, not per GraphDB repository.
So you also need to set the default repo, so that GDB query knows against which repo to run the query. See
curl -X POST <base_url>/rest/locations/default-repository -H 'Content-Type:application/json' -d '
{
"repository": "<repo_id>"
}'
mr_sol, what exactly doesn't work for you?
Upvotes: 0
Reputation: 1142
The REST API for the saved queries is GET /rest/sparql/saved-queries. Your request should look like this.
curl http://localhost:7200/rest/sparql/saved-queries?name=myquery
You can check all endpoints at /webapi in the Workbench.
Upvotes: 1