How I Learn APIs Quickly Using VS Code REST Client

When I stepped into a role with many APIs to ramp up on, I needed a faster way to explore endpoints, chain calls, and inspect responses without bouncing between tools.

The VS Code extension REST Client (humao.rest-client) helped me do exactly that. It lets you send REST and GraphQL requests directly from .http files in VS Code.

In this post, I will share the workflow I use to learn APIs quickly: keep requests close to code and notes, reuse values across calls, and avoid unnecessary copy-paste.

To start, create a .http file and add your requests there. Separate requests with ###; that separator is what makes the Send Request link appear above each request block.

Quick look at a page

Yes, you can use AI or tools like Postman and Insomnia to generate requests. But when your goal is to learn an API, it helps to keep everything close to your code and notes. I already had VS Code open all day, so I decided to keep my full API learning workflow there.

In my case, every API call is secured and requires an access token, so generating one is step zero. I could paste one token at the top of the file, but that approach breaks quickly: tokens expire, and pasted values can accidentally be committed or pushed.

That is why I keep credentials in a local .env file (for example: CLIENT_ID, CLIENT_SECRET, and TENANT_ID) that is listed in .gitignore.

Then I created my first request to generate an access token from those values:

POST https://login.microsoftonline.com:443/{{$dotenv TENANT_ID}}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id={{$dotenv CLIENT_ID}}&scope={{$dotenv CREDS_SCOPES}}&client_secret={{$dotenv CLIENT_SECRET}}&grant_type=client_credentials

Quick breakdown: each {{$dotenv ...}} expression reads a value from your .env file, so you keep secrets out of your .http file and out of source control.

  • {{$dotenv TENANT_ID}} -> TENANT_ID
  • {{$dotenv CLIENT_ID}} -> CLIENT_ID
  • {{$dotenv CLIENT_SECRET}} -> CLIENT_SECRET

To execute the call, click the Send Request link above the request. The response opens in a new tab, and you can inspect the access token in the body.

Send Query button

Then you can use that token in the next request:

GET https://ecostruxure-building-platform-api-uat.se.app/api/Sites
Authorization: Bearer {{ACCESS_TOKEN}}
X-Api-Version: {{apiVersion}}

To avoid copy-pasting values, the better approach is to name requests and reference their responses as variables:

### ==============================
### Create Token
# @name createToken

POST https://login.microsoftonline.com:443/{{$dotenv TENANT_ID}}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id={{$dotenv CLIENT_ID}}&scope={{$dotenv CREDS_SCOPES}}&client_secret={{$dotenv CLIENT_SECRET}}&grant_type=client_credentials

Notice the @name createToken labels that request. After it runs, you can access fields from its response body. The response content is JSON and looks like this:

{
  "token_type": "Bearer",
  "expires_in": 3599,
  "ext_expires_in": 3599,
  "access_token": "eyJ0..."
}

For example, to retrieve the access_token value, we can use the expression createToken.response.body.$.access_token. When assigned to a variable, it looks like this:

@ACCESS_TOKEN={{createToken.response.body.$.access_token}}

Then you can use {{ACCESS_TOKEN}} in all your requests, like this one that retrieves all buildings:

### ==============================
#### Retrieve my sites
# @name getBuildings

GET https://ecostruxure-building-platform-api-uat.se.app/api/Buildings
Authorization: Bearer {{ACCESS_TOKEN}}
X-Api-Version: {{apiVersion}}

If you come back later and the token has expired, just run the token request again, and the variable {{ACCESS_TOKEN}} will automatically update for all subsequent requests. No copy-pasting required.

Extracting a value from a list response

What if a response returns multiple items and you need one specific ID? For example, the previous query returns multiple buildings, but I was interested in the building named "Virtual Building FB". The response looks like this:

[
  {
    "organizationName": "BDP Team",
    "organizationId": "2dd6da1e",
    "siteId": "34580992",
    "floorCount": 1,
    "spaceCount": 2,
    "deviceCount": 0,
    "measurementCount": 0,
    "includesDeviceAndMeasurementCounts": false,
    "name": "Frank Demo Office",
    "referenceId": "frank-demo-building",
    "area": 0.0,
    "metadata": [],
    "id": "4a69071c"
  },
  {
    "organizationName": "BDP Team",
    "organizationId": "2dd6da1e",
    "siteId": "34580992",
    "floorCount": 2,
    "spaceCount": 5,
    "deviceCount": 0,
    "measurementCount": 0,
    "includesDeviceAndMeasurementCounts": false,
    "name": "Virtual Building FB",
    "referenceId": "vir-fb",
    "area": 0.0,
    "metadata": [
      {
        "name": "location",
        "value": "north wing"
      }
    ],
    "id": "01ab96fc"
  }
]

