Added getRank function to the API