Skip to main content

Sep 3, 2020 - 2 minute read - API Testing API Challenges Evil Tester

How To - GET todos 200

This post and video shows how to complete the challenge GET /todos 200 using Insomnia.

What are the API Challenges?

Our API Challenges Application has a fully functional cloud hosted API, and a set of challenges to work through.

GET /todos (200)

Issue a GET request on the /todos end point

  • This will show you all the todos in the system
  • The return format is a useful guide for the syntax of the request you will send in POST messages
  • Perform a GET prior to any amendment or deletion, to make sure that the data in the system is what you expect it to be.
  • remember not to add a trailing / on the request e.g. /todos/ - that is a different end point

Basic Instructions

  • Issue a GET request to end point “/todos”
    • if running locally that would be
      • http://localhost:4567/todos
    • if running in the cloud that would be
      • https://apichallenges.herokuapp.com/todos
  • The request should have an X-CHALLENGER header
  • The response body shows all the todos.

Insomnia Details

> GET /todos HTTP/1.1
> Host: apichallenges.herokuapp.com
> User-Agent: insomnia/2020.3.3
> X-CHALLENGER: x-challenger-guid
> Accept: */*
< HTTP/1.1 200 OK
< Connection: close
< Date: Fri, 28 Aug 2020 13:15:04 GMT
< Content-Type: application/json
< X-Challenger: x-challenger-guid
< Server: Jetty(9.4.z-SNAPSHOT)
< Via: 1.1 vegur

Response Example

{
  "todos": [
    {
      "id": 6,
      "title": "process payroll",
      "doneStatus": false,
      "description": ""
    },
    {
      "id": 9,
      "title": "tidy meeting room",
      "doneStatus": false,
      "description": ""
    }
   ]
}

Overview Video

Watch on YouTube

Patreon ad free version

Learn More and Start Testing


You will need a Github account to comment. Or you can contact me with your comment.

I reserve the right to delete spam comments e.g. if your comment adds no value and its purpose is simply to create a backlink to another site offering training, or courses, etc.