MXS-1779 Add REST-API documentation
This commit is contained in:
@ -575,3 +575,41 @@ contain any valid JSON value.
|
|||||||
Command with no output:
|
Command with no output:
|
||||||
|
|
||||||
`Status: 204 No Content`
|
`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": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user