meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

How to Build an API

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, Technology, News

4.91.2K Ratings

🗓️ 28 August 2019

⏱️ 46 minutes

🧾️ Download transcript

Summary

In this episode, Scott and Wes talk about creating APIs — what’s happening behind the scenes and why it’s important. Sanity - Sponsor Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax. Sentry - Sponsor If you want to know what’s happening with your errors, track them with Sentry. Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Cut your time on error resolution from five hours to five minutes. It works with any language and integrates with dozens of other services. Syntax listeners can get two months for free by visiting Sentry and using the coupon code “tastytreat”. Show Notes 2:15 - How do you build an API from scratch? 3:54 - Choose an API type REST GraphQL 8:15 - Setup some sort of server that will accept requests and send responses Express Koa Meteor 11:11 - Document the endpoints What is the end point What parameters are required Filters Sorting Headers required What you get back when you hit this endpoint Any request limits Examples in common languages JS PHP Ruby 21:20 - Naming Make it obvious 27:39 - Securing Only accept requests from logged-in users oAuth Cookie/Session jwt API key CORS Check roles - access level Syntax 055: Hasty Treat - User Role Systems 32:42 - Protecting Rate limit Whitelist / blacklist Cloudflare 36:00 - Write resolvers Modify data if needed Send back the data requested Send back the correct HTTP code Log what happened 37:56 - Tools Postman Swagger Links Stripe ××× SIIIIICK ××× PIIIICKS ××× Scott: Hoax Podcast Wes: Solar Lights Shameless Plugs Scott: LevelUpTutorials Pro - Advanced Gatsby & Shopify Wes: All Courses - Use the coupon code ‘Syntax’ for $10 off! Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

You're listening to Syntax.

0:02.8

The Podcast with the tastiest web development treats out there.

0:06.0

Strap yourself in and get ready.

0:08.0

Here is Scott Telinsky and West Boss.

0:10.4

Welcome to Syntaxes. This is the podcast with the Tastiest web development treats.

0:15.0

Today we're going to learn how to build an API. I've actually built a handful of

0:20.3

APIs in the past and it seems like almost every project that I work on has some sort of

0:25.9

API endpoint that need to ping in order to upload data or to modify data or pull data back.

0:31.2

So we're going to sort of step you through the ins and

0:33.6

notes of creating an API, some of the questions you should ask. And I think like

0:37.8

just for beginners, a hard thing for people to understand is just the sort of

0:42.2

mind space of like what's going on

0:44.9

behind the scenes especially if you're not a backend developer you're just for front end you

0:48.8

might not necessarily understand like what's happening so even if you don't want to create your own

0:53.5

API this will be a helpful sort of primer on what's happening behind the scenes

0:58.1

when you send off a request to that API. I think like a Mindspace would be a good name for a social media website in the future where you just like think about it and then you're in that space mind space

1:10.0

So mind space I like it I'm sure that's a thing already. Today we are sponsored by

1:17.0

Century and Sanity. Century does all of your error and exception tracking in

1:21.9

Sanity is a structured content

1:24.0

CMS that we've got some kind of new updates about what they've been cranking out

1:28.5

lately or what's to come so we'll talk about them part way through the

1:31.8

episode my name is West Boss. I am a full stack developer from Canada and with me as always is Scott Tolinsky. How you doing today Scott?

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.