Zitgist Logo  
upper left corner gradient
List of UMBEL Web Services    Invoke this Web Service    Short Description of this Web Service    Access this Web Service
API and Documentation

SPARQL Endpoint Web Service API Documentation






For background, we suggest first reading the about section for this Web Service. Also, you may want to consult this document for an overall discussion of API design and philosophy.

Developers communicate with the SPARQL Endpoint Zitgist UMBEL Web service using the HTTP GET method. You may request one of the following mime types: (1) application/sparql-results+xml, (2) application/sparql-results+json, (3) text/html , (4) application/rdf+xml and (5) application/rdf+n3. The content returned by the Web service will be serialized using the mime type requested and the data returned will depend on the parameters selected.

Note: The SPARQL Endpoint Web service is limited to returning a maximum of 100 results in the free online version.


Web Service Endpoint Information

Here is the information needed to communicate with this Web service's endpoint. Descriptions of the parameters are included below.

Note: if a parameter has a default value, the requester can omit it and the default value will be used. Also, some baseline UMBEL Web services may not offer other values than the default.

HTTP Method:
  • GET

Possible "Accept:" HTTP header field value:
URI:
  • http://umbel.zitgist.com/ws/sparql/
    ?graph=param1&version=param2&query=param3&lang=param4


URI dynamic parameters description:

Note: All parameters have to be URL-encoded
  • param1. One of:
    • " http://umbel.org/umbel/sc/v071/ (default)": Graph where the
      subject concepts and abstract concepts are described
    • " http://umbel.org/umbel/ne/v071/": Graph where the named entities
      are described
    • " http://umbel.org/umbel/v071/": Graph where the UMBEL ontology
      classes and properties are described
  • param2. The UMBEL version to query; One of:
    • 071 (default). UMBEL version 0.71
  • param3. The url-encoded SPARL query without the "sparql" begenning
    keyword
  • param4. One of:
    • " en (default)": Labels of resultsets in English if available

Example of Returned XML Document

This is an example of the XML document returned by this Web service endpoint for a given SPARQL query.


Query:
  • http://umbel.zitgist.com/new/ws/sparql/?
    graph=http%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2Fv071%2F&version=071&
    query=select+%2A+from+%3Chttp%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2Fv071
    %2F%3E+where+%7B%3Fs+%3Fp+%3Fo.%7D%20LIMIT%201
"Accept:" HTTP header field value:
  • application/sparql-results+xml

Result:
  1. <?xml version="1.0" ?>
  2. <sparql xmlns="http://www.w3.org/2005/sparql-results#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/2001/sw/DataAccess/rf1/result2.xsd">
  3.  <head>
  4.   <variable name="s"/>
  5.   <variable name="p"/>
  6.   <variable name="o"/>
  7.  </head>
  8.  <results distinct="false" ordered="true">
  9.   <result>
  10.    <binding name="s"><uri>
    http://umbel.org/umbel/ac/AbductiveInferenceProcess</uri></binding>
  11.    <binding name="p"><uri>
    http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri></binding>
  12.    <binding name="o"><uri>
    http://umbel.org/umbel#AbstractConcept</uri></binding>
  13.   </result>
  14.  </results>
  15. </sparql>

Example of Returned JSON Document

This is an example of the JSON document returned by this Web service endpoint for a given SPARQL query.


Query:
  • http://umbel.zitgist.com/new/ws/sparql/?
    graph=http%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2F&version=071&
    query=select+%2A+from+%3Chttp%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2Fv071
    %2F%3E+where+%7B%3Fs+%3Fp+%3Fo.%7D%20LIMIT%201
"Accept:" HTTP header field value:
  • application/sparql-results+json

Result:
  1. { "head": { "link": [], "vars": ["s", "p", "o"] },
  2.   "results": { "distinct": false, "ordered": true, "bindings": [
  3.     { "s": { "type": "uri", "value":
    "http://umbel.org/umbel/ac/AbductiveInferenceProcess" }    ,
    "p": { "type": "uri", "value":
    "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" }    ,
    "o": { "type": "uri", "value":
    "http://umbel.org/umbel#AbstractConcept" }} ] } }

Example of Returned HTML Document

This is an example of the HTML document returned by this Web service endpoint for a given SPARQL query.


Query:
  • http://umbel.zitgist.com/new/ws/sparql/?
    graph=http%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2F&version=071&
    query=select+%2A+from+%3Chttp%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2Fv071
    %2F%3E+where+%7B%3Fs+%3Fp+%3Fo.%7D%20LIMIT%201
"Accept:" HTTP header field value:
  • text/html

Result:
  1. <table class="sparql" border="1">
  2.   <tr>
  3.     <th>s</th>
  4.     <th>p</th>
  5.     <th>o</th>
  6.   </tr>
  7.   <tr>
  8.     <td>http://umbel.org/umbel/ac/AbductiveInferenceProcess</td>
  9.     <td>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</td>
  10.     <td>http://umbel.org/umbel#AbstractConcept</td>
  11.   </tr>

Example of Returned RDF/N3 Document

Here is an example of a RDF/N3 document returned by this Web service endpoint for a given URI. This example returns a list of UMBEL named entities where the preferred label matches the example "madonna" search string.


Query:
  • http://umbel.zitgist.com/new/ws/sparql/?
    graph=http%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2F&version=071&
    query=select+%2A+from+%3Chttp%3A%2F%2Fumbel.org%2Fumbel%2Fsc%2Fv071
    %2F%3E+where+%7B%3Fs+%3Fp+%3Fo.%7D%20LIMIT%201
"Accept:" HTTP header field value:
  • application/rdf+n3

Result:
  1. @prefix res: <http://www.w3.org/2005/sparql-results#> .
  2. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
  3. [] rdf:type res:ResultSet ;
  4.   res:resultVariable "s" ;
  5.   res:resultVariable "p" ;
  6.   res:resultVariable "o" ;
  7.   res:solution [
  8.       res:binding [ res:variable "s" ; res:value
    <http://umbel.org/umbel/ac/AbductiveInferenceProcess>  ] ;
  9.       res:binding [ res:variable "p" ; res:value
    <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>  ] ;
  10.       res:binding [ res:variable "o" ; res:value
    <http://umbel.org/umbel#AbstractConcept>  ] ] .

HTTP Status Codes

Here are the possible HTTP status (error) codes returned by this Web service endpoint.

  • Code: 200
    • Message: OK
  • Code: 400
    • Message: Bad Request
    • Message description: No SPARQL query specified
  • Code: 406
    • Message: Not Acceptable
    • Message description: Unacceptable mime type requested
  • Code: 500
    • Message: Internal Error
upper right corner gradient