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

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

funcEnableApplication() {
	url=$SERVER_URL/epm/rest/$API_VERSION/fileApplications/$APP_NAME/enableApplication
	funcExecuteRequest "POST" $url "application/json"

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