My API journey

Basics:

  • learnt what is HTTP

  • basic aspects of HTTP

  • methods

  • APIs based on HTTP

  • HTTP request and response

  • why HTTP over HTTPS

  • how we are migrating APIs from HTTP or HTTPS and what is the correlation between them

Web development:

HTML:

HTML is at the core of every web page, regardless of the complexity of a site or the several technologies involved. It's an essential skill for any web professional. It's the starting point for anyone learning how to create content for the web. And, luckily for us, it's surprisingly easy to learn.

For example, the words you're reading right now are part of a paragraph. If I were coding this web page from scratch. I would have started this paragraph with an opening paragraph tag: <p>. The "tag" part is denoted by open brackets, and the letter "p" tells the computer that we're opening a paragraph instead of some other type of content.

CSS:

CSS stands for Cascading Style Sheets. This programming language dictates how the HTML elements of a website should appear on the frontend of the page. If the HTML is the drywall, then CSS is the paint.

HTML provides the raw tools needed to structure content on a website. CSS, on the other hand, helps to style this content so it appears to the user the way it was intended to be seen. These languages are kept separate to ensure websites are built correctly before they're reformatted.

javascript:

JavaScript is a more complicated language than HTML or CSS, and it wasn't released in beta form until 1995. Nowadays, JavaScript is supported by all modern web browsers and is used on almost every site on the web for more powerful and complex functionality.

In short, JavaScript is a programming language that lets web developers design interactive sites. Most of the dynamic behaviour you'll see on a web page is thanks to JavaScript, which augments a browser's default controls and behaviours.

Using open API on the internet and integrating it on the website:

  • first, we fetch an API in a static website, one has to use javascript to fetch the data from an API and show it in the website as UI.

  • getting the API by creating the account in the genderize

  • with the help of javascript, we can add functionality to our code.

  • then writing code which you can see on my GitHub

creating nodejs API and integrating it into our website

  • firstly, I built and ran an express server with node.js

  • then I created a GET endpoint which returns a list of user databases and the name, description and age are stored in a JSON file.

  • here is my GitHub link.

adding database (mongoDB)

  • after creating an account in mongoDB successfully, connect with database by writing the below code:
mongoose
  .set('strictQuery', true)
  .connect(process.env.DATABASE, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
  })
  .then(() => console.log("DataBase Connected Successfully..."))
  .catch((err) => console.log(err));
  • Here we connect mongoDB by calling mongoose.

  • It will state "database connected successfully...".

then we writing a test on thunderclient (extension in VScode) mentioned below

  • As you can see, it shows status: "200 OK" which states it is executed successfully.

  • Hence, I added a database in my API.

How keploy helped me from zero knowledge of API to making API, integrating API into an website and adding a database in my existing API

  • keploy planned their 6 days session in a such way that one can easily learn API at their own pace.

  • They created a community page in slack where we can ask for doubts.

  • They also had recorded the session and they gave task on each completed session so that what we learnt, we can apply as well.

Conclusion

  • API is fun and it plays a vital role between two applications where they can exchange information.

  • APIs are an accessible way to extract and share data within and across organizations.

  • If you are confused where to learn about API and its applications then you can definitely learn it with keploy fellowship program as its free, have doubt support, daily task and a chance to win swags, certificates or even a chance to become a teacher in keploy.