Follow-along tutorial for ACM's API workshop 10/14/2025
- Python, which you can download here
- Postman account, which you can make here. Sign in with Google is ok
- Slide deck for additional information
For our first task, we will be getting familiar with calling APIs in Postman, an industry standard tool used for getting data from APIs. we will be pinging the endpoints implemented in this GitHub repo
- Prove that you can access the API by typing
https://api.scuacm.com/in a web browser
- We want to access
https://api.scuacm.com/v1/datato get our data, which we cannot do without a token, which we cannot do in a web browser
- Open Postman after signing in and click the "Import APIs and collections" button
- The imported collection has 3 GET requests, which will get the data we need to access
/v1/data. First, run the GET request "Confirm API" and see that the response at the bottom is the same as the web browser
- We need to get a token before getting our data, but just running the "Get Token" (
/v1/token) request won't work. Click on the "API Workshop 2025" folder, click on the "Variables" tab and fill in thekeyvalue with "acmKey123"- In a real API, you would get the token when signing up for an account on the provider's website, and is usually something you should keep secret!
The Postman collection is set up to automatically take the key variable and insert it into the request as a URL query
- Now, we can run the "Get Data" request to finally get access to our "sensitive" data
- The token we got will be used as a Bearer token in the next request, which is a way to send strings securely, and is automatically configured in the Postman collection
The Postman collection has a script to automatically assign the output of the response to the token variable, where you can note the response.json() and data.token snippets, which you can also use to save responses to variables in your own code
Now, to get data from APIs to use in your apps, you'll likely need a proxy API to avoid CORS issues (explained in the slides). Therefore, we need to create our own API that acts as a middleman between your app and the data you want. The simplest way is to use the Flask library with Python due to it's simplicty and powerful things that Python can do, such as data manipulation with NumPy.
First, we need to set up your Python environment to be able to run the server.py file
- In your terminal (
Ctrl + ~in VSCode) run the following command:- Windows -
py -m venv venv - Mac/Linux
python3 -m venv venv
- Windows -
- This creates a Python virtual environment in the
venvfolder, which keeps any packages installed local to this folder - To activate the virutal environment, enter the following in the terminal:
- Windows -
.\venv\Scripts\activate - Mac/Linux -
source venv/bin/activate - You should see
(venv)in your terminal from here on out. Whenever you want to run anything, make sure that is there
- Windows -
- Now, we need to install the packages in order to run the file. This repo has a
requirements.txt, which you can use to define packages to install instead of manually doing them. Install with the following command:pip install -r requirements.txt- pip is the Python package manager
Everything has now been set up. Before running server.py, let's break down some of the functionality of the Flask app
To run the server, type the following command in the terminal: python server.py
You can now navigate to http://127.0.0.1:3000 to access you server! To get to the other endpoints, type the one you want (ex: /add) after the url with the required parameters
The acm-data endpoint requires a JSON body, which cannot be done in a browser. Your task is to:
- Create a new Postman request and set it to POST
- Set the body to raw and type to JSON
- Fill in the body with the JSON format it needs, with a valid ACM token
- You should see the success message












