MXS-1779 Add REST-API documentation

This commit is contained in:
Johan Wikman
2018-10-30 12:06:55 +02:00
parent 3b4fa6bd56
commit 868c6c4e4b

View File

@ -575,3 +575,41 @@ contain any valid JSON value.
Command with no output:
`Status: 204 No Content`
## Classify a statement
```
GET /v1/maxscale/query_classifier/classify?sql=<statement>
```
Classify provided statement and return the result.
#### Response
`Status: 200 OK`
```
GET /v1/maxscale/query_classifier/classify?sql=SELECT+1
```
```javascript
{
"links": {
"self": "http://localhost:8989/v1/maxscale/query_classifier/classify"
},
"data": {
"id": "classify",
"type": "classify",
"attributes": {
"parameters": {
"parse_result": "QC_QUERY_PARSED",
"type_mask": "QUERY_TYPE_READ",
"operation": "QUERY_OP_SELECT",
"has_where_clause": false,
"fields": [],
"functions": []
}
}
}
}
```