Guide
API: What It Means, How It Works, and a Practical Example
Learn what an API does, follow a fictional availability request, and check the contract, permissions, and failure behavior before connecting business software.
By the Space Office team · Published · Updated · 16 min read
API is short for application programming interface: a defined way for software components to interact. A web API can let one application request information or an allowed action from another service using documented inputs and responses. In Space Office, Lithium can prepare backend API work and Carbon can test its behavior. Hydrogen coordinates and reviews the work; a human grants access, verifies the data and permissions, and approves deployment or consequential actions.

Key takeaways
- An API defines a software interaction; it is broader than a website URL or a database.
- Read the contract: the operation, inputs, response fields, access rules, and documented limits.
- A successful availability lookup is not a reservation, payment, or promise of future stock.
- Check normal results, empty results, errors, and authorization with appropriate test accounts.
- Keep a named owner for credentials, changes, monitoring, and the human release decision.
To understand where a software interface runs, use the cloud computing guide. It maps a class-booking workload to service models, data boundaries, and operating responsibilities before deployment.
For the data behind a software interface, learn SQL with a small query and checks of record meaning, missing values, and joins. For behavior inside a web page, the JavaScript guide follows a local calculator from input to tested feedback. These are different layers of an application.
Download the free API planning and test worksheet for the task brief, contract, request/response map, permissions, failure cases, and release review. The equipment library, endpoints, response fields, and values below are fictional teaching examples. They do not describe a working Space Office endpoint or a real provider integration.
What an API means and where you use one
MDN’s API definition describes an interface through which software can interact with another component. Think of it as a defined boundary: the caller knows which operations are available and what information to supply or expect. The implementation behind that boundary can be separate from the interface that callers use.
A human interface presents controls for a person. A software interface gives another program a way to work with capabilities or data. For example, a member may use a portal to look for equipment, while the portal asks an inventory service for availability. The person sees a useful screen; the applications exchange structured information under a contract.
Not every API is a network service. A software library can expose functions inside a program, and a browser can expose features to web code. This guide’s worked example focuses on an HTTP web API because it provides a concrete way to understand a business-software connection. Do not assume that every interface uses the same transport, authentication scheme, or data format.
Scroll horizontally to view all columns.
| Term | Meaning in this guide | Equipment-library example |
|---|---|---|
| API | The defined software interaction. | A documented way to ask the inventory service for availability. |
| Endpoint | An address associated with an operation or resource. | A path for looking up an item and date. |
| Client | The software making the request. | The member portal or an authorized test client. |
| Service | The software handling the request. | The inventory service that applies its data and access rules. |
| Database | A possible storage layer behind the service. | The records used to calculate availability; callers do not automatically receive direct database access. |
The useful starting point is the business task, not a request to connect everything. A small library might need members to check whether a projector is available on a selected date. That task is narrower than building a complete reservation, payment, notification, and inventory-management system. Define the boundary before choosing the integration approach.
Read the request and response as a contract
MDN’s HTTP overview separates a request from the response returned by a server. A request identifies an operation and resource, with relevant headers and, for some operations, a body. A response includes a status, headers, and sometimes a body. The service’s documentation explains how those pieces work for its particular API.
Read the documented method and address together. The HTTP semantics standard defines the methods: GET is intended to retrieve a representation of a resource; a method such as POST can submit data for processing. The exact supported operations belong to the contract. Do not decide that an endpoint makes a booking because its path happens to include the word availability, or assume that changing the method produces a supported action.
Check which inputs belong in the path, query parameters, headers, or body. Identify required values, allowed formats, units, time zones, and validation rules. An item identifier is different from its display name. A date-only booking question may be different from a timestamp describing when inventory was checked. Write down those meanings before mapping fields between systems.
- Request: which operation is supported, what inputs are required, and which caller may use it?
- Response: which fields can be returned, what do their values mean, and which may be absent or null?
- Errors: which failures can occur and what should the application show or do in each case?
- Limits: what version, pagination, rate limits, timeouts, and other constraints apply?
A documented response example is a starting point, not a guarantee that every call returns the same shape. A collection might be empty, a field might be optional, or a larger result might require additional pages. The receiving application needs an explicit rule for these cases. Treat an unknown value as unknown instead of replacing it with a reassuring default.
Separate a data format from the interface itself. JSON is a common way to represent a response, but the mere presence of a JSON object does not explain its business meaning, authorization rules, or allowed operations. A spreadsheet export can contain similar fields without providing the same live interaction. The contract is what connects the fields to an operation.
Worked API example: look up equipment availability
Assume a fictional community equipment library has an approved test service. Its portal needs to ask whether item projector-01 is available on 12 November 2026. The owner has limited the first workflow to an availability lookup. Creating or changing a reservation is outside that initial task and requires a separate operation and approval.
The illustrative request is GET /v1/availability?item=projector-01&date=2026-11-12. Here, /v1/availability identifies the example endpoint, and the query supplies the item and requested date. This relative path is teaching notation, not an address to call. A real request would use the provider’s documented base URL, access method, and validation rules.
Scroll horizontally to view all columns.
| Response field | Fictional value | Interpretation to verify |
|---|---|---|
| item_id | projector-01 | A stable identifier for the requested equipment item. |
| date | 2026-11-12 | The date whose availability was requested. |
| available_units | 2 | Two units reported available under this example’s rules. |
| as_of | 2026-10-28T09:00:00Z | When this fictional availability information was assessed. |
Suppose the service returns HTTP 200 with those values. The portal should check that the item and date match the request, interpret the quantity under the documented rules, and decide how fresh the information needs to be. Showing availability does not hold the item for that member. Another permitted transaction could change the stock before a later reservation is accepted.

