COPS(IITBHU) APIS 101 WITH POSTMAN

API stands for Application Programming Interface.
APIs are the little pieces of code that make it possible for digital devices, software applications, and data servers to talk with each other, and they’re the essential backbone of so many services we n…


This content originally appeared on DEV Community and was authored by Yash Raj

API stands for Application Programming Interface.
APIs are the little pieces of code that make it possible for digital devices, software applications, and data servers to talk with each other, and they’re the essential backbone of so many services we now rely on.

Any Developer, regardless of the Tech Stack they use, should know at least the basic of this fascinating yet simple technology.
To ensure this, COPS (IITBHU) organised a hands-on workshop, hosted by Postman Student Expert Mr. Lakshya Singh!

The Initiation

Lakshya bhaiyya Kicked-Off the Session by introducing himself to the participants and was quick to create a very interactive environment by asking everyone to mention the Engineering Branch they are enrolled in.
Engineer

The Presentation

The Workshop began with a Presentation meant to Familiarise everyone with the basics of APIs and Postman.

Agendas of the workshop

  • Intro to APIs and Postman
  • Requests and Responses
  • Trying things out
  • Follow-up resources
  • Q&A

APIs

Lakshya bhaiyya gave the non-technical explanation of an API using the example of a Restaurant where the waiter (API) takes the Orders of the Customers (Requests), Passes it on to the Chef and then returns with the Dish (Response).

The Technical Definition followed, which in brief was :

API is a software intermediary that allows two applications to talk to each other by taking requests and returning responses

A few more examples were explain what APIs are and what they are used for.

Postman Introduction

Lakshya bhaiyya started-off this section by drawing a comparison between the Terminal (which uses Curl) and Postman for using the API functionalities.
Postman clearly turned out to be the Best choice for API related work since its UI makes it very simple for us to send or receive data and then to process/understand the responses.
Postman is Best

Ingredients to make a Request

  • Method - Type of Request

    GET POST PUT PATCH DELETE

  • Endpoint - Target URL

    http://postman-student.herokuapp.com/

  • Path - The exact location of the desired API

    jokes/1/

A complete API Request made using Axios:

   axios({
         headers: {
             Authorization: "Token " + " "
         },
         url: http://postman-student.herokuapp.com/ + "jokes/1/",
         method: "GET",
         data: {}
     })

Response

  • Status Code - Signify the Success of Failure of Requests/Responses

    200 OK 201 Created 404 Not Found

  • Response Data - JSON

    {
      "id": "1",
      "author": "User",
      "joke": "Bugs are features",
      "source": "jokes.dev"
    }
    

The Hand-On Session

This part of the Workshop Lakshya bhaiyya showed us practical use of APIs using Postman to Create request bodies, send Requests, and then to comprehend the Response received.
We were asked to fork this Basics of API, and then we were able to follow along.

Lakshya Bhaiyya like a true expert showed us all the Request Methods and resolved the issues and queries of the participants instantly.
There were many funny instances also along the way, one of which is:

Lakshya bhaiyya was unable to pick an ID for a new POST request on the jokes/ API because the participants has already taken most of the IDs including 11 (his B'Day Date xD), 22, 101....
He finally chose the ID 111 suggested by me in the comments!

Laughing Gif
We as the Participants were surely amused ;) !

Conclusion

The workshop was wrapped-up with Lakshya bhaiyya sharing the information about being a Postman Student Expert, about Postman being an Organisation in GSOC and how we can contribute to this Splendid Technology as Developers.

He then shared more Resources related to APIs and Postman and ended the workshop with a Q&A session.


The Workshop was a Great Learning experience for me and I was able to make myself more familiar with APIs and how I can use Postman seamlessly to test the APIs I create.
The Host was extremely Co-operative, Friendly and Knowledgeable which made the session even more Interesting and Interactive.

Thank You! : )


This content originally appeared on DEV Community and was authored by Yash Raj


Print Share Comment Cite Upload Translate Updates
APA

Yash Raj | Sciencx (2021-10-02T13:42:07+00:00) COPS(IITBHU) APIS 101 WITH POSTMAN. Retrieved from https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/

MLA
" » COPS(IITBHU) APIS 101 WITH POSTMAN." Yash Raj | Sciencx - Saturday October 2, 2021, https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/
HARVARD
Yash Raj | Sciencx Saturday October 2, 2021 » COPS(IITBHU) APIS 101 WITH POSTMAN., viewed ,<https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/>
VANCOUVER
Yash Raj | Sciencx - » COPS(IITBHU) APIS 101 WITH POSTMAN. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/
CHICAGO
" » COPS(IITBHU) APIS 101 WITH POSTMAN." Yash Raj | Sciencx - Accessed . https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/
IEEE
" » COPS(IITBHU) APIS 101 WITH POSTMAN." Yash Raj | Sciencx [Online]. Available: https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/. [Accessed: ]
rf:citation
» COPS(IITBHU) APIS 101 WITH POSTMAN | Yash Raj | Sciencx | https://www.scien.cx/2021/10/02/copsiitbhu-apis-101-with-postman/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.