Update Global Connection

put

/connections/{connectionName}

Updates the named global connection. If the update is successful, returns details about the updated connection. type is a required input for all types of connections. Other required inputs differ based on the type of the connection.

Request

Path Parameters
Back to Top

Response

200 Response

OK

Connection updated successfully.

400 Response

Bad Request

Failed to update connection.

Back to Top

Examples

The following example shows how to update an existing global connection.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

Script with cURL Command

call properties.bat
curl -X PUT "https://myserver.example.com:9001/essbase/rest/v1/connections/oraConn" -H Accept:application/json -H Content-Type:application/json --data "@./conn_details.json" -u %User%:%Password%

The cURL example above delivers a JSON payload in conn_details.json. The details you need to include in the payload depend on what kind of connection you are updating. The example below is for updating an Oracle Database connection.

Sample JSON Payload - Oracle Database

The following sample JSON payload, passed to REST API in conn_details.json, is an example for updating a connection to Oracle Database. The required parameters are name, type, subtype, host, port, service (OR sid), user, and password.

{
  "name" : "oraConn",
  "type" : "DB",
  "subtype" : "ORACLE",
  "host" : "dbhostname.example.com",
  "port" : 1521,
  "user" : "essbase",
  "password" : "cGE1NXdvcmQx",
  "sid" : "orcl"
}

For more examples of JSON payloads you can use to test, update, and create connections to sources supported by Essbase, see the Create Connection endpoint.

Example of Response Body - Oracle Database Connection

The following example shows the contents of the response body in JSON format, if the connection updated is to Oracle Database.

{
  "name" : "oraConn",
  "description" : "Oracle Database connection",
  "type" : "DB",
  "subtype" : "ORACLE",
  "minPoolSize" : 5,
  "maxPoolSize" : 50,
  "host" : "dbhostname.example.com",
  "port" : 1521,
  "user" : "essbase",
  "sid" : "orcl",
  "links" : [ ]
}
Back to Top