Configuration API
Create Database Connection
It stores the configuration of a database; if the database doesn't exist it is created
POST/rest/configuration/connections/databases
| Query parameters | none |
| Header |
|
| Header/Parameter | tenant |
| Body | DatabaseDescriptor |
| Returns | {"success" : "true"} or {"success" : "false"} |
| Required role | MWP_ADMIN |
| Managed errors | 401: insufficient privileges |
Example request
curl 'http://localhost:8080/mwp/rest/configuration/connections/databases' -H 'Content-Type: application/json' -H 'auth-token: 4dbd0d4f-9f44-41ab-ba68-3a51f7fd834a.local' -H 'tenant:default' -d '{"jdbcConnectionString":"jdbc:h2:tcp://localhost/~/test","decryptedUsername":"user","decryptedPassword":"pass","vendor":"ORACLE", "name" : "localhost-h2"}'
{
"jdbcConnectionString":"jdbc:h2:tcp://localhost/~/test",
"decryptedUsername":"user",
"decryptedPassword":"pass",
"vendor":"ORACLE",
"name" : "localhost-h2"
}
Example response
{
"success":true
}