Define the meaning of zero and missing data separately. A valid response saying zero units are available differs from a response that omits the quantity or cannot be interpreted. In the first case, the portal can show the defined unavailable state. In the second, it should follow the documented failure or uncertainty path rather than silently claiming that the item is in stock.
Use a small test table before connecting the whole catalog. Include the known item and date, an item with no availability, an invalid date, a missing input, and a response the client cannot parse. State the expected business behavior as well as the expected technical result. An endpoint can return a response while the customer-facing interpretation remains wrong.


Handle status codes, empty results, and permissions
MDN’s status-code reference explains the broad outcome represented by an HTTP response. Read that outcome together with the body and the provider’s documented behavior. A 200 response means the HTTP request succeeded; the client still needs to interpret the returned data correctly. It does not turn availability into a completed booking or establish every business condition.
Scroll horizontally to view all columns.
| Status | Typical meaning | What the integration should check |
|---|---|---|
| 200 | The request succeeded. | Validate the response and its business meaning. |
| 400 | The service rejected a request problem. | Inspect the documented validation error and correct the input. |
| 401 | Authentication is required or was not accepted. | Check the authorized authentication setup. |
| 403 | Access is refused. | Check the operation and resource permissions; do not keep retrying unchanged. |
| 404 | The resource was not found or is not disclosed. | Use the documented missing-resource behavior. |
| 429 | Too many requests. | Follow the provider’s rate-limit and retry guidance. |
| 503 | The service is temporarily unavailable. | Use an agreed failure message and bounded recovery behavior. |
Keep authentication and authorization distinct. Authentication establishes the caller’s identity or accepted credentials. Authorization decides whether that caller may perform the operation on the particular resource. A valid account or token does not automatically give permission to read another member’s reservation or modify every inventory record.
OWASP’s object-authorization guidance emphasizes checking permission for the requested object. In a suitable test environment, verify allowed and denied cases using approved test accounts and records. Changing an identifier in a request should not expose another account’s protected data. Keep test scope explicit and do not probe a real provider or unrelated account without authorization.
Use the provider’s supported access mechanism and keep confidential credentials out of public files, screenshots, and client code that cannot protect them. Some services also have deliberately public keys or identifiers; follow their documentation rather than treating all credential-like values as interchangeable. Grant only the access needed for the agreed task and identify who owns rotation or revocation.

