Copy Calc Script

post

/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

Supported Media Types
Path Parameters
Body ()

Script copy details.

Root Schema : ScriptCopy
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK

Script copied successfully, including script details and links to get, edit, or delete the script and to get its contents.

Body ()
Root Schema : Script
Type: object
Show Source

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.

Back to Top

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
}
Back to Top