Create Shadow Application

post

/essbase/rest/v1/applications/actions/shadowCopy

Puts the specified primary application in read-only mode and creates a shadow application (a complete copy) out of the primary application.

A shadow application enables you to perform cube modifications and outline restructure on the shadow application, while the primary application serves read-only operations such as queries.

Permission required: power user.

Shadow applications are useful because an outline restructure can take a very long time, depending on the size of the application.

Instead of reporting users being blocked by the downtime due to restructure, a shadow solution helps them continue their read-only queries against the primary application, while the restructure is occurring on the shadow application.

Note that a shadow application can be made as hidden copy of the primary application.

This means if you invoke List Applications, you will not see the shadow application in that list.

The parameter waitForOngoingUpdatesInSecs allows you to control how long the copying process can wait, if there are any ongoing write-operations on the cubes(s) of this application at the time you are attempting to make a shadow copy.

For example, if there is a data load in progress, the cloning process fails.

If you specified waitForOngoingUpdatesInSecs as 60, Essbase waits up to one minute for the data load to complete before initiating a cloning process.

If the data load doesn't complete within this specified wait-interval, Essbase does not create the copy, the cloning process fails with an error, and the data load continues.

See Also

Request

Supported Media Types
Body ()

primaryAppName: Source application name which you intend to clone.

shadowAppName : Unique Destination or secondary application name which will be a copy of the source.

hideShadow: Specify true to hide the application; otherwise, specify false.

waitForOngoingUpdatesInSecs: Waiting period (in seconds) for any active write-operations to complete.

runInBackground: Specify true to schedule 'Shadow Copy' as a Job; otherwise, specify false.

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

Response

Supported Media Types

200 Response

OK

Shadow application created successfully.

400 Response

Bad Request

Failed to create shadow application.

500 Response

Internal Server Error.

503 Response

Service Unavailable

Naming exception or server exception.

Back to Top

Examples

The following example shows how to create a shadow application, using cURL to call 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/actions/shadowCopy" -H  "accept: application/json" -H  "Content-Type: application/json" -d '{"primaryAppName": "Sample_Dynamic", "shadowAppName": "SDShadow", "hideShadow": true, "waitForOngoingUpdatesInSecs": 5, "runInBackground": true}' -u %User%:%Password%

Example of Response Body

{
  "job_ID": 3,
  "appName": null,
  "dbName": null,
  "jobType": "Shadow Copy",
  "jobfileName": "Sample_Dynamic",
  "userName": "power",
  "startTime": 1602544274000,
  "endTime": 1602544274000,
  "statusCode": 100,
  "statusMessage": "In Progress",
  "jobInputInfo": {
    "primaryAppName": "Sample_Dynamic",
    "shadowAppName": "SDShadow",
    "hideShadow": true,
    "waitForOngoingUpdatesInSecs": 5
  },
  "jobOutputInfo": {
    "errorMessage": ""
  },
  "links": [
    {
      "rel": "self",
      "href": "https://myserver.example.com:9001/essbase/rest/v1/jobs",
      "method": "POST"
    },
    {
      "rel": "canonical",
      "href": "https://myserver.example.com:9001/essbase/rest/v1/jobs",
      "method": "POST"
    },
    {
      "rel": "Job Status",
      "href": "https://myserver.example.com:9001/essbase/rest/v1/jobs/3",
      "method": "GET"
    }
  ]
}
Back to Top