Call an API with curl Like a Pro

medium 20 XP ~8 minHands-on lab Pro

An API runs on this machine on port 8636, but only answers for the virtual host api.api-v2.internal, which DNS does not resolve here. It needs the token in /home/student/.api-token as a bearer token, and /v1/report has moved.

Task

  • Save the response body of GET http://api.api-v2.internal:8636/v1/report (with the token, following redirects) to /home/student/report.json.
  • Write the HTTP status code that /v1/report itself answers with (before following the redirect) to /home/student/first-status.txt.
  • Do not edit /etc/hosts.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

TerminalNot started

Your machine is ready to start

Create a free account to open a machine and get graded.