To get the value of the id property for one building with a specific name, we can filter with JSONPath:

@buildingId={{getBuildings.response.body.$[?(@.name=='Virtual Building FB')].id}}

This uses the previous request response (getBuildings) and extracts the matching id.

ℹ️ NOTE: If this is your first time seeing JSONPath, read it like this:

  • $ means "start from the root of the response body."
  • [?()] applies a filter.
  • @.name=='Virtual Building FB' keeps only objects where name matches.
  • .id returns the id field from the matched object.

Then use {{buildingId}} in the next request:

### ==============================
### Retrieve all floors within a specific building
# @name getFloors

GET https://ecostruxure-building-platform-api-uat.se.app/api/Buildings/{{buildingId}}/Floors
Authorization: Bearer {{ACCESS_TOKEN}}
X-Api-Version: {{apiVersion}}

Dynamic variables

Other built-in dynamic variables include:

  • {{$guid}}
  • {{$randomInt min max}}
  • {{$timestamp [offset option]}}
  • {{$datetime rfc1123|iso8601 [offset option]}}
  • {{$localDatetime rfc1123|iso8601 [offset option]}}
  • {{$processEnv [%]envVarName}}
  • {{$dotenv [%]variableName}}
  • {{$aadToken [new] [public|cn|de|us|ppe] [<domain|tenantId>] [aud:<domain|tenantId>]}}

For one historical-data query, I needed to pass a datetime in a very specific format. I solved that by generating the value with a dynamic variable:

@currentTimestamp={{$datetime 'YYYY-MM-DDTHH:mm:ss.SSS[000][Z]' -5 h}}

Then I passed {{currentTimestamp}} into the next request parameter.

Calling GraphQL from REST Client

Most examples above use GET requests, but you can also send POST requests and GraphQL queries.

For example, to get a building with its levels and rooms:

### GRAPH: buildings & equipment
POST https://ecostruxure-building-platform-api-uat.se.app/graphql
Content-Type: application/json
Authorization: {{ACCESS_TOKEN}}
X-REQUEST-TYPE: GraphQL
X-Api-Version: {{apiVersion}}

query MyQuery {
  buildings(where: {name: {eq: "Frank Demo Office"}}) {
    id
    name
    levels {
      name
      rooms {
        name
      }
    }
  }
}

Here we use POST because the GraphQL query is sent in the request body.

The response looks like:

{
  "data": {
    "buildings": [
      {
        "id": "4a69071c",
        "name": "Frank Demo Office",
        "levels": [
          {
            "name": "Ground Floor",
            "rooms": [
              {
                "name": "Open Office Space"
              },
              {
                "name": "Terrasse"
              }
            ]
          }
        ]
      }
    ]
  }
}

GraphQL is powerful here because you can request related data in one call instead of chaining multiple REST endpoints.

In short: if you are learning a new API, REST Client helps you move faster with less context switching. Keep your requests in a .http file, reuse values with @name + {{...}}, and iterate directly in VS Code.

Lately, this workflow has been even more useful as my day-to-day work includes broader platform discussions and faster discovery cycles.

If useful, I can share a follow-up .http starter template that you can adapt to your own APIs.

Show Me

You prefer watching a video? I got you here a video I did sharing the how I use REST Client extension.

Useful references:

Reading Notes #714

This week's collection highlights practical advice for managing Azure Service Bus and making more cost-effective choices when selecting AI models. I have also gathered some useful perspectives on layered security for authentication and the nuanced debate surrounding SQL foreign key constraints.



Cloud

AI

Programming

Databases


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

 ~frank

Reading Notes #713

This week’s collection explores the practical side of AI, focusing on governance in multi-model environments and the security advantages of robust sandboxing. I’ve also included some foundational perspectives on and organizational goals, along with a look into the history of one of my favorite tools, VS Code.

AI

Programming

by John Doerr 

That book has been on my to-read list for a very long time. As someone who worked at Microsoft using many OKRs, I was comfortable with the topic. Nevertheless, it was interesting to learn how other people use it in many different contexts.







