pgweb/API.md
Dan Sosedoff 7317bc2f7d README
2014-10-10 21:06:08 -05:00

484 B

API

Get current database tables:

GET /tables

Get table details:

GET /tables/:name

Execute select query:

POST /select?query=SQL
 GET /select?query=SQL

Response formats

Successful response:

{
  "columns": [
    "column_name1",
    "column_name2",
    "column_name3"
  ],
  "rows": [
    [
      "column 1 value",
      "column 2 value",
      "column 3 value" 
    ]
  ]
}

Error response:

{
  "error": "Error message"
}