Rename Database
/applications/{applicationName}/databases/actions/rename
Renames a database. You must provide the source application name, and the source and destination database names. Destination application name is not required.
Request
-
applicationName(required):
Source application name.
Response
200 Response
OK
Database renamed successfully.
400 Response
Bad Request
Failed to rename database.
500 Response
Internal Server Error.
Examples
The following example shows how to rename a database (cube) using the Essbase REST API.
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
Supply the source application name as a path parameter, and the source and destination cube names in the body.
call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/MyApp/databases/actions/rename -H "Accept: application/json" -H "Content-Type: application/json" -d '{"from": "Basic", "to": "MyBasic"}' -u %User%:%Password%Example of Response
A response is returned if there is an error; for example,
{
"errorMessage" : "Database \"Basic\" does not exist.",
"errorCode" : 1051032
}