Reading Notes #712

I’ve put together a few articles that caught my attention this week, ranging from .NET updates and Azure migration paths to the nuances of AI evaluation workflows. These pieces offer practical insights into the tools and design choices we encounter in our daily work.



Cloud

AI

  • Building Reproducible AI Evaluation Workflows with Docker Sandboxes (Karan Verma) - Wow! Very interesting open-source project that tries to help with the question: before comparing benchmark scores or choosing a judge model, can someone else reliably run the same workflow under comparable conditions? Definitely worth the read.

  • What is YOLO Mode? - Yolo mode is the most productive way to use AI. It is better for developer habits and the brain, but it also comes with some risks. This nice post provides clarity on the topic.

Programming

~frank

Reading Notes #711

This week’s collection covers everything from streamlined Azure deployment techniques to the practical realities of local versus cloud AI models. I have also gathered several helpful resources for .NET developers and some thoughts on maintaining sharp mental habits in an increasingly automated world.


Cloud

AI

Programming

DevOps

Open Source

~frank


Reading Notes #710

This week’s collection highlights several key advancements in Azure performance, the nuances of orchestrating multiple AI agents, and critical updates to NuGet security. These pieces offer practical insights for anyone looking to streamline their development workflow while maintaining a more secure infrastructure.


Cloud

AI

DevOps

~frank

Reading Notes #709

This week’s notes focus heavily on the practicalities of building reliable AI agents, specifically looking at how we manage their memory and governance. I have also included a few notable wins in Azure storage performance and some honest reflections on where our industry is heading next.


AI

Cloud


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

 ~frank


Reading Notes #708

I’ve gathered a few insightful pieces this week exploring smarter ways to manage AI costs, practical hardware setups, and the foundational logic behind better programming. Each link offers a different perspective on how we can refine our workflows and think more intentionally about the tools we use every day.


AI

Databases

Programming

  • The Power Of “Why?” (codemanship) - A great post that reminds us that asking the right question helps us understand the real need and build better solutions.

Miscellaneous

~frank


Reading Notes #707

This week's highlights bring together insights on evolving API security, the realities of integrating AI into your workflow, and tools that can help streamline the testing process. I selected these pieces for their practical advice on simplifying everyday development tasks while building more robust and resilient infrastructure.


Programming

AI

Miscellaneous


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

 ~frank


Reading Notes #706

This week's collection highlights several practical upgrades for your workflow, ranging from cleaner C# patterns to more secure ways to manage AI agents. I’ve also included a few podcast episodes and articles that offer some much-needed perspective on productivity and community life.


AI

  • Why AI Agents Need Isolation with Docker SBX (Karan Verma) - Power comes with responsibilities. It's well known (at least for Spider-Man fans), but more seriously, AI users have a simple way to stay safe. And now, with "the kits", it looks like it's even easier.

  • Using AI to Build a Blazor App 1: Start With the Problem (Jon Hilton ) - It's so true that AI doesn't always do or act the way we expect. In this case, I wonder if a different model would have been better. In my experience, GPT is better at doing things compared to brainstorming.

Databases

Programming

DevOps

  • New: Versioned CLI and SDK Docs (Cam Soper) - That's a nice feature that more should implement! You pick your API version, and the documentation follows.

Podcasts

Miscellaneous

  • 3 Tricks to Help You Stop Procrastinating (Suzanne Scacca ) - Need tips to improve your time management? This post is for you.

  • Goodbye, forever, probably. (Salma) - Sad news for the communities, but at the same time, it's because of those same communities. This post shares a very sad portrait of the online world that affects many people.

~frank


Reading Notes #705

This week’s collection features a mix of critical .NET lifecycle updates and practical strategies for optimizing your database interactions. These selected articles offer helpful insights into everything from edge computing deployments to the evolving landscape of AI in modern workflows.


