%META:TOPICPARENT{name="InteractiveSparqlQueryBuilderOverview"}% ---+ iSPARQL REST Mode Support Virtuoso iSPARQL endpoint can be accessed via REST using <code><nowiki>http://host:port/isparql/view/</nowiki></code> (e.g., OpenLink's Virtuoso Demo site iSPARQL endpoint, <code>[[http://demo.openlinksw.com/isparql][http://demo.openlinksw.com/isparql]]</code>), with the following parameters: * <strong><code>format</code></strong>: specifies the request format (set by default to "<code>application/rdf+xml</code>"). * <strong><code>defaultGraph</code></strong>: used as <code>FROM</code>, if not specified in query * <strong><code>query</code></strong>: the SPARQL query * <strong><code>named-graph-uri</code></strong>: used for named graphs, can be specified multiple times * <strong><code>maxrows</code></strong>: specifies limit on the results * <strong><code>sponge</code></strong>: specifies sponger cache behavior * <strong><code>endpoint</code></strong>: specifies sparql endpoint * <strong><code>file</code></strong>: <code>.isparql</code>, <code>.ldr</code>, and <code>.rq</code> resources ---+++Example 1 Get 10 triples from demo Dataspace: <verbatim> SELECT * FROM <http://demo.openlinksw.com/dataspace> WHERE {?s ?p ?o} LIMIT 10 </verbatim> 1. Load this URL in your browser: <verbatim> http://demo.openlinksw.com/isparql/view/?query=SELECT%20*%20%0AFROM%20%3Chttp%3A%2F%2Fdemo.openlinksw.com%2Fdataspace%3E%0AWHERE%20%7B%3Fs%20%3Fp%20%3Fo%7D%0ALIMIT%2010&endpoint=/sparql&maxrows=50&default-graph-uri= </verbatim> 1. As a result, the triples found will be shown: %BR%%BR%<img src="%ATTACHURLPATH%/sp1.png" style="wikiautogen"/>%BR%%BR% ---+++Example 2 Get 10 Weblog posts: <verbatim> prefix sioc: <http://rdfs.org/sioc/ns#> prefix sioct: <http://rdfs.org/sioc/types#> prefix dct: <http://purl.org/dc/elements/1.1/> prefix dcc: <http://purl.org/dc/terms/> SELECT DISTINCT ?forum_name, ?post, ?title ?cr ?url FROM <http://demo.openlinksw.com/dataspace> WHERE { ?forum a sioct:Weblog . ?forum sioc:id ?forum_name . ?forum sioc:container_of ?post . OPTIONAL { ?post dct:title ?title } . OPTIONAL { ?post dcc:created ?cr } . OPTIONAL { ?post sioc:link ?url } . } ORDER BY DESC (?cr) LIMIT 10 </verbatim> 1. Load this URL in your browser: <verbatim> http://demo.openlinksw.com/isparql/view/?query=prefix%20sioc%3A%20%3Chttp%3A%2F%2Frdfs.org%2Fsioc%2Fns%23%3E%20%0Aprefix%20sioct%3A%20%3Chttp%3A%2F%2Frdfs.org%2Fsioc%2Ftypes%23%3E%0Aprefix%20dct%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0Aprefix%20dcc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%20%0ASELECT%20DISTINCT%20%3Fforum_name%20%3Fpost%20%3Ftitle%20%3Fcr%20%3Furl%20%0AFROM%20%3Chttp%3A%2F%2Fdemo.openlinksw.com%2Fdataspace%3E%0AWHERE%20%20%20%20%0A%20%20%7B%20%0A%20%20%20%20%3Fforum%20a%20sioct%3AWeblog%20.%0A%20%20%20%20%3Fforum%20sioc%3Aid%20%3Fforum_name%20.%0A%20%20%20%20%3Fforum%20sioc%3Acontainer_of%20%3Fpost%20.%0A%20%20%20%20OPTIONAL%20%7B%20%3Fpost%20dct%3Atitle%20%3Ftitle%20%7D%20.%0A%20%20%20%20OPTIONAL%20%7B%20%3Fpost%20dcc%3Acreated%20%3Fcr%20%7D%20.%0A%20%20%20%20OPTIONAL%20%7B%20%3Fpost%20sioc%3Alink%20%3Furl%20%7D%20.%0A%20%20%7D%0AORDER%20BY%20DESC%20(%3Fcr)%0ALIMIT%2010&endpoint=/sparql&maxrows=50&default-graph-uri= </verbatim> 1. As a result, the triples found will be shown: %BR%%BR%<img src="%ATTACHURLPATH%/sp2.png" style="wikiautogen"/> ---+++See Also * [[InteractiveSparqlQueryBuilderOverview][iSPARQL Overview]] * [[InteractiveSparqlQueryBuilderBasicTutorial1][Basic iSPARQL Tutorial with query built from a blank canvas and pre-typed Nodes]] * [[InteractiveSparqlQueryBuilderBasicTutorial2][Basic iSPARQL Tutorial with query built from a blank canvas and Nodes dragged from the Toolbar]] * [[InteractiveSparqlQueryBuilderBasicTutorial][Basic iSPARQL Tutorial]] * [[InteractiveSparqlQueryBuilderQueryTutorialConstruct][iSPARQL Querying Tutorial with SPARQL Query type "CONSTRUCT"]] * [[InteractiveSparqlQueryBuilderQueryTutorialDescribe][iSPARQL Querying Tutorial with SPARQL Query type "DESCRIBE"]] * [[InteractiveSparqlQueryBuilderQueryTutorialInsert][iSPARQL Querying Tutorial with SPARQL Query type "INSERT"]] * [[InteractiveSparqlQueryBuilderQueryTutorialDelete][iSPARQL Querying Tutorial with SPARQL Query type "DELETE"]] * [[InteractiveSparqlQueryBuilderQueryTutorialSlc][iSPARQL Querying Tutorial with SPARQL Query type "SELECT"]] CategorySPARQL CategoryRDF CategoryOpenSource CategoryOAT CategoryDocumentation CategoryWebSite