This repository contains my Postman API Fundamentals Student Expert Certification project completed as a Web Engineering Lab task at my university.
Student: Redwan Rahman
Department of Computer Science and Engineering
Daffodil International University
Course Name: Web Engineering Lab
Course Code: CSE416
Lab Instructor:
Mr. Md. Alvee Ehsan
Lecturer, Department of Computer Science and Engineering
Daffodil International University
https://faculty.daffodilvarsity.edu.bd/profile/cse/alveehsan.html
Fork Link for Evaluation:
Postman API Fundamentals Student Expert Test Collection
- Project Overview
- API Endpoints Implemented
- File Structure
- Key Learning Outcomes
- Technical Implementation
- Automation & Scripting
- How to Use
This project demonstrates mastery of API testing and automation using Postman. The implementation includes comprehensive testing of a library management system API with full CRUD operations, authentication, and advanced scripting features.
- β Complete CRUD operations for book management
- β Query parameter filtering and search functionality
- β Dynamic variable management and data persistence
- β API authentication with API keys
- β Automated testing with pre/post-request scripts
- β Collection organization and documentation
- Method:
GET - URL:
{{baseUrl}}/books - Description: Retrieve all books from the library collection
- Query Parameters: None
- Method:
GET - URL:
{{baseUrl}}/books - Description: Retrieve fiction books that are not checked out
- Query Parameters:
genre=fictioncheckedOut=false
- Method:
GET - URL:
{{baseUrl}}/books/:id - Description: Retrieve a specific book using its unique identifier
- Path Variables:
:id(replaced with actual book ID)
- Method:
POST - URL:
{{baseUrl}}/books - Description: Add a new book to the library collection
- Body (JSON):
{
"title": "Sahih al-Bukhari",
"author": "Imam Muhammad ibn Ismail al-Bukhari",
"genre": "hadith-collection",
"yearPublished": 846
}- Post-Request Script: Saves book ID to collection variable
- Method:
PATCH - URL:
{{baseUrl}}/books/:id - Description: Update book status to checked out
- Body (JSON):
{
"checkedOut": true
}- Method:
DELETE - URL:
{{baseUrl}}/books/:id - Description: Remove a book from the library collection
- Path Variables:
:id(uses saved collection variable)
- Method:
POST - URL:
{{skillcheckBaseUrl}}/post - Description: Certification validation endpoint
- Query Parameters:
movieName=Kingdom of Heaven - Authorization: API Key (
student-expert: skillcheck) - Body (JSON):
{
"actorName": "Orlando Bloom"
}- Post-Response Script: Saves
actorNameasfavoriteActorvariable
postman-api-fundamentals-student-expert/
βββ Request JSON/ # API request specifications
β βββ get-all-books.json # Get all books request
β βββ get-fiction-books.json # Get filtered fiction books
β βββ get-book-by-id.json # Get book by ID request
β βββ add-book.json # Add new book request
β βββ checkout-book.json # Checkout book request
β βββ delete-book.json # Delete book request
β βββ skillcheck.json # Skill check request
βββ Scripts/ # Postman automation scripts
β βββ save id.js # Script to save book ID
β βββ skillcheck.js # Skill check automation
β βββ postman test script.js # General testing script
β βββ final check.js # Final validation script
β βββ halfway check.js # Intermediate validation
βββ Response Examples/ # API response samples
β βββ add book response.json # Sample add book response
β βββ Sahih Bukhari.json # Book data example
β βββ checkout.json # Checkout response example
βββ README.md # Project documentation
- Understanding of RESTful API principles and HTTP methods
- Mastery of request-response lifecycle and status codes
- Proper handling of JSON payloads and data structures
- Knowledge of API endpoints, paths, and parameter usage
- Advanced collection and request organization
- Efficient use of environment and collection variables
- Query parameter manipulation and path variable usage
- Response interpretation and data extraction techniques
- Implementation of API key authentication
- Understanding of request-level authorization
- Secure handling of credentials and sensitive data
- Pre-request script implementation for dynamic data
- Post-response script automation for data persistence
- JavaScript-based testing and validation logic
- Variable management and data flow between requests
- Comprehensive API endpoint testing strategies
- Status code validation and error handling
- Response data verification and extraction
- Automated test suite development
The project implements sophisticated variable management:
- Collection Variables:
id,favoriteActor - Environment Variables:
baseUrl,skillcheckBaseUrl - Dynamic Data Flow: Automatic ID capture and reuse across requests
- API Key Authentication: Implemented at request level
- Key-Value Pairs:
student-expert: skillcheck - Secure Credential Management: No hardcoded sensitive data
- Automatic extraction and storage of response data
- Cross-request data sharing through collection variables
- Persistent state management across test sessions
Save Book ID Script (save id.js):
// Save the "id" value from the response to a variable named "id"
const id = pm.response.json().id;
// Save the id as a collection variable named "id"
pm.collectionVariables.set("id", id);Skill Check Script (skillcheck.js):
// Parse the JSON response
const jsonData = pm.response.json();
// Check if actorName exists in the response
if (jsonData.json && jsonData.json.actorName) {
// Save it as a collection variable named "favoriteActor"
pm.collectionVariables.set("favoriteActor", jsonData.json.actorName);
console.log("favoriteActor variable set to:", jsonData.json.actorName);
} else {
console.warn("actorName not found in response");
}- Import Collection: Import the Postman collection using the fork link provided
- Set Environment: Configure
baseUrlandskillcheckBaseUrlvariables - Run Requests: Execute requests in sequence for proper data flow
- Monitor Variables: Check collection variables for automatically saved data
- Validate Responses: Review response data and status codes
- Execute Scripts: Post-request scripts will automatically manage variables
This project successfully demonstrates all required competencies for the Postman API Fundamentals Student Expert certification, including:
- β API request creation and execution
- β Response handling and data extraction
- β Variable management and automation
- β Authentication implementation
- β Script-based testing and validation
- β Collection organization and documentation
