Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Docs Required
Description
Application developed in IGNITE-13712 should expose REST API for managing configuration and integrate with command-line tool prototype from IGNITE-13610.
The following simplistic API suggested:
GET to /management/v1/configuration - returns up-to-date configuration
POST to /management/v1/configuration - sets configuration from JSON passed in request's body
Example of reply to GET request:
{ "local": { "baseline": { "auto_adjust": { "enabled": true, "timeout": 10000 } }, "dataStorage": { "pageSize": 4096, "storagePath": "/db/", "walPath": "", "walMode": "LOG_ONLY" } }, "clusterWide": { "transactionConfiguration": { "defaultIsolation": "REPEATABLE_READ", "defaultConcurrency": "PESSIMISTIC", "defaultTimeout": 10_000 } } }
Examples of parameters of POST requests:
{ "local": { "baseline": { "auto_adjust": { "enabled": false } } }
{ "clusterWide": { "transactionConfiguration": { "defaultIsolation": "READ_COMMITTED", "defaultConcurrency": "OPTIMISTIC" } } }
In case of error (not recognizable string received, validation of configuration failed) service returns status code 500 and error message describing the situation:
{ "error": { "type": "VALIDATION_FAILED", "message": "Field X should not be negative" } }
OR
{ "error": { "type": "CONFIG_UNRECOGNIZED", "message": "Passed configuration is not recognized" } }
Attachments
Issue Links
- links to