<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>SPARQList: Markdown-based highly configurable REST API hosting server for SPARQL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Toshiaki Katayama</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shuichi Kawashima</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Database Center for Life Science, Research Organization of Information and Systems</institution>
          ,
          <addr-line>178-4-4 Wakashiba, Kashiwa-shi, Chiba 277-0871</addr-line>
          ,
          <country country="JP">Japan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>SPARQList is a REST API server which executes a SPARQL query, transform the result into formatted data if defined, and then send it back to web client application. In SPARQList, the configuration of API is written in the Markdown format in which parameters of the API, SPARQL endpoints and SPARQL queries, and JavaScript functions for data transformation are defined along with a free text documentation. Each SPARQList server instance can host multiple API configurations, therefore, each service can also be considered as a repository of reusable SPARQL queries with documentation. The source code of the SPARQList is freely available at https://github.com/dbcls/sparqlist and can be easily deployed as it is implemented in the Node.js.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web</kwd>
        <kwd>SPARQL</kwd>
        <kwd>JavaScript</kwd>
        <kwd>Markdown</kwd>
        <kwd>REST API</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>Results</title>
      <p>SPARQL endpoint allows users to make arbitrary queries, however, it is also
demanded to provide REST APIs for frequently used typical queries or complex
queries to be executed instantly so that web applications can easily make use of the
semantic data. SPARQList is designed to provide such REST APIs with ease by (1)
introducing the Markdown format for describing the API, (2) provide a GUI Web
interface to create/copy/edit/delete/execute the API configuration, (3) transform the
SPARQL results into other format according to content negotiation by JavaScript.</p>
      <p>We developed a REST API server namely SPARQList which has a Web interface
to list, create, copy, edit, delete and execute “SPARQLet”, a definition of SPARQL
queries and data transformations described in a Markdown text. Fig 1 shows the Web
interface of SPARQList which provides (1) a list of SPARQLets, (2) a Markdown
editor for API configuration, (3) a formatted documentation and buttons to copy, edit,
delete the SPARQLet, (4) an interface to specify parameters and to execute the
SPARQLet which comes with a trace for debugging.</p>
      <p>Fig 1. Web interface of the SPARQList</p>
      <p>In the SPARQLet configuration (formatted in the Markdown), a service provider
can specify a title and a description of the API, arbitrary pairs of a SPARQL endpoint
and a SPARQL query template which can embed API parameters, and JavaScirpt
snippets for the purpose described below.</p>
      <p>Even though most SPARQL endpoints can return the results in the SPARQL 1.1
Query Results JSON Format (application/sparql-results+json), it is often preferable
for the Web client applications to consume formatted JSON (application/json) data or
other formats like a text or HTML. Therefore, a SPARQLet can store the SPARQL
results as variables and the JavaScript snippets embedded in the SPARQLet can make
use of them in combination to transform into any other format according to the
specified mime-type for content negotiation.</p>
      <p>% curl –H “Accept: application/json” http://ex.org/api/test?p=foo
% curl –H “Accept: text/plain” http://ex.org/api/test?p=foo
To make SPARQList APIs compatible with the smartAPI (http://smart-api.info/)
and promoting the FAIR principles [1], supporting JSON-LD (application/ld+json) is
planned. Note that, our separate open source product SPARQL-proxy, a cache server
for any SPARQL endpoint, can be used in combination to improve the response time
of repeated queries.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Wilkinson M.D.</surname>
          </string-name>
          et al.:
          <article-title>The FAIR Guiding Principles for scientific data management and stewardship</article-title>
          .
          <source>Sci. Data</source>
          .
          <volume>3</volume>
          ,
          <issue>160018</issue>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>