Configuration API

Update database connection

It stores the configuration of a database; if the database doesn't exist it is created

PUT/rest/configuration/connections/databases/databaseID
 Query parameters  none
 Header
  • auth-token: token from authentication
  • Content-Type: application/json
 Header/Parameter  tenant
 Body DatabaseDescriptor
Returns {"success" : "true"} or {"success" : "false"}
Required role MWP_ADMIN
Managed errors 401: insufficient privileges

Example request

curl -X PUT 'http://localhost:8080/mwp/rest/configuration/connections/databases/localhost-h2' -H 'Content-Type: application/json' -H 'auth-token: 4dbd0d4f-9f44-41ab-ba68-3a51f7fd834a.local' -H 'tenant:default' -d '{"jdbcConnectionString":"jdbc:h2:tcp://localhost/~/test/test2","decryptedUsername":"user","decryptedPassword":"pass","vendor":"ORACLE", "name" : "localhost-h2"}'

{
 "jdbcConnectionString":"jdbc:h2:tcp://localhost/~/test/test2",
 "decryptedUsername":"user",
 "decryptedPassword":"pass",
 "vendor":"ORACLE",
 "name" : "localhost-h2"
}

Example response

{
"success":true
}