API documentation: what developers actually read
Nobody reads API documentation from the top. They search for the endpoint, copy the example, and leave — which tells you exactly what to spend your effort on.
REST is a set of constraints, not a specification, which is why every API claiming to be RESTful is different. The conventions worth following are the ones that let a developer guess correctly.
A REST API exposes resources over HTTP, using the methods and status codes the protocol already defines. The original constraints are architectural and stricter than common usage; in practice, when somebody says REST API they mean an HTTP interface with resource URLs, JSON bodies, and verbs that mean what they say.
That looseness is exactly why conventions matter. The value of a predictable API is that a developer who has read half the documentation can guess the rest correctly — and every deviation from convention costs somebody an hour of their life.
Idempotency is the property that matters most in practice and gets the least attention. A network failure leaves a client genuinely unable to tell whether a write succeeded, so it will retry — and a POST that creates a second invoice on retry is a real incident. Accept an idempotency key on every write that creates something, and return the original result when the same key comes back.
REST suits resources with predictable shapes and many consumers, which is most business APIs. GraphQL suits clients that need widely varying slices of a large graph and are prepared to own the query complexity — it moves work from the server to the client and to the caching layer, which is a trade rather than an upgrade. RPC styles suit actions that are genuinely not resources: a verb like recalculate does not become clearer as a noun. Choosing REST because it is conventional is a perfectly good reason; choosing GraphQL because it is newer is not.
Ettex API follows the conventions above, and the event side is covered in webhook, with the practicalities of building against any API in api integration.
One limitation stated plainly: this article describes conventions rather than our endpoint list. For what exists, at what version, and under which limits, read the current API documentation rather than inferring it from a blog post — including this one.
Resources addressed by URL, HTTP methods used for their defined meanings, stateless requests, and standard status codes. Strict REST is stricter than common usage, which is why conventions matter more than the label.
In the URL for most APIs. It is crude and completely predictable, it survives being pasted into a browser, and predictability is worth more than elegance at small scale.
400 for malformed input, 422 for well-formed input that fails business rules. Never 200 with an error in the body — that breaks generic clients and monitoring.
Because a network failure leaves the client unsure whether the write happened, so it retries. Without a key, the retry creates a duplicate record.
Nobody reads API documentation from the top. They search for the endpoint, copy the example, and leave — which tells you exactly what to spend your effort on.
A rate limit exists to keep one caller from degrading the service for everyone. The design question is not the number — it is what happens at the boundary, and whether a client can tell.
A webhook is a callback: instead of polling an API every minute for changes, you give it a URL and it calls you. Simple to describe, and the failure modes are where all the interesting work is.