Adding api to get latest partition date for cube

Shall we check if the c is instanceof Cube and if not throw bad request exception?