Back to the full dot-point answer

NSWSoftware EngineeringQuick questions

Module 2: Programming for the Web

Quick questions on APIs and REST explained: HSC Software Engineering Module 2

12short Q&A pairs drawn directly from our worked dot-point answer. For full context and worked exam questions, read the parent dot-point page.

What is what REST is?
Show answer
REST (Representational State Transfer) is an architectural style for APIs:
What is designing endpoints?
Show answer
Use plural nouns for collections, IDs for items:
What is jSON?
Show answer
Use camelCase or snake_case consistently. Use ISO 8601 (2026-06-15, 2026-06-15T10:00:00Z) for dates and times.
What is a worked endpoint?
Show answer
A Flask handler for POST /api/tasks:
What is consuming from Python?
Show answer
From a Python script or another back-end service, the requests library is the conventional choice for calling a REST API. It handles connection pooling and JSON parsing for you.
What is filtering and pagination?
Show answer
GET on a collection takes query string filters:
What is versioning?
Show answer
Plan for change. Include the version in the URL prefix:
What is security?
Show answer
:::worked Worked example A team is migrating from a non-REST API at /api/getUser?id=12 to REST. Suggest a REST design and explain the improvements.
What is inconsistent status codes?
Show answer
Returning 200 for every response, even errors, breaks every consumer that uses status codes.
What is no authentication on writes?
Show answer
Anyone can POST to your API if you do not authenticate.
What is returning full database rows?
Show answer
Sensitive columns (password hash, internal flags) leak. Map explicitly.
What is confusing PUT and PATCH?
Show answer
PUT replaces the whole resource (any missing fields become null or default). PATCH applies a partial update. If unsure, use PATCH.

All Software EngineeringQ&A pages