I have a graphDB instance running on a VPS and i want to get the list of Organisations with hasUnit relation. The following query executes fine on the SPARQL execution page:
PREFIX org: <http://www.w3.org/ns/org#>
SELECT (?s AS ?Organization) (COUNT(?o) AS ?Count)
WHERE{
?s org:hasUnit ?o .
} GROUP BY ?s
but when i try to get the results using the REST interface i get an error "MALFORMED QUERY: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'org:hasUnit' uses an undefined prefix"
here is my request uri:
http://23.101.230.37:7200/repositories/CSIRO?query= SELECT (?s AS ?Organization) (COUNT(?o) AS ?Count) WHERE{
?s org:hasUnit ?o . } GROUP BY ?s
The following query executes fine though:
http://23.101.230.37:7200/repositories/CSIRO?query= SELECT (?s AS ?Organization) (COUNT(?o) AS ?Count) WHERE{
?s ?p ?o . } GROUP BY ?s