Choose the connection that fits the actual task
An API can be useful when software needs a repeated, defined interaction with another system. It does not make every integration worthwhile. Consider how often the task happens, how fresh the information must be, who owns errors, and what the business can maintain. A permitted periodic export may be sufficient for a low-frequency report that does not need live data.
For the equipment library, an on-demand lookup fits a member asking about a particular item and date. Polling the entire catalog every few seconds would be a different design, with different volume and freshness costs. Choose the request pattern around the customer task rather than around the fact that an endpoint exists.
GitHub’s webhook documentation distinguishes event delivery from repeatedly asking an API whether something changed. A webhook lets a service send information to a configured receiver when a subscribed event occurs. If the library later needs notifications about approved reservation changes, it could evaluate a supported webhook route. That route would still need its own access, validation, failure, and operational checks.
Evaluate the provider before committing. Confirm that the required operation exists in the actual plan and version you can use, that permissions fit the task, and that the data meanings are adequate. Check usage limits and ongoing costs with the provider. An attractive demonstration using sample data does not prove that the business has the necessary production access.
Keep the proposed connection distinct from broader business automation. The marketing automation guide explains entry rules, decisions, exits, and workflow ownership. An API may support a step in such a process, but it does not define the whole process or authorize the actions that follow a returned result.
Prepare a reviewed Space Office API packet
Provide the actual provider documentation and version, the business task, approved sample requests and responses, a field map, permitted test accounts, and the acceptance criteria. Describe the desired behavior for normal, empty, denied, invalid, and unavailable cases. Mark any missing documentation or access instead of asking the team to assume a working connection.
Lithium, the live full-stack developer, works on backend APIs, databases, server logic, and feature implementation. Carbon, the live QA specialist, covers functional, security, and API testing. Hydrogen coordinates and reviews whether the implementation proposal and test evidence agree with the task and contract. Name the human who can resolve business and access questions.
For the first equipment-library workflow, request a bounded lookup plan, documented request/response mapping, error handling, permission tests, and a release checklist. Include the rule that an availability result must not be displayed as a reservation confirmation. Keep booking creation outside the approved scope until the business defines that operation, its side effects, and its acceptance tests.


A human grants the required access, verifies data handling and permissions, reviews test evidence, and approves deployment and consequential requests. A generated plan does not create a provider account or grant permission to use customer records. See the live specialist roster, how Space Office works, and contact for assisted setup around a defined task.
Keep a record of which documentation, sample data, configuration, and version were reviewed. The AI work review guide helps organize evidence and acceptance checks. A confident explanation or polished diagram should not replace a test that has not been performed.
Release one API workflow and keep it understandable
Start in an appropriate test environment with representative, permitted fixtures. Check that each request and result can be traced without recording confidential credentials or unnecessary personal data. Verify what the customer sees when information is unavailable, delayed, or out of date. Include the receiving colleague in the review so support and operations understand the new behavior.
Define timeouts and retries deliberately. A timeout does not always tell the caller whether a remote action happened. Repeating a write operation without a supported duplicate-prevention strategy can produce unwanted duplicate work. Follow the provider’s contract, distinguish reads from side effects, and make uncertain outcomes visible to the responsible operator.
Plan for changes and ownership. Record the version, expected fields, relevant limits, monitoring owner, and the response to a failure or provider change. Define how the integration can be paused or rolled back. If a later revision changes the meaning of availability or the reservation rules, review the business interpretation as well as the code.
A useful API connects a well-defined software operation to a real task. Read the contract, verify permissions, test the data and failure paths, and keep the human release decision explicit. The interface becomes useful when the application can interpret its results correctly and the business can operate the connection responsibly.
Sources and review notes
Reviewed against the linked primary sources on the checked dates. Search features and citations are selected by their respective platforms; no placement is guaranteed.
- IETF: HTTP Semantics (RFC 9110) — checked
- MDN: API Glossary — checked
- MDN: Overview of HTTP — checked
- MDN: HTTP Response Status Codes — checked
- GitHub Docs: About Webhooks — checked
- OWASP: Broken Object Level Authorization — checked
Frequently asked questions
What is an API?
API is short for application programming interface: a defined way for software components to interact. It specifies available operations and the information used in those interactions. An HTTP web API is one kind; APIs can also exist within libraries, browsers, and other software components.
How does an API request work?
A client makes a supported request using the interface’s documented operation, address, inputs, and access mechanism. The service handles it and returns the defined result or an error. For an HTTP API, the client reads the status, headers, and any response body and applies the correct business interpretation.
Does every API need an API key?
No. Access depends on the interface and provider. Some operations are public, while others use keys, tokens, or another supported authentication method. Authentication does not replace authorization for the particular operation and resource. Verify the actual documentation and required account permissions before connecting.
Does HTTP 200 mean the business task is complete?
HTTP 200 indicates a successful HTTP request, but the returned data and contract determine what that success means. A successful availability lookup does not create a reservation or payment. The application must still check the response fields, freshness, and any separate operation required to complete the business task.
Can AI build or test an API connection?
AI can help prepare implementation work, map documented fields, and develop test cases from approved inputs. In Space Office, Lithium and Carbon contribute that work and Hydrogen reviews it. A human grants access, verifies the evidence, and approves deployment and consequential actions. Missing documentation or permission cannot be replaced with an invented working connection.