Sending SPARQL queries to Fuseki

1k views Asked by At

I have queries like this.

SELECT * WHERE{
  SERVICE <endpoint 1>{
    SELECT ?country ?port
    WHERE {?port <country> ?country}
  }
  SERVICE <endpoint 2>{
    SELECT ?ship ?name ?country
    WHERE {?ship <flagoftheship> ?country.
      ?ship <vesselname> ?name
    }
  }
}

and i'm developing a frontend to send queries like that (can have several endpoints, the user may even provide it's own endpoint URL) to a Fuseki Server, i've been using the Fuseki frontend that hosts over port 3030 when you run the Server but i want to know how can i actually send those queries from my own app, do i need to execute a cmd command? (using a server that receives the query from the javascript app and then runs the command)

EDIT: pretty much i need to know what does the Fuseki frontend when you click the "play" button so that the server gets the query that you put in the textbox

1

There are 1 answers

0
chrisis On BEST ANSWER

Fuseki implements the SPARQL 1.1 Protocol which gives several ways of submitting a query to a SPARQL endpoint. The simplest is probably the HTTP GET with the query url-encoded as a parameter named query.