Run ML Clear POV

Clears model artifacts and data from a POV combination for any application.

Required Roles

Service Administrator, Power User

REST Resource

POST /epm/rest/{api_version}/applications/{application}/povs/{povGroupMember}/jobs/clearPOVJob

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-35 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 run calculations

Path

Yes

None

povGroupMember

The POV group member for which to clear model artifacts sand data, such as 2015_January_Actual

Path

Yes

None

isManageRule

To clear the program rule details or not; true/false

Payload

No

None

isInputData

To clear input data or not; true/false

Payload

No

None

queryName

A query name already existing within the application; used to clear a region within the given POV

Payload

No

None

isAllocatedValues

To clear allocation values or not; true/false

Payload

No

None

isAdjustmentValues

To clear adjustment values or not; true/false

Payload

No

None

stringDelimiter

String delimiter for POV group members

Payload

No

"_" (Underscore)

Note:

If queryName is used (is not null), then isManageRule, isAllocatedValues, and isAdjustmentValues must be set to false.

If one of these parameters or isInputData is not passed, it is considered as false.

Example URL and payload to clear to a particular region within input data

https://<BASE-URL>/epm/rest/{api_version}/applications/{application}/povs/{povGroupMember}/jobs/clearPOVJob

{"isInputData":"true","queryName":"myQueryName","stringDelimiter":"_"}

Response

Supported Media Types: application/json

Table 24-36 Parameters

Name Description
details Task ID, such as BksML1_BksML1_ClearMLPOV_D20160113T070358_1da_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_ClearMLPOV_D20220511T114821_f4b",
   "links":[
      {
         "href":"http://<BASE-URL>/epm/rest/v1/applications/jobs/ChecktaskStatusJob/BksML30_ClearMLPOV_D20220511T114821_f4b",
         "action":"GET",
         "rel":"Job Status"
      }
   ]
}

Java Sample – clearPOV.java for Profitability and Cost Management

Prerequisites: json.jar

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

    public void clearPOVData() throws Exception {
        
        JSONObject json = new JSONObject();
        json.put("isManageRule", true);
        json.put("isInputData", true);
        json.put("stringDelimiter", "_");
        
        String povGroupMember = "2014_January_Actual";
        
        String urlString = "%s/epm/rest/%s/applications/%s/povs/" + povGroupMember.trim().replaceAll(" ", "%20") 
                                        +  "/jobs/clearPOVJob";
        executeJob(urlString, "POST", json.toString());        
    }

cURL Sample – ClearPOV.sh for Profitability and Cost Management

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

uncClearPOVData() {
	stringDelimiter="_";
	param="{\"isManageRule\":\"true\",\"isInputData\":\"true\",\"stringDelimiter\":\"$stringDelimiter\"}"
	url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/povs/$POV_GROUP_MEMBER/jobs/clearPOVJob
	funcExecuteRequest "POST" $url "$param" "application/json"

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

Groovy Sample – ClearPOV.groovy for Profitability and Cost Management

Prerequisites: json.jar

Common Functions: See Appendix C: Common Helper Functions for Groovy.

def clearPOVData() {
        
        JSONObject json = new JSONObject();
        json.put("isManageRule", true);
        json.put("isInputData", true);
        json.put("stringDelimiter", "_");
        
        String povGroupMember = "2014_January_Actual";    
        
        String urlString = serverUrl + "/epm/rest/"+ apiVersion + "/applications/" + appName + "/povs/" 
                                       + povGroupMember.trim().replaceAll(" ", "%20") + "/jobs/clearPOVJob";
                
        def url;
        
         try {
                  url = new URL(urlString)
         } catch (MalformedURLException e) {
                  println "Malformed URL. Please pass valid URL"
                  System.exit(0);
         }
        
        executeJob(url, "POST", json.toString());
    }