cURL Sample – RunRuleBalancing.sh for Profitability and Cost Management

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

funcRunRuleBalancing() {
	url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/povs/$POV_GROUP_MEMBER/ruleBalance
	funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
	list=`cat response.txt | jq 'select(.items != null) | .items[].name'`
	if [[ ! -z $list ]]; then
		echo $list
	else
		echo "No Items found"
	fi
	funcRemoveTempFiles "respHeader.txt" "response.txt"

}