How to query SOLID server using GET requests and the SPARQL protocol?


Hi everyone!!
I read in the Solid HTTPS REST API Spec that by means of GET requests using the SPARQL protocol you can run queries on the server, but I can’t get any results. The GET request I’m sending is:*%20WHERE%20{%20%3Fs%20%3Fp%20%3Fo%20.%20}
It should returns me my name but it returns me the complete content of the card.

Does anyone know why this happens?
Thanks in advance!!! :blush::blush:


Could this discussion help you ?


Oww thanks a lot!! I didn’t see that issue :sweat_smile::sweat_smile:


SPARQL querying can be done on Solid pods from the client side. The Comunica engine is 1.1. compliant but you’d need to build something on top of it to use it. rdflib handles a subset of SPARQL 1.1. RDF-easy provides a light layer on top of rdflib and lets you so things like

  // log the urls and sizes of all files in a container                                                  
  let files = await rdfEasy.query( containerURI,
   `SELECT ?url ?size WHERE {
      <> ldp:contains ?url.
      ?url stat:size ?size.
  for(var f of files){ console.log(f.url,f.size) }


All right, I’ll try it. Right now I’m using your sparql-fiddle API, its great!!!