Java Sample – UpdateDimension.java for Profitability and Cost Management
Prerequisites: json.jar
Prerequisites: See Profitability and Cost Management Common Helper Functions for Java
public void updateDimensions() throws Exception {
JSONObject json = new JSONObject();
json.put("dataFileName", "Accounts.txt");
String urlString = "%s/epm/rest/%s/fileApplications/%s/updateDimension";
String response = executeRequest(urlString, "POST", json.toString(), "application/json");
JSONObject jsonObj = new JSONObject(response);
int resStatus = jsonObj.getInt("status");
if(resStatus == 0) {
System.out.println("Dimensions updated successfully");
} else {
System.out.println("Dimensions update failed");
}
}