1. LandOffer
  2. Blog
  3. All articles
  4. API Portfolio for Job Applications: Show Requests, Examples, and Honest Mock Behavior

Job search

API Portfolio for Job Applications: Show Requests, Examples, and Honest Mock Behavior

Show an inspectable API contract and request sequence, distinguish implemented logic from fixtures, and describe storage, authentication, and limits honestly.

9 min readLandOffer team

An API portfolio should let a reviewer connect a documented request to an observable response and understand which behavior your code implements. Show a small contract, representative examples, failure cases, and reproducible checks. Label mocks beside the demonstration itself. A realistic response body does not establish persistence, authentication, rate limiting, or a production service.

Choose a narrow workflow relevant to the role rather than a large collection of unexplained endpoints. LandOffer.ai can help you explore roles while you identify the engineering work your portfolio should demonstrate. The original examples here run offline through Python function calls. They are not public endpoints, live HTTP traffic, customer systems, or a claim of production security.

An engineer compares a transparent request-processing mechanism with a separate display presenting a fixed example response.

Give the reviewer a contract and a way to inspect it

A resume can state that you built an API; a portfolio should make the claim inspectable. Name the operation, method, path, input, status, output, and error behavior. Explain the state that changes and the conditions under which a reviewer can reproduce the result. Lead with the workflow a reviewer can inspect. Then name the language or framework where it helps explain how the behavior works.

Distinguish a documented intention from an implemented rule. If the contract says a missing resource returns an error, include the request that exercises that condition and the resulting response. If you have only written the error example, call it an example. The same distinction applies to validation, authorization, storage, and request limits. Include a counterexample that could reveal a misleading success: change an identifier, remove a required field, or repeat a call after resetting the demonstration.

MDN’s HTTP status reference explains statuses such as 201 for creation, 404 for an unavailable resource, and 429 for too many requests. Use status semantics deliberately, alongside a useful error body. Returning a familiar status number in a fixture does not prove the corresponding condition was detected.

A reproducible package should state its runtime, dependencies, setup, command, inputs, and expected outputs. Identify whether a check calls a function, an HTTP server, or an external service. Those conditions establish different evidence. Keep secrets and private data out of examples and use an isolated environment for any optional demonstration.

Name the type of mock rather than treating all mocks alike

Postman’s current v12 documentation distinguishes collection mocks that select saved examples from mocks with custom JavaScript handlers. The latter can contain logic and state. It would therefore be inaccurate to say every mock is a static response. Inspect the particular implementation and explain what it simulates.

A fixed fixture can be useful for discussing a response shape or helping someone build a user interface. A handler-based simulation can demonstrate more behavior. Neither automatically establishes that a production database, identity provider, or downstream system exists. Define the boundary in the README and next to the relevant example, not only in a disclaimer far below it.

The two examples below are original fictional API designs. Their local Python implementation and checks use no network connection, API key, account, or private input. The status and JSON pairs are API-shaped outputs from direct calls, not captured HTTP responses. The envelopes below place the returned pair into named status and body fields for reading; they are not an HTTP wire format. The sample paths describe the intended interface; there is no deployed base URL.

Worked implementation: create and retrieve a label

Purpose and scope: A small label catalog demonstrates input handling and a create/read sequence. The implementation stores records in a Python object for that instance only. It has no database, HTTP listener, authentication, authorization, or rate limiter. These omissions are part of the documented scope, not features implied by a successful example.

Contract: POST /v1/labels accepts an object containing a nonblank string named label. The handler trims surrounding whitespace, assigns a sequential identifier, and returns the new record with status 201. This deliberately small contract does not define uniqueness, maximum length, Unicode normalization, or concurrent writes.

Completed request:

POST /v1/labels
Content-Type: application/json

{"label":" Release "}

Actual offline handler output:

{"status":201,"body":{"id":"label-1","label":"Release"}}

The subsequent request GET /v1/labels/label-1 returns status 200 and the same record. This result comes from the record created in the same handler instance, rather than from an unrelated saved response. It demonstrates a narrow state transition: accepted input becomes a retrievable in-memory record.

Completed invalid-input example: Sending {"label":" "} to the create operation returns:

{"status":422,"body":{"error":{"code":"LABEL_REQUIRED","field":"label"}}}

A missing, non-string, or blank label takes that validation path in this implementation. The handler does not first create a record and then report an error. A request for GET /v1/labels/label-99, which has not been created in the example sequence, returns:

{"status":404,"body":{"error":{"code":"LABEL_NOT_FOUND"}}}

Reproducible checks and limits: The original offline_api_demo.py contains the handler and assertions for creation, retrieval, blank-input rejection, and an unknown identifier. Running it writes a result record, including the Python version and the status/body envelopes shown here. The checked runtime was Python 3.12.14. No web server or external service is started. It also creates a fresh handler instance and verifies that the earlier record is absent. This exposes the storage boundary: the example is stateful within an instance, but it has no durable persistence.

The checks deliberately include a create request with no authentication headers. It still succeeds because there is no authentication implementation. Six successive reads also return the record; the code contains no request counter or limiter. The portfolio description must therefore say “authentication and rate limiting not implemented,” rather than inventing a 401 or 429 policy because those statuses are familiar.

