${sql} Set Variable select policy_id, action, sum(hits) as hits from security_event_hits_log \ where \ __time >='${startTime}' and __time < '${endTime}' \ group by policy_id, action \ order by hits desc limit ${limit}
${remoteResponse} Get Request bdapi ?query=${sql}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
Should Be Equal As Strings ${response['status']} 200
@{list} Set Variable ${response['data']}
${listLength} Get Length ${list}
Should Be Equal As Integers ${bfListLength} ${listLength}
${types} Set Variable hits
Run Keyword If ${bfList}!=[] and ${list}!=[] ForToEventHitTopTrend ${bfList} ${types} ${list}
${sql} Set Variable select \ policy_id, sub_action as \ action, sum(hits) as \ hits from \ proxy_event_hits_log \ where __time >= '${startTime}' and __time < '${endTime}' \ \ group by policy_id, sub_action order by hits desc limit ${limit}
${remoteResponse} Get Request bdapi ?query=${sql}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
Should Be Equal As Strings ${response['status']} 200
@{list} Set Variable ${response['data']}
${listLength} Get Length ${list}
Should Be Equal As Integers ${bfListLength} ${listLength}
${types} Set Variable hits
Run Keyword If ${bfList}!=[] and ${list}!=[] ForToEventHitTopTrend ${bfList} ${types} ${list}