{"id":49364070,"url":"https://github.com/nisalgunawardhana/api-learning-101","last_synced_at":"2026-04-27T18:07:55.803Z","repository":{"id":331695956,"uuid":"1131849492","full_name":"nisalgunawardhana/api-learning-101","owner":"nisalgunawardhana","description":"Welcome to API Learning 101! This repository is your comprehensive guide to understanding and working with APIs, complete with a fully functional REST API backend and hands-on learning resources.","archived":false,"fork":false,"pushed_at":"2026-01-20T14:47:05.000Z","size":936,"stargazers_count":19,"open_issues_count":7,"forks_count":46,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T23:04:53.944Z","etag":null,"topics":["api","api-learning","api-rest","postman","postman-api"],"latest_commit_sha":null,"homepage":"https://api-learning-101.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nisalgunawardhana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T20:16:56.000Z","updated_at":"2026-01-20T18:50:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nisalgunawardhana/api-learning-101","commit_stats":null,"previous_names":["nisalgunawardhana/api-learning-101"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nisalgunawardhana/api-learning-101","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisalgunawardhana%2Fapi-learning-101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisalgunawardhana%2Fapi-learning-101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisalgunawardhana%2Fapi-learning-101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisalgunawardhana%2Fapi-learning-101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nisalgunawardhana","download_url":"https://codeload.github.com/nisalgunawardhana/api-learning-101/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisalgunawardhana%2Fapi-learning-101/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32348093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-learning","api-rest","postman","postman-api"],"created_at":"2026-04-27T18:07:54.672Z","updated_at":"2026-04-27T18:07:55.796Z","avatar_url":"https://github.com/nisalgunawardhana.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Learning 101 🚀\n\nWelcome to API Learning 101! This repository is your comprehensive guide to understanding and working with APIs, complete with a fully functional REST API backend and hands-on learning resources.\n\n![API Learning 101 Banner](images/banner.png)\n\n## 🌐 Live Demo\n\n**Backend API**: [api-learning.nisalgunawardhana.com](https://api-learning.nisalgunawardhana.com)\n\n## 📚 What You'll Learn\n\nThis repository provides:\n\n- **Complete API fundamentals** - HTTP methods, status codes, headers, REST principles\n- **Working backend API** - Real API you can interact with\n- **Postman collection** - Ready-to-use API tests\n- **Hands-on examples** - Practical demonstrations\n- **Best practices** - Industry-standard approaches\n\n## 📂 Repository Structure\n\n```\napi-learning-101/\n├── docs/\n│   ├── 01-what-is-api.md\n│   ├── 02-http-methods.md\n│   ├── 03-status-codes.md\n│   ├── 04-rest-principles.md\n│   ├── 05-postman-guide.md\n│   └── screenshots/\n├── backend/\n│   ├── api/\n│   │   └── index.js\n│   ├── data/\n│   │   └── users.json\n│   ├── package.json\n│   └── README.md\n├── postman/\n│   └── API-Learning-101.postman_collection.json\n├── .github/\n│   ├── ISSUE_TEMPLATE/\n│   └── workflows/\n└── vercel.json\n```\n\n## 🚀 Quick Start\n\n### 1. Access the Public Postman Collection\n\n**🌟 Postman Workspace**: [API Learning 101 Collection](https://www.postman.com/cloudy-water-123799/workspace/api-learning)\n\n1. Open the public Postman workspace link above\n2. Fork the collection to your workspace\n3. Start testing with the live API at `https://api-learning.nisalgunawardhana.com`\n\n### 2. (Optional) Local Testing\n\nIf you want to test locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/nisalgunawardhana/api-learning-101.git\ncd api-learning-101\n\n# Install dependencies\ncd backend\nnpm install\n\n# Run locally\nnpm start\n```\n\nThe API will be available at `http://localhost:3000`\n\n## 🎯 API Endpoints\n\n**Base URL**: `https://api-learning.nisalgunawardhana.com`\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| GET | `/api/users` | Get all users |\n| GET | `/api/users/:id` | Get user by ID |\n| POST | `/api/users` | Create new user |\n| PUT | `/api/users/:id` | Update user |\n| DELETE | `/api/users/:id` | Delete user |\n| GET | `/api/reset` | Reset data to initial state |\n\n**💡 Note about Data Persistence:**\n- The API uses **in-memory storage** (no database required!)\n- Data persists during the serverless function's lifetime\n- Changes are temporary and reset periodically on Vercel\n- Use `GET /api/reset` to manually reload initial data\n- Perfect for learning and testing without worrying about data cleanup!\n\n## 📖 Learning Path\n\nFollow these guides in order:\n\n1. [What is an API?](docs/01-what-is-api.md)\n2. [HTTP Methods](docs/02-http-methods.md)\n3. [Status Codes](docs/03-status-codes.md)\n4. [REST Principles](docs/04-rest-principles.md)\n5. [Postman Guide](docs/05-postman-guide.md)\n\n## 🧪 Complete Testing Guide\n\n### Step 1: Access Postman Collection\n\n1. Visit the public workspace: [API Learning 101 Collection](https://www.postman.com/cloudy-water-123799/workspace/api-learning)\n2. Click **Fork Collection** to add it to your workspace\n3. All requests are pre-configured with the production URL\n\n### Step 2: Test Each Request Type\n\nYou must test all request types and capture screenshots for submission:\n\n#### 🔍 **GET Request - Fetch All Users**\n\n1. Select `GET All Users` from the collection\n2. Click **Send**\n3. Verify status code: `200 OK`\n4. **Take a screenshot** showing:\n   - Request URL\n   - Response status\n   - Response body with user data\n\n#### 🔍 **GET Request - Fetch Single User**\n\n1. Select `GET User by ID` from the collection\n2. Replace `:id` with `1` in the URL\n3. Click **Send**\n4. Verify status code: `200 OK`\n5. **Take a screenshot**\n\n#### ➕ **POST Request - Create User**\n\n1. Select `POST Create User` from the collection\n2. Go to **Body** tab (raw JSON)\n3. Use this sample data:\n   ```json\n   {\n     \"name\": \"Your Name\",\n     \"email\": \"yourname@example.com\",\n     \"age\": 25\n   }\n   ```\n4. Click **Send**\n5. Verify status code: `201 Created`\n6. **Take a screenshot** showing the created user with generated ID\n\n#### ✏️ **PUT Request - Update User**\n\n1. Select `PUT Update User` from the collection\n2. Use the ID from your created user\n3. Update the data in Body:\n   ```json\n   {\n     \"name\": \"Updated Name\",\n     \"email\": \"updated@example.com\",\n     \"age\": 26\n   }\n   ```\n4. Click **Send**\n5. Verify status code: `200 OK`\n6. **Take a screenshot** showing the updated user\n\n#### 🗑️ **DELETE Request - Remove User**\n\n1. Select `DELETE User` from the collection\n2. Use the ID of the user you created\n3. Click **Send**\n4. Verify status code: `200 OK`\n5. **Take a screenshot** showing successful deletion message\n\n### Step 3: Organize Your Screenshots\n\nCreate a folder named `screenshots-[your-github-username]` with all 5 screenshots:\n```\nscreenshots-yourusername/\n├── 01-get-all-users.png\n├── 02-get-single-user.png\n├── 03-post-create-user.png\n├── 04-put-update-user.png\n└── 05-delete-user.png\n```\n\n### Step 4: Submit Your Work\n\n1. Add your screenshots to the `docs/screenshots/` folder\n2. Create a Pull Request with your screenshots\n3. Go to **Issues** → **New Issue**\n4. Select **📝 Submission** template\n5. Fill in:\n   - Your name\n   - Email address (for badges and prize notifications)\n   - GitHub username\n   - PR number\n   - T-shirt size (for winners only)\n6. Submit the issue\n\n**Note**: Your submission will be automatically assigned to @nisalgunawardhana for review. Once approved, you'll receive completion badges!\n\n### 🎁 Social Media Bonus!\n\nIncrease your chances to win **Postman swags**:\n1. Share your completion on Twitter/LinkedIn/Facebook\n2. Tag **@NisalGunawardhana** and **@Postman**\n3. Use hashtag **#APILearning101**\n4. Winners will be selected randomly from all approved submissions!\n\n## 🏆 Rewards \u0026 Badges\n\nAfter successful submission and review:\n\n**Everyone receives:**\n- ✅ **Submission Approved Badge**\n- 🎓 **API Learning 101 Completion Badge**\n\n**Random winners receive:**\n- 👕 **Exclusive T-Shirt** (winners selected randomly)\n- 🎁 **Chance for Postman Swags** (share on social media for more chances!)\n\nWe've included a comprehensive Postman collection with pre-configured requests:\n\n- ✅ All CRUD operations\n- ✅ Pre-request scripts\n- ✅ Tests for validation\n- ✅ Environment variables\n\nSee the [Postman Guide](docs/05-postman-guide.md) for detailed instructions.\n\n## 💻 Backend Technology\n\n- **Runtime**: Node.js\n- **Framework**: Express.js\n- **Storage**: JSON file (no database needed!)\n- **Hosting**: Vercel\n\n## 🤝 Contributing\n\nWe welcome contributions! Please submit your work:\n\n1. Fork the repository\n2. Create your feature branch\n3. Make your changes\n4. Submit a pull request\n5. Create a submission issue\n\nYour submission will be reviewed and you'll receive contributor badges!\n\n## 📝 Submission Process\n\n1. Complete your work and create a PR\n2. Use the **Submission** issue template\n3. Fill in all required details\n4. Your submission will be automatically tagged and assigned for review\n5. Receive your contributor badge upon approval! 🏆\n\n## 🏆 Badges\n\nContributors receive badges based on their submissions:\n- 🟡 Pending Review\n- ✅ Approved\n- 🎉 Closed/Completed\n\n## 📄 License\n\nMIT License - feel free to use this for learning!\n\n## 👨‍💻 Maintainer\n\n**Nisal Gunawardhana** ([@nisalgunawardhana](https://github.com/nisalgunawardhana))\n\n---\n\nHappy Learning! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisalgunawardhana%2Fapi-learning-101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnisalgunawardhana%2Fapi-learning-101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisalgunawardhana%2Fapi-learning-101/lists"}