Documentation‎ > ‎

API basics

Creating Keys

The S3DB API was built with the purpose of enabling queries on the data without leaving the programming enviroments where it's analysis takes place. Format of the query result can either be tab delimited, html table, etc (see formats section) and the output can be displayed in any browser. To use the S3DB API (S3QL) create a key through the interface or by calling the apilogin function:


This query returns a key, which is temporary and becomes a surrogate for the user who created it. You can also any of the keys you specified in the webInterface.

Any query can then be formulated using the URI of the local S3DB and calling the file S3QL.php


Performing Queries

The S3DB API protocol (S3QL) was designed to be as close to regular SQL as possible. In order to make use of the S3DB API for performing a query, the following elements are required:

  • the URL where S3DB is installed (if in a local computer, this would be something like http://localhost/s3db)
  • a key created through the interface (My Account -> Access keys)

1. Build a query using the XML template:

Basic Select Query

<?xml version="1.0"?>
<select> ... </select>
<from> ... </from>
2. Call the query using the URL + S3QL.php


Call the query from a remote online xml file:


3. Choose the format in which the output should be returned and add it as an extra argument:

Accepted formats include:
  • xml
  • rdf
  • html
  • tab
  • json
  • php

Syntax and Libraries

See also the API Syntax section and the Libraries for S3DB section for live examples and code.

Lena Deus,
Jun 4, 2008, 7:55 AM