Copy Calc Script
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/scripts/scriptops/copy
Copies the script in the specified application and database and returns the created script. Applicable only for calculation scripts.
Request
- application/json
- application/xml
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
Script copy details.
object
-
from(required):
string
Script's original name.
-
to(required):
string
Script's new name.
Response
- application/json
- application/xml
200 Response
OK
Script copied successfully, including script details and links to get, edit, or delete the script and to get its contents.
400 Response
Bad Request
Failed to copy the script. The application, database, or script name may be incorrect, or the specified script name may already exist.
415 Response
Not Acceptable
The media type isn't supported or wasn't specified.
500 Response
Internal Server Error.
Examples
The following example shows how to copy an Essbase calculation script.
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 POST "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/scriptops/copy?links=none" -H "Accept: application/json" -H "Content-Type:application/json" -d '{"from": "svProductMarketTuples", "to": "svProductMarketTuplesNew" }' -u %User%:%Password%
Example of Response Body
{
"name" : "svProductMarketTuplesNew",
"modifiedTime" : 1718724319362,
"sizeInBytes" : 93
}