Copy Database
/essbase/rest/v1/applications/{applicationName}/databases/actions/copy
Copies an Essbase database (cube). You must provide the source and destination application and cube names. This operation is supported only for block storage cubes.
Request
- application/json
- application/xml
-
applicationName(required): string
Source application name.
Source and destination database information.
Response
- application/json
- application/xml
200 Response
OK
Database copied successfully.
400 Response
Bad Request
Failed to copy database.
500 Response
Internal Server Error.
Examples
The following example shows how to copy 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
Specifying an application in the to:
specification can be omitted if you are copying the cube within the same application.
call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/actions/copy -H "Accept: application/json" -H "Content-Type: application/json" -d '{"from": "Basic", "to": {"application": "MyApp", "database": "Basic"}}' -u %User%:%Password%
Example of Response
A response is returned if there is an error; for example,
{
"errorMessage" : "Operation not supported for aggregate storage applications",
"errorCode" : 1013292
}