HTTP API Reference
SQL Resource Methods
- The HTTP verison is 1.1
- Some methods accept XML (Content-Type: application/xml), JSON (Content-Type: application/json) or URL Encoded Params (Content-Type: application/x-www-form-urlencoded)
- All methods return XML (use Accept: application/xml) or JSON (use Accept: application/json). Alternatively the
_output query parameter may be used to specify the media type. See Media Types for more discussion.
- A no-cache directive (Cache-Control: no-cache, no-transform) is returned in responses by default. See HTTP Configuration for more detail.
- Normal responses are 200 OK, invalid requests are 4xx and SQL errors are 500 - See HTTP Status Codes for more detail
| Method |
Path |
Request Body |
Description |
Detail |
| GET |
/res/{resName}/{resId} |
|
Returns row matching path parameters |
ResGetPath |
| GET |
/res/{resName}?{name}={value} |
|
Returns rows matching query parameters |
ResGetQuery |
| POST |
/res/{resName} |
URL Enc |
Inserts row |
ResPostUrlEnc |
| POST |
/res/{resName} |
XML or JSON |
Inserts rows |
ResPostXmlOrJson |
| POST |
/res/{resName}/{resId} |
XML or JSON |
Inserts children rows for parent matching path parameters |
ResPostPathXmlOrJson |
| PUT |
/res/{resName} |
XML or JSON |
Updates rows |
ResPutXmlOrJson |
| PUT |
/res/{resName}/{resId} |
URL Enc |
Updates row matching path parameters |
ResPutPathUrlEnc |
| PUT |
/res/{resName}/{resId} |
XML or JSON |
Updates children rows for parent matching path parameters |
ResPutPathXmlOrJson |
| PUT |
/res/{resName}?{name}={value} |
URL Enc |
Updates rows matching query parameters |
ResPutQueryUrlEnc |
| DELETE |
/res/{resName} |
XML or JSON |
Deletes rows |
ResDeleteXmlOrJson |
| DELETE |
/res/{resName}/{resId} |
|
Deletes row matching path parameters |
ResDeletePath |
| DELETE |
/res/{resName}/{resId} |
XML or JSON |
Deletes children rows for parent matching path parameters |
ResDeletePathXmlOrJson |
| DELETE |
/res/{resName}?{name}={value} |
|
Deletes rows matching query parameters |
ResDeleteQuery |
Support Methods
| GET |
/res |
Returns listing all SQL Resources and links for each to limited query, definition and metadata as HTML |
| GET |
/wadl |
Returns restSQL WADL as XML with XSLT style sheet |
Configuration Methods
| GET |
/conf/system |
Returns general framework configuration in structured text |
| GET |
/conf/log |
Returns logging configuration in structured text |
| GET |
/conf/security |
Returns security configuration, currently the privileges for authorization, in structured text |
| GET |
/conf/definition/{resName} |
Returns SQL Resource definition (from user-provided XML file) |
| GET |
/conf/metadata/{resName} |
Returns SQL Resource metadata as understood by restSQL |
| GET |
/conf/reload/{resName} |
Reloads SQL Resource definition (from user-provided XML file) |
Logs and Statistics Methods
| GET |
/log |
Returns browsable list of current and rollover access, error and trace log files, if any |
| GET |
/log/access |
Returns current access log content |
| GET |
/log/error |
Returns current error log content |
| GET |
/log/trace |
Returns current trace log content |
| GET |
/log/trace |
Returns current internal log content |
| GET |
/stats |
Returns summary statistics such as number of requests, errors and average response times in structured text |
The complete interface is also provided in the form of WADL (Web Application Description Language), a W3C Submission.