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

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

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

	output=`cat response.txt`
	status=`echo $output | jq '.status'`
    if [ $status == 0 ]; then
        echo "Dimensions updated successfully"
    else
        error=`echo $output | jq '.details'`
        echo "Error occurred. " $error
    fi
	funcRemoveTempFiles "respHeader.txt" "response.txt"
}