2

I am trying to retrieve all the statements from a named graph (the name is a URI) within a repository using the Graph Store HTTP Protocol. I am using version 8.10 GraphDB installation on Windows 10.

The installation reports the API's availability at: /repositories/{repositoryID}/rdf-graphs/{graph}

However, replacing {graph} with the URI leats to a report of No Handler Found error or a noslash error (if the URI is encoded).

I've tried unencoded URIs and encoded URIs. The referenced specification SPARQL 1.1 Graph Store HTTP Protocol suggests ?graph={graph} may be required but this also fails.

Some examples:

Unencoded

11:14:50.901 [http-nio-7200-exec-2] WARN o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /repositories/foodandwine/rdf-graphs/http://www.w3.org/TR/2003/PR-owl-guide-20031209/food]

Replacing ":" with %2e

11:14:59.583 [http-nio-7200-exec-10] WARN o.s.web.servlet.PageNotFound - No handler found for GET /repositories/foodandwine/rdf-graphs/http%3e//www.w3.org/TR/2003/PR-owl-guide-20031209/food

Replacing ":" with %2e and "/" with %2f

Message Invalid URI: noSlash

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

I am sure I've missed something very simple but a steer in the right direction would be greatly appreciated.

gbd
  • 31
  • 1
  • 1
    Did you check the RDF4J docs at https://rdf4j.eclipse.org/documentation/rest-api/#graph-store-support ? Suggest to use the `service?graph=` endpoint with a sutable `Accept` header e.g. something like: `curl -X GET --header 'Accept: application/rdf+xml' http://localhost:7200/repositories/test/rdf-graphs/service?graph=http%3A%2F%2Fbase.org%2Ftest` HTH – Damyan Ognyanov Jul 02 '19 at 05:09
  • Thank you for the link and suggestion. That solves it. I didn't spot the "service" endpoint path as it isn't listed in the built-in help on the REST APIs. – gbd Jul 02 '19 at 07:27

1 Answers1

0

As Damyan said, use a URL like this:

curl -X GET --header 'Accept: application/rdf+xml' http://localhost:7200/repositories/test/rdf-graphs/service?graph=http%3A%2F%2Fbase.org%2Ftest

Reposting his comment as answer, so this question doesn't appear again in [graphdb] answers:0

Vladimir Alexiev
  • 2,477
  • 1
  • 20
  • 31
  • I would make similar comments here as I did [here](https://stackoverflow.com/a/63950114). You have, again, made an answer that is less informative than the comment upon which it is based and added the extraneous text that someone else is going to have to just edit out. – Makyen Sep 18 '20 at 06:32