Sitemap
Ace D Baugh

Ace D Baugh

I am a Fine Art Photographer and Fine Code Programmer. I shoot Sony Raw and am a Full Stack Web Developer

Web APIs

2 min readOct 3, 2022
Press enter or click to view image in full size
Photo by Rahul Viswanath on Unsplash

You may have seen the term API thrown around the internet quite a bit but never really knew what it was. An API or Application Programming Interface is a way for one application to talk to another or specifically an application or website to retrieve data from a large collection that isn’t always stored on a local server. There are two major types of APIs, REST and Libraries (Cook, 2019). REST are endpoints or URLs that allow you to access data on the servers and sometimes alter a few things, but not all. Libraries are usually not called APIs but they are in the sense that they have a series of methods or commands that are accessed from other places by requesting them. Instead of storing all of the data on your servers, making requests to someone else’s collection saves on load times and file size (Cook, 2019).

APIs only send you the information you requested and nothing more. They are not going to expose you to sensitive information like all the users and passwords, but you’ll more likely have access to a collection of data that is relevant to what you are looking at (Cook, 2019). This makes them more secure and is a reason many people want to use them. If you make a request for something that is not there, you will get an error. This is why testing API connections is very important.

Get Ace D Baugh’s stories in your inbox

Join Medium for free to get updates from this writer.

There are many options for testing Web APIs such as Postman and Insomnia, but I wanted to focus on a smaller, lightweight VSCode plugin called Thunderbolt Client. One of the great things about Thunderbolt Client is that is can be used right in VSCode and you don’t have to open and configure another app to do what you really need to do (Choudhary, 2021). It doesn’t have all of the functions that the other two have, but for what we will be needing in this course, it will do just fine. You can run a get and post request to see if the data is coming and going correctly and if the data is secure. You will most likely need an API token to authenticate who you are and grant you the appropriate access. Running a test is usually done with the URL and a few keys to access the correct information. Thunderbolt Client makes this seamless in your coding flow.

References

Choudhary, H. (2021). Thunder Client — API testing right inside VSCode. Retrieved October 2, 2022, from https://www.youtube.com/watch?v=43jRFjpWldk.

Cook, K. (2019). What is an API? Retrieved October 2, 2022, from https://www.youtube.com/watch?v=tgbRY96q-KM.

--

--

Ace D Baugh
Ace D Baugh

Written by Ace D Baugh

I am a Fine Art Photographer and Fine Code Programmer. I shoot Sony Raw and am a Full Stack Web Developer