SQL API Usage

The SQL API is only available in the Enterprise Edition.

curl \\
  --data '{ "query": "select name, height_in_cm from characters" }' \\
  --header 'Content-Type: application/json' \\
  <http://localhost:4185/dbs/avatar_characters/sql>

yields:

{
  "rows": [
	  { "name": "Aang", "height_in_cm": 137 },
	  { "name": "Katara", "height_in_cm": 145 }
  ],
	"runtime": {
		"real": 0.000,
		"user": 0.000214,
		"sys": 0.000090
	}
}

Useful SQL Snippets