28 Commits

Author SHA1 Message Date
Markus Mäkelä
985fea43a0 MXS-1220: Fix /sessions/ response documentation
The response body listed listener sessions when only client sessions are
listed.
2017-07-18 11:37:18 +03:00
Markus Mäkelä
f4dacff27c MXS-1300: Correct clear entry point documentation
Corrected the clear entry point documentation by changing the method from
POST to PUT. Fixed MaxCtrl to use the correct methods for set/clear.
2017-07-10 22:23:48 +03:00
Markus Mäkelä
35745ee925 MXS-1220: Add deletion of listeners
The listeners can now be deleted via the REST API. Documented the added
endpoint in the REST API documentation.
2017-07-10 22:23:46 +03:00
Markus Mäkelä
7e40c93cc4 MXS-1220: Add listener creation documentation
The documentation for creating listeners was not added.
2017-07-10 22:23:45 +03:00
Markus Mäkelä
e0076ca8a5 MXS-1220: Fix request methods for user creation
The creation of network users and enabling of UNIX accounts documented PUT
as the method for enabling them when the commands actually used POST.
2017-07-10 22:23:45 +03:00
Markus Mäkelä
c7b9b7ac4a MXS-1220: Unify resource member naming
All resoures now use the `state` member to describe their internal
state. This includes servers, services and monitors. This means that the
`status` keyword can be reserved for something else and it can be removed
until it is needed again.

Changed the module maturity field to `maturity` to better describe its
purpose.
2017-07-10 22:23:45 +03:00
Markus Mäkelä
a8bfdac49c MXS-1220: Use PUT to set/clear server
The correct method for set/clear endpoints is PUT, not POST, as the
resource always ends up in the desired state, regardless of its current
state.
2017-07-10 22:23:45 +03:00
Markus Mäkelä
f62e899b79 MXS-1220: Add missing start/stop documentation for service resources
The service resource start and stop endpoints weren't documented.
2017-07-10 22:23:44 +03:00
Markus Mäkelä
63d2eee0e3 MXS-1220: Add endpoint for set/clear of server status
The server status can now be manipulated via the REST API. Added tests for
the state manipulation. Fixed minor issues in related code.
2017-07-10 22:23:44 +03:00
Markus Mäkelä
27d8212c51 Fix typo in server resource
The 'statistics' was mistakenly written as 'statictics'.
2017-06-27 21:45:00 +03:00
Markus Mäkelä
e4a004097e MXS-1220: Add support for PATCH
The PATCH method should now be used instead the PUT method to update
resources.  As PUT request bodies should represent complete resources, the
use of PUT to update resources is no longer supported.

Altered tests to use PATCH instead of PUT for updating resources.
2017-06-05 13:37:08 +03:00
Markus Mäkelä
ba546fcd21 MXS-1220: Add execution of module commands to REST API
The module command self links now point to an endpoint that executes the
module command. Depending on the type of the module command, either a GET
or a POST request must be made.
2017-06-02 12:52:33 +03:00
Markus Mäkelä
c98f8369f2 MXS-1220: Remove redundant parameter documentation
As all requests support the only parameter `pretty`, there's no point in
documenting it separately for each resource.
2017-05-24 16:21:34 +03:00
Markus Mäkelä
43386333b3 MXS-1220: Add monitor POST documentation
The POST documentation for creation monitors was missing.
2017-05-24 16:21:34 +03:00
Markus Mäkelä
830e47bc8b MXS-1220: Update service resource documentation
Updated service resource documentation. Fixed a few minor typos also in
the server resource documentation.
2017-05-24 15:05:11 +03:00
Markus Mäkelä
9ccb54c107 MXS-1220: Update links in REST API documentation
Added missing v1 prefixes to links.
2017-05-24 15:05:11 +03:00
Markus Mäkelä
c54710cfaa MXS-1220: Update users resource documentation
Updated the users resource documentation.
2017-05-24 15:05:11 +03:00
Markus Mäkelä
3b8bda289e Update Resources-Session.md
Removed unimplemented features and updated response content.
2017-05-17 10:14:57 +03:00
Markus Mäkelä
f1c790db52 MXS-1220: Add logging priorities to logs resoure
The logging priorities can now be queried and altered.
2017-05-17 10:14:57 +03:00
Markus Mäkelä
05cb49d48a MXS-1220: Add error messages to bad request
Requests now contain a JSON API-conforming, human-readable error message.
2017-05-17 10:14:57 +03:00
Markus Mäkelä
ac29abd679 MXS-1220: Add support for X-HTTP-Method-Override
This header allows clients to override the request method to work around
client library limitations.
2017-05-17 10:14:57 +03:00
Markus Mäkelä
e01e4ee661 Update Resources-MaxScale.md
Updated the responses and added missing resources.
2017-05-17 10:14:56 +03:00
Markus Mäkelä
3b9f7a74b6 Update Resources-Monitor.md
Updated monitor resource documentation with new response output.

Added links to standard monitor parameters that can be modified.
2017-05-17 10:14:56 +03:00
Markus Mäkelä
e7a6aec010 Update Resources-Filter.md
Updated filter resource documentation with up-to-date request output.
2017-05-17 10:14:56 +03:00
Markus Mäkelä
b317f66335 MXS-1220: Update server resource documentation
Updated documentation with latest resource layouts. Expanded explanations
on how to modify the servers. Use the correct resource endpoints.
2017-05-14 10:07:09 +03:00
Markus Mäkelä
bcbff5da1b MXS-1220: Add POST and DELETE documentation for servers
Added POST and DELETE documentation on the servers resource. Also cleaned
up formatting.
2017-05-04 09:17:54 +03:00
Markus Mäkelä
c1a1f18d1a MXS-1220: Update server resource documentation
Updated server resource documentation with new output and updated
instructions on how to modify servers via the REST API.
2017-05-04 09:17:53 +03:00
Markus Makela
59e615eb3c Create initial REST API documentation
The Resources document lists all currently known resources and will be converted
to a list of separate resource documents once the individual resource documents
are done. The Headers and Response Codes document contains a list of request and
response headers and the HTTP return codes. This is a work in progress and will
be expanded upon.

Added initial versions of the filter, monitor, session and user resource
documents. These provide information about various parts of MaxScale and
allow interaction.

All PATCH operations expect a JSON Patch type document in the request
body. Examples modified accordingly.

Add MaxScale resource document which describes the resources that give the
global configuration options and show statistics.

The resources that link to other resources provide values as a list of
relative links. This reduces the amount of sent data when the client
doesn't require all parts of the resource.

Since the updating is not yet implement, it should be stated that the update API
will most likely be modified at some point.

The module resource is similar to `maxadmin show modules` and the log
resource contains status information about logs. The log resource also has
an "action" resource at `/maxscale/logs/flush` which flushes logs to disk
and rotates them.

Added start and stop entry points for services and monitors. Also added
missing service parameters to the list of parameters that can be updated.

The documentation lists listeners as a sub-resource of the
service. This allows the listeners of a particular service to be queried.
2016-11-07 14:20:44 +02:00