Skip to main content
blog title image

2 minute read - API Testing API Challenges

How To - GET challenges 200

Sep 2, 2020

This post and video shows how to complete the challenge GET /challenges 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 /challenges (200)

Issue a GET request on the /challenges end point

  • This will show you the status of all the challenges in your REST Client, if you include an X-CHALLENGER guid header in your request.

Basic Instructions

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

Insomnia Details

> GET /challenges 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: Thu, 27 Aug 2020 13:38:45 GMT
< Content-Type: application/json
< Location: /gui/challenges/x-challenger-guid
< X-Challenger: x-challenger-guid
< Server: Jetty(9.4.z-SNAPSHOT)
< Via: 1.1 vegur

Response Example

{
  "challenges": [
    {
      "name": "POST /challenger (201)",
      "description": "Issue a POST request on the `/challenger` end point, 
            with no body, to create a new challenger session. 
            Use the generated X-CHALLENGER header in 
            future requests to track challenge completion.",
      "status": true
    },
    {
      "name": "GET /challenges (200)",
      "description": "Issue a GET request on the `/challenges` end point",
      "status": true
    }
  ]
}

Overview Video

Patreon ad free version

Learn More and Start Testing