Mismatch between API documentation and the response received

When I make a request to return the ranklist for a particular contest using the following code:

api_call_headers = {‘Authorization’: 'Bearer ’ + access_token}
ratings_url = ‘https://api.codechef.com/rankings/JAN18
fields ={
‘limit’: 50,
‘sortBy’: ‘rank’,
‘sortOrder’: ‘asc’,
}
sub_response = requests.get(ratings_url, headers = api_call_headers, params = fields)

I am able to get only the first 25 users in the ranklist though I have mentioned the limit as 50. In the API documentation, it is mentioned that the maximum number of rankings in the list can be 100 but I am not able to get more than 25 in any case. Even, when I filter the ranklist by the institution, I get the ranklist consisting of only 25 users from that institution.

Please help me to sort out the issue!

@rounak217, max limit is 25, not 100 for ranklist. We’ll change it in the documentation.

1 Like
//