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

funcCreateFlatFileApplication() {
	description="Flat file based application";
	ruleDimensionName="Rule"
	balanceDimensionName="Balance"
	param="{\"description\":\"$description\",\"ruleDimensionName\":\"$ruleDimensionName\",\"balanceDimensionName\":\"$balanceDimensionName\"}"
	url=$SERVER_URL/epm/rest/$API_VERSION/fileApplications/BksML13
	funcExecuteRequest "POST" $url "$param" "application/json"

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