https://api.freedb.me
/db
Create a database
token
$ curl -x POST https://api.freedb.me/db # response: {"token": "abcdefg"}
/q
Query a database
token
: string, your tokenquery
: string, query to executeparams
: (optional) array, if query contains parameter placeholders (ie ?
) provide this array of parameters in order of placeholders.Basic query
$ curl -X POST -d '{"token": "your-token", "query": "INSERT INTO users (name) VALUES (\"ted\")"}' https://api.freedb.me/q # response: []
Parameterized query
$ curl -X POST -d '{"token": "your-token", "query": "SELECT * FROM users WHERE id = ?", "params": [1]}' https://api.freedb.me/q # response: [{"id":1,"name":"ted"}]