Contribution statement: “Implemented a small offline label handler with validation, generated identifiers, instance-local storage, and reproducible create/read/error checks. No HTTP transport, durable database, identity system, permission enforcement, or rate limiting is included.” This claim matches the artifact without turning an educational function into a production service.

Rejected demonstration: Show only a 201 response screenshot and describe the API as complete. That would hide whether the response depends on the input, whether retrieval uses stored state, and what happens after a reset. The small sequence gives a reviewer more useful evidence than an impressive-looking success body alone.

A developer compares a stored record with a fixed response prop, using separate paths to distinguish implemented behavior from a mock display.

Worked mock: a room response that never checks the room

Purpose: A second artifact demonstrates a response shape for a fictional room-status view. It is a deliberately fixed local fixture, not a room inventory, reservation service, or source of real availability. It contains no person, location, booking, or customer information.

Documented target behavior: The proposed interface is GET /v1/rooms/{id}. A future implementation would look up the requested room and return a matching record or a documented not-found response. Authentication, permissions, freshness, and request limits are unresolved. The current fixture implements none of those requirements.

Completed intended request:

GET /v1/rooms/room-demo

Actual fixed fixture output:

{"status":200,"body":{"id":"room-demo","state":"available","source":"fixture"}}

The explicit source field helps identify this as fixture data, but the accompanying description remains necessary. “Available” is just a string in this teaching artifact. It does not establish that a room exists, has been checked, or can be reserved.

Counterexample request: GET /v1/rooms/not-defined returns the identical status and body, including the identifier room-demo. An unrelated POST /not-a-real-route with an unexpected body also returns the same fixture. These are actual results of direct calls to this fixed implementation. They demonstrate that it ignores the request rather than validating the path, method, or resource identifier.

Completed comparison record:

  • Known identifier: The example shape is returned. This supports inspecting the proposed fields, not resource lookup.
  • Unknown identifier: The same record appears. The target not-found behavior is unimplemented.
  • Unexpected method and body: The same output appears. Routing and input validation are unimplemented.
  • No credentials: No identity or permission decision occurs. There is no authorization evidence to claim.
  • Repeated calls: The response remains fixed. No real freshness check, inventory update, reservation, or rate policy is demonstrated.

Reproducible check: The local script calls all three request variants and asserts that their outputs are equal. It does not label this a successful test of the proposed room API. A future lookup implementation would need a different assertion: the unknown identifier should receive its own not-found result rather than the known-room fixture. It is a successful check that the fixture behaves as documented. The planned contract and the implemented fixture disagree on lookup behavior, and that gap is intentionally visible.

Handoff note: “Use this fixture to discuss the proposed room response format. Do not use it to infer actual availability, not-found handling, authentication, or reservation behavior. The next implementation step would be resource lookup with explicit failure cases, followed by a separately defined permission model. No live service or production validation is claimed.”

This artifact is useful when the reviewer wants to see whether you understand the limits of a mock. If the role requires demonstrated backend implementation, it should accompany stronger implementation evidence rather than substitute for it.

Document authentication and limits without pretending to enforce them

The OpenAPI learning guide explains how security schemes and requirements describe an API’s protection, including requirements at the operation level. It also notes that deployment details such as onboarding and key exchange are outside that description’s scope. A security declaration helps readers understand an intended interface; it is not evidence that a running system enforces the policy.

For each portfolio operation, identify what is implemented, what is simulated, and what is planned. If authentication exists, explain its tested scope without publishing credentials. If permissions are unimplemented, say so. A header named Authorization is not itself an identity check, and accepting a token-shaped string is not proof that the caller may access a particular record.

Apply the same precision to rate limits and persistence. Document a real limit only if the implementation and checks support it. A fixed 429 example is different from counting requests over a defined interval. A record surviving two calls in one process is different from surviving a restart. Likewise, a passing finite example sequence cannot establish behavior under concurrency, network failures, or other untested conditions. The examples here demonstrate these boundaries without claiming deployment readiness or a security assessment.

Package the evidence around one inspectable workflow

Keep the contract, implementation or fixture, example sequence, and check command together. The local demonstration here uses Python’s standard library and can be checked with python offline_api_demo.py; it performs direct calls only. A reviewer of a real portfolio should also be told which runtime was checked and what setup is required. Do not make them discover the mock boundary by reading every source file.

For this offline package, copy the script into a writable local folder and run it there with the stated Python runtime. It writes its result file beside the script. Each run constructs a fresh label instance and a fixed fixture, so earlier run data is not a prerequisite. Read the implementation alongside the assertions: a check can establish only the condition it exercises. If you adapt the example to an HTTP server or database, update the setup and claims rather than presenting these direct-call results as evidence for the added layers.

The official sources were accessed October 22, 2026. MDN’s page displays a September 17, 2026 modification date. The reviewed Postman page identifies the current v12 documentation; no publication date was displayed for it or the OpenAPI learning page. No Postman workspace, public endpoint, or external service was created or tested for this guide.

To select your own workflow, browse recent roles on LandOffer.ai and identify the API responsibility you want to demonstrate. Choose one workflow and prepare its contract, implementation or fixture, request sequence, observed outputs, failure cases, and remaining gaps. Keep the demonstration label visible wherever the reviewer starts.

Sources and Further Reading