HTTP API SQLite Access


#1

Four query API calls are provided as part of the SQLite Access API. The calls all return JSON formatted data for easy processing.

Table Exists
To query to ensure that a given table exists:
http://localhost:25000/dbquery?table=table_name&tableExists&webauth=webauth_value

This will return a JSON object:

{ 
    "table": {  
        "table_name": "tableName",  
        "exists": true  
    }  
}

Retrieve Keys from Table
To fetch the keys from a given table:
http://localhost:25000/dbquery?table=table_name&getKeys&webauth=webauth_value

This will return a JSON object:

{  
    "table": {  
        "table_name": "tableName",  
        "keylist": [  
            {  
                "key": "keyString"  
            }  
        ]  
    }  
}  

Check for Existence of Key
To verify that a key exists in a given table:
http://localhost:25000/dbquery?table=table_name&keyExists=key&webauth=webauth_value

This will return a JSON object:

{  
    "table": {  
        "table_name": "tableName",  
        "key": "keyString",  
        "keyExists": true  
    }  
}  

Retrieve Data by Key
To retrieve data related to a key:
http://localhost:25000/dbquery?table=table_name&getData=key&webauth=webauth_value
This will return a JSON object:

{  
    "table": {  
        "table_name": "tableName",  
        "key": "keyString",  
        "value": "valueString"  
    }  
}  

Error
If an error occurs, a JSON object is returned:

{  
    "error": "error message"
}  

Intergrations? (Website)
In need of Better encoding support for HttpRequest
Two suggestions to make custom commands/APIs work better