Skip to content
CodeKruPro

Understand an API before sending a request

1/32

01 · Read and understand requests

Your goal: Understand an API before sending a request

Read the lesson, then answer the questions. You do not need to write code.

Start here: sign in, then answer the questions.

Jump to practice

What you will learn

A client asks for something; a server handles the request and returns a response. An API is the agreed way programs communicate. A website is one possible client.

Your goals

  • Label client, server, request and response.
  • Separate a screen from the data used to draw it.

Before you start

Start here. No previous API knowledge or programming is required.

Practice setup

Read the supplied training transcript and answer the questions. Sign in only to save your answers. You do not send a request in this lesson.

Supplied training evidence / contract

Training transcript: a shopper clicks Show users. The browser sends GET https://testkru.com/api/users. TestKru replies HTTP 200, Content-Type: application/json, and [{"id":1,"name":"Sample Shopper"}]. The page displays Sample Shopper. This is a supplied transcript, not a live recording. Sample Shopper appears only in this transcript. The next lesson uses the live user list, and its first name may be different.

Follow these steps

  1. Read the training transcript above. You do not install anything or send a request in this lesson.
  2. Find the program that sends the GET. That program is the client.
  3. Find the service that sends the reply. That service is the server.
  4. Find where the displayed name is written: the request URL, the status code, or the response body.
  5. Choose one answer for each question, then click Submit Answers.

Investigate before concluding

First record the actual result for each case. Compare the body, headers and later state with the stated contract. Keep an observation separate from a prediction; use the model answer only after making your own attempt.

What to keep as evidence

  • Client and server are distinguished.
  • Request and response directions are explained.
  • The displayed value is traced to the response body.
References for this lesson

Finish this assignment

Answer from the transcript on this page. Click Submit Answers. Your score is the percentage of checks that passed. A saved 100/100 means every check passed. Continue opens the next lesson you can submit.

If something goes wrong
  • Use the training transcript on this page. This lesson has no Send request button.
  • If a check needs attention, read the note under that check and answer that question again.
Self-review and independent variation
  • Client and server are distinguished.
  • Request and response directions are explained.
  • The displayed value is traced to the response body.

If the page displays the wrong name despite a correct response, investigate the client before blaming the API.

Automatic checks verify the requests and answers configured for this lesson. The self-review is for your own reasoning. A score is not a certificate.

Open API reference

Practise and save your evidence

The lesson is public. Sign in to send requests and save progress. You will return to this lesson.

Sign in to practiseCreate an account