AI

  • AI Raised the Bar (And Now We're All Tired) (Golnaz) - It's so true! So much can be done quickly today. An interesting question is: how do we avoid burning out resources and tokens? How, as human we stay smart? After all, life is a marathon, not a sprint!

Cloud

Databases

DevOps

Programming

Miscellaneous

~frank


Reading Notes #704

This week’s collection highlights practical ways to improve developer workflows, from faster test runs and more manageable pull requests to intuitive new AI integrations. I have gathered a few standout articles on Blazor components, Azure Functions updates, and the nuances of training coding agents for your specific stack.

Suggestion of the week

Programming

Open Source

DevOps

AI


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

 ~frank


Reading Notes #703

Reading Notes #703

I spent some time this week tracking new developments in the AI and DevOps space to see what was worth a closer look. These notes highlight several interesting pieces regarding new model releases, infrastructure shifts, and more efficient ways to manage your project files.



DevOps

AI

  • Introducing North Mini Code: Cohere’s First Model For Developers (Cohere Code Agents Team) - I feel like those new model blog posts are never simple to read. They are packed with numbers, statistics and comparisons with things you may not have known before. But that's what makes them interesting; they are a deep source of information. And yes, that model looks great!

  • Your API is Already an MCP Server (Marin Pavelić) - Very interesting idea that could make all of us save time and money.

Programming

Neovim Clipboard on WSL: The One-Liner Fix

Every time I set up Neovim on a fresh WSL instance, I hit the same wall: yanking text inside Neovim and pasting it into a Windows app (or vice versa) just doesn't work. "+y does nothing, and Neovim greets you with Clipboard: No provider, try :checkhealth. Nothing flows in or out of the clipboard, not even between files inside WSL.

The root cause is that WSL's Neovim can't talk to the Windows clipboard at all. The fix is a tiny Windows executable called win32yank that speaks the Windows clipboard API from the command line.

I've done this enough times now that I'm writing it down so I never have to search for it again. If you're here for the same reason, this one's for you.

Step-by-Step

1. Download win32yank

Grab the latest release from github.com/equalsraf/win32yank. Download win32yank-x64.zip and extract it to get win32yank.exe.

2. Place it in your WSL PATH

sudo mv /mnt/d/win32yank.exe /usr/local/bin/

Adjust the source path to wherever your browser downloaded it (usually /mnt/c/Users/<you>/Downloads/win32yank.exe).

3. Configure Neovim

Add this block to ~/.config/nvim/init.lua:

if vim.fn.has("wsl") == 1 then
  vim.g.clipboard = {
    name = 'win32yank-wsl',
    copy = {
      ['+'] = 'win32yank.exe -i --crlf',
      ['*'] = 'win32yank.exe -i --crlf',
    },
    paste = {
      ['+'] = 'win32yank.exe -o --lf',
      ['*'] = 'win32yank.exe -o --lf',
    },
    cache_enabled = 0,
  }
  vim.opt.clipboard = 'unnamedplus'
end

4. Done

Now y, "+y, "+p, right-click copy/paste — all of it flows through the Windows clipboard as you'd expect.



Bonus: One-Shot Setup Script

Next time I (or you) need this on a fresh box, run this single script. It downloads win32yank, installs it, and appends the config:

#!/usr/bin/env bash
set -euo pipefail

WIN32YANK_PATH="/usr/local/bin/win32yank.exe"
NVIM_CONFIG="${HOME}/.config/nvim/init.lua"
TMP_DIR=$(mktemp -d)

# Get the latest release tag from GitHub
echo "==> Fetching latest win32yank release..."
LATEST_TAG=$(curl -s https://api.github.com/repos/equalsraf/win32yank/releases/latest \
  | grep '"tag_name"' \
  | cut -d'"' -f4)

echo "==> Downloading win32yank ${LATEST_TAG}..."
curl -fsSL "https://github.com/equalsraf/win32yank/releases/download/${LATEST_TAG}/win32yank-x64.zip" \
  -o "${TMP_DIR}/win32yank-x64.zip"

echo "==> Extracting..."
unzip -q "${TMP_DIR}/win32yank-x64.zip" -d "${TMP_DIR}"
sudo cp "${TMP_DIR}/win32yank.exe" "$WIN32YANK_PATH"
sudo chmod +x "$WIN32YANK_PATH"
rm -rf "$TMP_DIR"

echo "==> Appending clipboard config to ${NVIM_CONFIG}..."
mkdir -p "$(dirname "$NVIM_CONFIG")"

cat >> "$NVIM_CONFIG" << 'LUA'

-- win32yank clipboard for WSL
if vim.fn.has("wsl") == 1 then
  vim.g.clipboard = {
    name = 'win32yank-wsl',
    copy = {
      ['+'] = 'win32yank.exe -i --crlf',
      ['*'] = 'win32yank.exe -i --crlf',
    },
    paste = {
      ['+'] = 'win32yank.exe -o --lf',
      ['*'] = 'win32yank.exe -o --lf',
    },
    cache_enabled = 0,
  }
  vim.opt.clipboard = 'unnamedplus'
end
LUA

echo "==> Done! Restart Neovim and yank away."

Save it as setup-wsl-clipboard.sh, run chmod +x setup-wsl-clipboard.sh and then ./setup-wsl-clipboard.sh.

Reading Notes #702

This week’s compilation explores a mix of critical topics ranging from integrating AI models with SQL Server to navigating the complexities of Azure container troubleshooting. I’ve selected these particular articles because they offer practical ways to streamline your workflow and better understand the latest shifts in cloud infrastructure and software development.

Databases

AI

Cloud

DevOps

Miscellaneous

Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

 ~frank

Reading Notes #701

Modern infrastructure and AI agent development move fast, requiring a sharp eye on both backend stability and frontend polish. This week’s curated notes highlight critical shifts in observability, security best practices for autonomous agents, and practical updates for .NET MAUI apps. Check out these essential reads to stay ahead of the curve.


AI

Programming

DevOps

  • Why Choose Pulumi Over Terraform? (Pablo Seibelt) - I have never tried Pulumi or terraform, but they look great, and after reading this post, I'm very interested in learning more about ballooning

Data

MS Build


~frank

Reading Notes #700

Seven hundred weeks.

When I started taking notes about the articles I was reading, I never imagined I would still be doing it 700 weeks later.


Back then, my notes lived on a USB key. I carried a small personal wiki with me and used it to save interesting articles, ideas, and discoveries. It was a simple way to build my own searchable knowledge base so I could find things again when I needed them.

In 2011, I started sharing those notes publicly on my blog, Franky's Notes. A few months later, I made another important change: I switched from writing in French to writing in English. At the time, I wasn't fluent, but I wanted to improve. "Notes de lecture" became "Reading Notes", and every week became an opportunity to learn something new while practicing a language that would eventually become a big part of my career.

Over the years, the format evolved. Articles were joined by podcasts, books, videos, and whatever else helped me learn and stay curious. Technology changes constantly, and one of the things I enjoy most about working in this industry is that there is always something new to discover.

What never changed was the habit itself.

Most mornings start the same way: a coffee, my e-reader, and a few articles. Throughout the week, I collect the things that made me think, taught me something, or simply felt worth sharing. Then, every Monday, I publish a new edition.

Seven hundred weeks later, these reading notes have become much more than a list of links. They are a record of what caught my attention, what I was learning, and how both technology and I have changed over the years.

If you've been reading along for a while, thank you. If you're new here, I hope you discover something interesting in the links below.

Suggestion of the week

AI

Programming

Miscellaneous

~frank

Reading Notes #699

This week's reading notes bring you the latest insights into AI, .NET, open-source development, and even a few social hacks! From exploring background tasks in Blazor to the fascinating debate on Markdown vs. HTML for AI output, this roundup has something for everyone.

Jean-Olivier P. presenting at MsDevMtl user group

Let me know if you find anything particularly interesting; I'd love to hear your thoughts!

Programming

AI

Open Source

Podcasts

Miscellaneous


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week. 

 ~frank

Reading Notes #698

The world of AI is exploding, and with that explosion comes a crucial question: how do we keep these powerful agents in check? Traditional security methods might not cut it anymore, so developers are turning to innovative sandboxing techniques. Let's explore some of the most promising approaches and see which ones emerge as the frontrunners in this AI safety race.




AI

Programming

DevOps

Podcasts


I've made it a habit to share the fascinating articles, blog posts, and books that cross my path each week. Think of this as an open invitation, if you stumble upon something intriguing, don't hesitate to share it!
Let's build a community of curious minds.

~frank

Reading Notes #697

This week’s reading notes cover a wide range of topics, from local AI workflows and Docker agent fleets to data privacy, SQL tips, and developer tooling updates. There’s also an interesting look at how AI may be reshaping platforms like GitHub, alongside practical articles and podcasts packed with ideas for developers and tech enthusiasts alike.


Programming

Data

AI

Databases

Podcasts


Sharing my Reading Notes is a habit I started a long time ago, where I share a list of all the articles, blog posts, and books that catch my interest during the week.

If you have interesting content, share it!

~frank