What Is a Web Service?
A web service is a program that other programs call over a network using standard web protocols — usually HTTP, the same protocol browsers use. Instead of returning web pages for humans, it returns data (typically JSON) for other software. This matters for integration because HTTP travels everywhere: through firewalls, across the internet, between any languages. Two big styles exist. SOAP is the older, XML-heavy standard with strict contracts (WSDL files) — still used by banks and government systems. REST (REpresentational State Transfer) is the dominant modern style: simple HTTP requests to URLs that represent resources. When your weather app shows a PAGASA-style forecast, or a delivery app tracks a parcel, a REST API call is happening behind the scenes. In this course, "API" (Application Programming Interface) usually means a REST web service.
REST Fundamentals: Resources, Verbs, and Status Codes
REST organizes an API around resources identified by URLs, such as /students or /students/2024-00123. You act on resources with HTTP methods: GET reads data, POST creates something new, PUT/PATCH update it, and DELETE removes it. The server replies with a status code: 200 OK (success), 201 Created, 400 Bad Request (your input was wrong), 401 Unauthorized, 404 Not Found, and 500 Internal Server Error (the server crashed). Request and response bodies are usually JSON, with headers carrying metadata like Content-Type: application/json. A well-designed REST API is predictable: GET /subjects lists subjects, GET /subjects/ipt1 fetches one, POST /subjects adds one. Exams love asking you to match methods to actions and to interpret status codes — memorize the ones above cold.
Consuming an API in Practice
ProReviewer — locked
Drills, code labs, and full solutions.
Practice & Exam Drills — Lesson 3
ProReviewer — locked
Drills, code labs, and full solutions.