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 (200) ? filter id greater than

How to issue a GET request on a top level entity endpoint and filter todos by ids greater than a supplied value.

GET /todos (200) ? filter id greater than

Issue a GET request on the /todos end point with an id filter to return todos with an id greater than a supplied value.

  • id>5 means return todos where the id is greater than 5
  • most tools and browsers will encode the > symbol for you when sending the request
  • the response should contain at least one todo
  • the response should be a subset of the current todos, not the full list
  • every returned todo should have an id greater than the threshold

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 an id greater-than filter:
    • https://apichallenges.eviltester.com/todos?id>5
  • The response status code should be 200 because the request is accepted
  • Check that every returned todo has an id greater than 5

Try it now

If you need to check which todo ids are available, use GET /todos. See the solution.

GET /todos to see the available todo ids

The sample below uses id>5; edit the threshold if your current data needs a different subset.

GET /todos?id>5 to return todos with ids greater than 5

Example Request

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

Example Response

< HTTP/1.1 200 OK
< Connection: close
< Content-Type: application/json
< X-Challenger: x-challenger-guid

Returned body:

{
  "todos": [
    { "id": 6, "title": "higher id todo", "doneStatus": false, "description": "" }
  ]
}