Copy ML POV Data

Copies model artifacts and data from a Source POV combination to a Destination POV combination for any application. Use with Management Ledger applications.

Required Roles

Service Administrator, Power User

REST Resource

POST /epm/rest/{api_version}/applications/{application}/povs/{srcPOVMemberGroup}/jobs/copyPOVJob/{destPOVMemberGroup}

Note:

Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for EPM Cloud REST APIs. Using this REST API requires prerequisites. See Prerequisites.

Request

Supported Media Types: application/json

The following table summarizes the client request.

Table 24-7 Parameters

Name Description Type Required Default
api_version Version of the API you are developing with Path Yes None
application Name of the application for which to deploy the cube Path Yes None
srcPOVMemberGroup Source POV member group, such as 2014_January_Actual Path Yes None
destPOVMemberGroup Destination POV member group, such as 2014_March_Actual Path Yes None
isManageRule Whether to copy the program rule details Payload Yes None
isInputData

Whether to copy input data

Note: Do not set the value of this parameter to true if the value of isAllData or isAllInputData is set to true.

Payload Yes None
modelViewName Whether to copy a slice of data from source POV to destination POV Payload No Nothing copied
isAllInputData Whether to copy all input data at the NoRule member, including AdjustmentIn/Out Form No False
isAllData Whether to copy all POV data Form No False
createDestPOV Whether to create the destination POV if it does not already exist Payload Yes None
nonEmptyTupleEnabled Specifies whether to enable the Non Empty Tuple (NET). Valid values are true and false. In some cases, the default nonEmptyTupleEnabled=true does not perform well when copying the Oracle Essbase data. In those cases, use nonEmptyTupleEnabled=false to improve performance. Payload No True
stringDelimiter String delimiter for POV group members Payload Yes None

Example URL and Payload

https://<BASE-URL>/epm/rest/v1/applications/LM1T2/povs/2014_January_Actual/jobs/copyPOVJob/2014_March_Actual

{"isManageRule":"true","isInputData":"true","modelViewName":"Operating Expenses","createDestPOV":"true","nonEmptyTupleEnabled":"true","stringDelimiter":"_"}

Response

Supported Media Types: application/json

Table 24-8 Parameters

Name Description
details Task ID, such as LM1T2_LM1T2_CopyMLPOV_D20160113T065943_75b_1
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request

Example of Response Body

The following shows an example of the response body in JSON format.

{
   "type":"Profitability",
   "status":-1,
   "statusMessage":"In Progress",
   "details":"BksML30_CopyMLPOV_D20220511T114800_7ad",
   "links":[
      {
         "href":"http://<BASE-URL>/epm/rest/v1/applications/jobs/ChecktaskStatusJob/BksML30_CopyMLPOV_D20220511T114800_7ad",
         "action":"GET",
         "rel":"Job Status"
      }
   ]
}

Java Sample – CopyPOV.java for Profitability and Cost Management

Prerequisites: json.jar

Common Functions: See Profitability and Cost Management Common Helper Functions for Java

  public void copyPOVData() throws Exception {
        
        JSONObject json = new JSONObject();				String modelViewName = "Operating Expenses";
        json.put("isManageRule", true);
        json.put("isInputData", true);
        json.put("modelViewName", modelViewName);        
        json.put("createDestPOV", true);
        json.put("stringDelimiter", "_");
        
        String sourcePovGroupMember = "2014_January_Actual";
        String destPovGroupMember = "2014_December_Actual";
        
        String urlString = "%s/epm/rest/%s/applications/%s/povs/" + sourcePovGroupMember.trim().replaceAll(" ", "%20") 
                                       + "/jobs/copyPOVJob/"+  destPovGroupMember.trim().replaceAll(" ", "%20");
        executeJob(urlString, "POST", json.toString()); 
    }

cURL Sample – CopyPOV.sh for Profitability and Cost Management

Common Functions: See Profitability and Cost Management Common Helper Functions for cURL.

funcCopyPOVData() {
	stringDelimiter="_";	modelViewName="Operating Expenses";
	destPovGroupMember="2014_December_Actual";
	param="{\"isManageRule\":\"true\",\"isInputData\":\"true\",\modelViewName\":\"$modelViewName\",\"createDestPOV\":\"true\",\"stringDelimiter\":\"$stringDelimiter\"}"
	url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/povs/$POV_GROUP_MEMBER/jobs/copyPOVJob/$destPovGroupMember
	funcExecuteRequest "POST" $url "$param" "application/json"

	output=`cat response.txt`
	status=`echo $output | jq '.status'`
    if [ $status == -1 ]; then
        echo "Started Copying POV successfully"
		funcGetStatus "GET"
    else
        error=`echo $output | jq '.details'`
        echo "Error occurred. " $error
    fi
	funcRemoveTempFiles "respHeader.txt" "response.txt"
}

Java Sample – CopyPOV.java for Profitability and Cost Management

Prerequisites: json.jar

Common Functions: See Profitability and Cost Management Common Helper Functions for Java

  public void copyPOVData() throws Exception {
        
        JSONObject json = new JSONObject();				String modelViewName = "Operating Expenses";
        json.put("isManageRule", true);
        json.put("isInputData", true);
        json.put("modelViewName", modelViewName);        
        json.put("createDestPOV", true);
        json.put("stringDelimiter", "_");
        
        String sourcePovGroupMember = "2014_January_Actual";
        String destPovGroupMember = "2014_December_Actual";
        
        String urlString = "%s/epm/rest/%s/applications/%s/povs/" + sourcePovGroupMember.trim().replaceAll(" ", "%20") 
                                       + "/jobs/copyPOVJob/"+  destPovGroupMember.trim().replaceAll(" ", "%20");
        executeJob(urlString, "POST", json.toString()); 
    }