cURL Sample – UpdateDimensionJob.sh for Oracle Profitability and Cost Management Cloud

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

funcUpdateDimensionJob() {
	dataFileName="Accounts.txt,Activity.txt"
	param="{\"dataFileName\":\"$dataFileName\"}"
	url=$SERVER_URL/epm/rest/$API_VERSION/fileApplications/$APP_NAME/updateDimensionJob
	funcExecuteRequest "POST" $url "$param" "application/json"

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

Note:

At the end, call this statement along with other statements:

funcUpdateDimensionsJob