SQLiteDB. SQL Databases

The SQL databases as the name suggest allow API management using the SQL (Structured Query Language).

API URL

The API URL is individual for each database and can be found on the user dashboard. Usually it will look something like this:

http://sqlitedb.com/api/20180630065856012301

API Parameters


Parameter
Is it Required?
Description
api_key
required
This is the API Key for accessing the database. Can be found in the user dashbard
sql
required
This is the SQL query to be executed

API Response

The API will respond with a JSON string with the following attributes.


Attribute
Is it Always Send?
Description
status
always
Describes whether the request was successful or not. Possible values: error or success
message
always
A short free text message with description of the action taken
data
always
An array with variable data depending on the SQL query executed

Example API response:

{"status":"error","message":"API Key is invalid","data":[]}

Examples

- Create a new table:

https://sqlitedb.com/api/20180630065856012301?api_key=APIKEY&sql=CREATE TABLE "demo" ("Id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "FirstName" text NOT NULL, "LastName" text NOT NULL);

- Insert data into the table:

https://sqlitedb.com/api/20180630065856012301?api_key=APIKEY&sql=INSERT INTO demo (FirstName,LastName) VALUES (''Tom','Sawer')

- Retrieve the data from the table:

https://sqlitedb.com/api/20180630065856012301?api_key=APIKEY&sql=SELECT * FROM demo


PREVIEW