You can support this site from as little as $1 a month on Patreon.

The support pays for site hosting and the expansion of this content.

In addition, Patreon Supporters gain access to exclusive online video training courses and ebooks.

Join Now

How to complete the challenge GET /todos (400) ?_limit too high

How to issue a GET request on a top level entity endpoint with a pagination limit above the allowed maximum.

GET /todos (400) ?_limit too high

Issue a GET request on the /todos end point with a pagination limit above the configured maximum to receive a 400 status code.

  • the maximum supported _limit value is 20
  • _limit=21 is too high for this API
  • this challenge is passed by receiving a 400 response for the invalid pagination request

Basic Instructions

  • Issue a GET request to end point "/todos"
    • https://apichallenges.eviltester.com/todos
  • The request should have an X-CHALLENGER header to track challenge completion
  • Add _limit=21 as a URL parameter:
    • https://apichallenges.eviltester.com/todos?_limit=21
  • The response status code should be 400 because the pagination limit is too high

Try it now

Example Request

> GET /todos?_limit=21 HTTP/1.1
> Host: apichallenges.eviltester.com
> User-Agent: rest-client
> X-CHALLENGER: x-challenger-guid
> Accept: application/json

Example Response

< HTTP/1.1 400 Bad Request
< Connection: close
< Content-Type: application/json
< X-Challenger: x-challenger-guid

The response body contains validation details explaining that the requested pagination limit is too high.