How to do an API request?

Ok, so I was going through the tutorial to control LEDs found at this link:

and I was confused about the API request thing. It said that this is what the API request will look like:

POST /v1/devices/{DEVICE_ID}/led
# Core ID is 0123456789abcdef
# Your access token is 123412341234
curl \
-d access_token=123412341234 \
-d params=on

But like, where do you put that code? Yes, I did also look at this:

It says to write that in the terminal. So does that mean the serial terminal or what? Please help!

You would be putting that in a normal terminal session.
Curl basically calls the web url and returns the data requested. Essentially what a web browser does without the visual, just getting data.

If you’re building the web LED example I recommend using the html form example as it is simple and if you know HTML/CSS you can build a nifty UI as well.

The code for all this is here:

and I’ll post the html code here:

<!-- Replace your-device-ID-goes-here with your actual device ID
and replace your-access-token-goes-here with your actual access token-->
  <form action="" method="POST">
    Tell your device what to do!<br>
    <input type="radio" name="args" value="on">Turn the LED on.
    <input type="radio" name="args" value="off">Turn the LED off.
    <input type="submit" value="Do it!">

In case you are not familiar with web stuff, no you won’t need a server or anything to run this page. Simply make a text file, change the name and extension to “index.html” (you don’t have to name it index but that’s pretty standard) and open it with your browser of choice.