Creating KeysThe 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:http://localhost/s3db/apilogin.php?username=hdeus&password=xxxxxxxxx&format=html 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 http://localhost/s3db/S3QL.php?key=ffas4qJsd3dj3 Performing QueriesThe 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:
1. Build a query using the XML template: 2. Call the query using the URL + S3QL.phpOR http://localhost/s3db/S3QL.php?query=http://myserver/query.xml 3. Choose the format in which the output should be returned and add it as an extra argument: Ex: Accepted formats include:
Syntax and LibrariesSee also the API Syntax section and the Libraries for S3DB section for live examples and code. |