0% found this document useful (0 votes)
53 views5 pages

POSTMAN Notes

The Postman API Student Expert Course covers the definition, importance, and types of APIs, as well as their roles in various industries. It teaches how to use the Postman platform for API requests, including creating workspaces, managing variables, and implementing authentication. The course emphasizes REST APIs and includes practical examples and scripting for automation.

Uploaded by

carnationethics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views5 pages

POSTMAN Notes

The Postman API Student Expert Course covers the definition, importance, and types of APIs, as well as their roles in various industries. It teaches how to use the Postman platform for API requests, including creating workspaces, managing variables, and implementing authentication. The course emphasizes REST APIs and includes practical examples and scripting for automation.

Uploaded by

carnationethics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Notes: Postman API Student Expert Course

1 Learning Objectives
• Define Application Programming Interfaces (APIs) and explain their role in
modern software.
• Describe the importance of APIs for developers, enterprises, and end-users.
• Identify roles and industries that work with APIs and their benefits.
• Differentiate between types of APIs (hardware, software library, web) and ar-
chitectures (REST, GraphQL, etc.).
• Explain API access levels (public, private, partner) and their use cases.
• Understand the Postman API platform and its advantages over tools like cURL.
• Describe the request-response pattern and components (client, API, server).
• Use Postman to create workspaces, collections, and make API requests.
• Implement query parameters, path variables, and authentication in API re-
quests.
• Utilize variables in Postman for reusability and security.
• Write pre-request and post-response scripts in Postman for automation.
• Generate code snippets in Postman for integrating API calls into applications.

2 Notes
2.1 Introduction to APIs
• Definition: An Application Programming Interface (API) is a contract enabling
code-to-code communication, serving as building blocks for modern software
by sharing resources and services across applications, organizations, and de-
vices.
• Examples: Making online payments, checking weather in apps, syncing Spo-
tify across devices, embedding Google Maps in apps.
• Video: Create a workspace.

1
2.2 Importance of APIs
• For Developers: Enable integration of features and automation without re-
dundant work (e.g., using a Weather API instead of building one).
• For Enterprises: Open products for faster innovation (e.g., apps posting via
Twitter/Meta APIs).
• As Products: APIs can be standalone offerings (e.g., Stripe’s payment APIs,
Twilio’s messaging APIs).
• Video: Create a collection.

2.3 Who Works with APIs


• Roles: Beyond developers, includes management, solutions architects, busi-
ness/data analysts, educators, researchers (per Postman’s State of the API Re-
port).
• Industries: Primarily tech, IT, banking, but applicable across all sectors due
to standardized data access.
• Video: Get books from the library API.

2.4 Who Benefits from APIs


• Everyone: APIs enhance efficiency and connect services, benefiting users di-
rectly (e.g., app features) or indirectly (e.g., streamlined processes).

2.5 API Analogy: Digital Restaurant


• Concept: APIs act like waiters, mediating between clients (customers) and
servers (kitchen).
• Mapping:
– Client: Requester (e.g., browser, app) = Customer.
– API: Interface = Waiter.
– Server: Backend processing = Kitchen.
• Example: Requesting data/service via API is like ordering soup without need-
ing to cook it.

2.6 Types of APIs


• Hardware APIs: Software-to-hardware communication (e.g., phone camera to
OS).
• Software Library APIs: Consuming code from libraries (e.g., imported meth-
ods).
• Web APIs: Network-based communication (e.g., fetching stock prices online).

2
• Example: Uploading a photo to Instagram uses hardware (camera), software
library (filters), and web (server upload) APIs.

2.7 API Architectures


• Types: REST, GraphQL, WebSockets, webhooks, SOAP, gRPC, MQTT.
• Focus: Course emphasizes REST APIs due to widespread adoption.
• REST Traits: Stateless, cacheable, supports various data types.

2.8 API Access Levels


• Public (Open APIs): Accessible to anyone (e.g., Postman Library API).

• Private APIs: Internal organization use only.
• Partner APIs: Shared between organizations with relationships.
• Course Focus: Uses a public REST Web API.

2.9 Postman API Platform


• Overview: Simplifies API lifecycle (building, testing, collaboration), trusted by
over 20 million users.
• vs. cURL: cURL lacks persistence and collaboration; Postman offers format-
ted responses, saves requests, and shares metadata (e.g., status code, response
time).
• Vision: API-First World where APIs are prioritized, easily consumable, and
discoverable.
• Example: Fetching GitHub user data (postmanlabs) in Postman vs. cURL.

2.10 Request-Response Pattern


• Concept: Client (e.g., Postman) sends request over network to server (e.g.,
https://library-api.postman.ai); server processes and returns response.
• Example: GET /books returns a book list.

2.11 Variables in Postman


• Purpose: Reuse values (DRY principle), hide sensitive data (e.g., API keys).
• Syntax: {{variableName}}.
• Scopes: Global, collection, environment, data, local (narrowest scope priori-
tized).
• Video: Variables in Postman.

3
2.12 Query Parameters
• Definition: Key-value pairs refining requests, appended to URL after ? (e.g.,
key=value).
• Syntax: Multiple parameters separated by & (e.g., ?key1=value1&key2=value2).
• Example: Google search https://www.google.com/search?q=postman.
• Use: Optional filters or required parameters per API documentation.
• Videos:
– Search books by genre.
– Multiple query parameters.

2.13 Path Variables


• Definition: Dynamic path segments (e.g., IDs, usernames) after a slash.
• Syntax: /path/{variable} (e.g., /users/{username}).
• Example: https://api.github.com/users/postmanlabs.
• vs. Query Parameters:
– Path: In path (e.g., /books/abc123), often for IDs/names.
– Query: At URL end (e.g., /books?search=borges), for filters/options.
• Use: Required per API documentation; notation varies (:variable or {variable}).
• Video: Get a book by ID.

2.14 API Operations


• Add a Book: POST request to create a new book resource.
• Video: Add a book.

2.15 Authentication in Postman


• Methods: Adding authorization headers manually or using Postman’s built-in
auth features.
• Videos:
– Add an auth header.
– Use Postman auth instead.

2.16 Scripting in Postman


• Purpose: Automate and add dynamic behavior to requests.
• Execution: Pre-request scripts (before request) and post-response scripts (af-
ter response).

4
• pm Object: Accesses environment, request/response data, variables (e.g., pm.response.jso
pm.collectionVariables.set(”key”, ”value”)).
• Example: Set a book ID as a collection variable post-response.
• Videos:
– Your first script.
– Grab a new book ID.

2.17 Book Management Operations


• Checkout a Book: Update book status via API request.
• Delete a Book: Remove a book resource.
• Videos:
– Checkout your book.
– Delete your book.

2.18 Postman’s Codegen Feature


• Purpose: Generates code snippets for API integration in languages like Python,
JavaScript, cURL.
• Access: Via code icon (</>) in Postman request interface.
• Example: Generate cURL for GET /books, executable in terminal.
• Advantage: Simplifies embedding API calls in applications.

You might also like