<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://knowledgebase.pirho.net/index.php?action=history&amp;feed=atom&amp;title=Describing_HTTP_Endpoints_and_Discovery</id>
	<title>Describing HTTP Endpoints and Discovery - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://knowledgebase.pirho.net/index.php?action=history&amp;feed=atom&amp;title=Describing_HTTP_Endpoints_and_Discovery"/>
	<link rel="alternate" type="text/html" href="https://knowledgebase.pirho.net/index.php?title=Describing_HTTP_Endpoints_and_Discovery&amp;action=history"/>
	<updated>2026-07-11T13:44:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://knowledgebase.pirho.net/index.php?title=Describing_HTTP_Endpoints_and_Discovery&amp;diff=280&amp;oldid=prev</id>
		<title>Dex: Created page with &quot;HTTP endpoints are the public “doors” into a system. How those doors are described, exposed, and discovered determines whether an API is usable, evolvable, and maintainable. This article explains what HTTP endpoints really are, how clients discover them, and why good discovery design matters more than most people realise.  == Context == HTTP was not originally designed for APIs — it was designed for &#039;&#039;&#039;documents linked together&#039;&#039;&#039;.   APIs inherited HTTP, and with i...&quot;</title>
		<link rel="alternate" type="text/html" href="https://knowledgebase.pirho.net/index.php?title=Describing_HTTP_Endpoints_and_Discovery&amp;diff=280&amp;oldid=prev"/>
		<updated>2026-03-13T19:04:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;HTTP endpoints are the public “doors” into a system. How those doors are described, exposed, and discovered determines whether an API is usable, evolvable, and maintainable. This article explains what HTTP endpoints really are, how clients discover them, and why good discovery design matters more than most people realise.  == Context == HTTP was not originally designed for APIs — it was designed for &amp;#039;&amp;#039;&amp;#039;documents linked together&amp;#039;&amp;#039;&amp;#039;.   APIs inherited HTTP, and with i...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;HTTP endpoints are the public “doors” into a system. How those doors are described, exposed, and discovered determines whether an API is usable, evolvable, and maintainable. This article explains what HTTP endpoints really are, how clients discover them, and why good discovery design matters more than most people realise.&lt;br /&gt;
&lt;br /&gt;
== Context ==&lt;br /&gt;
HTTP was not originally designed for APIs — it was designed for &amp;#039;&amp;#039;&amp;#039;documents linked together&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
APIs inherited HTTP, and with it came both power and expectations.&lt;br /&gt;
&lt;br /&gt;
In practice, many systems still treat endpoints as:&lt;br /&gt;
* Hard‑coded URLs&lt;br /&gt;
* Private knowledge&lt;br /&gt;
* Tribal information passed between developers&lt;br /&gt;
&lt;br /&gt;
This works at small scale, but fails as soon as:&lt;br /&gt;
* Clients multiply&lt;br /&gt;
* Versions evolve&lt;br /&gt;
* Integrations become external&lt;br /&gt;
* Automation replaces humans&lt;br /&gt;
&lt;br /&gt;
Endpoint discovery is the difference between:&lt;br /&gt;
* “You must read the docs first”&lt;br /&gt;
* and “The system explains itself”&lt;br /&gt;
&lt;br /&gt;
== What Is an HTTP Endpoint? ==&lt;br /&gt;
At its simplest, an HTTP endpoint is:&lt;br /&gt;
&lt;br /&gt;
* A URI&lt;br /&gt;
* That accepts HTTP requests&lt;br /&gt;
* And returns HTTP responses&lt;br /&gt;
&lt;br /&gt;
But that definition is incomplete.&lt;br /&gt;
&lt;br /&gt;
An endpoint is not just:&lt;br /&gt;
&amp;lt;code&amp;gt;/api/users/123&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is the combination of:&lt;br /&gt;
* Address (URI)&lt;br /&gt;
* Method (GET, POST, PUT, DELETE, etc.)&lt;br /&gt;
* Representation (JSON, XML, HTML, etc.)&lt;br /&gt;
* Behaviour&lt;br /&gt;
* Constraints&lt;br /&gt;
* Links to other behaviour&lt;br /&gt;
&lt;br /&gt;
In other words:  &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;An endpoint is a capability, not a string.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Endpoints as Capabilities ==&lt;br /&gt;
A useful mental model is to treat each endpoint as a capability boundary.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* “Fetch a user”&lt;br /&gt;
* “Create a job”&lt;br /&gt;
* “Submit an application”&lt;br /&gt;
* “Discover available actions”&lt;br /&gt;
&lt;br /&gt;
Clients should care about:&lt;br /&gt;
* What they can do&lt;br /&gt;
* What data they can exchange&lt;br /&gt;
* What happens next&lt;br /&gt;
&lt;br /&gt;
They should not care about:&lt;br /&gt;
* Folder‑like URL structures&lt;br /&gt;
* Internal routing logic&lt;br /&gt;
* Implementation details&lt;br /&gt;
&lt;br /&gt;
This is where discovery becomes critical.&lt;br /&gt;
&lt;br /&gt;
== Why Discovery Exists ==&lt;br /&gt;
Discovery answers a simple question:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;“How does a client know what it can do next?”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Without discovery:&lt;br /&gt;
* Clients must be pre‑programmed&lt;br /&gt;
* URLs become contracts&lt;br /&gt;
* Change becomes dangerous&lt;br /&gt;
&lt;br /&gt;
With discovery:&lt;br /&gt;
* Clients can adapt&lt;br /&gt;
* Systems can evolve&lt;br /&gt;
* Capabilities can be added safely&lt;br /&gt;
&lt;br /&gt;
Discovery turns an API from:&lt;br /&gt;
* A static interface&lt;br /&gt;
into&lt;br /&gt;
* A navigable system&lt;br /&gt;
&lt;br /&gt;
== Levels of Endpoint Discovery ==&lt;br /&gt;
Discovery is not all‑or‑nothing. There are layers.&lt;br /&gt;
&lt;br /&gt;
=== 1. Out‑of‑Band Discovery ===&lt;br /&gt;
This is the most common approach.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* README files&lt;br /&gt;
* Wiki pages&lt;br /&gt;
* Swagger UI&lt;br /&gt;
* Human documentation&lt;br /&gt;
&lt;br /&gt;
Characteristics:&lt;br /&gt;
* Humans read first&lt;br /&gt;
* Clients are manually coded&lt;br /&gt;
* Automation depends on discipline&lt;br /&gt;
&lt;br /&gt;
This is acceptable — but fragile.&lt;br /&gt;
&lt;br /&gt;
=== 2. Entry‑Point Discovery ===&lt;br /&gt;
The system exposes a known starting point.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;code&amp;gt;/api&amp;lt;/code&amp;gt;  &lt;br /&gt;
&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;  &lt;br /&gt;
&amp;lt;code&amp;gt;/.well-known/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this entry point, the system returns:&lt;br /&gt;
* Available resources&lt;br /&gt;
* Links to capabilities&lt;br /&gt;
* Version information&lt;br /&gt;
&lt;br /&gt;
This is where HTTP starts to behave like a system, not just a transport.&lt;br /&gt;
&lt;br /&gt;
=== 3. Link‑Driven Discovery ===&lt;br /&gt;
Responses include links to related actions.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
* A job includes a link to apply&lt;br /&gt;
* An application includes a link to upload documents&lt;br /&gt;
* A result includes a link to its status&lt;br /&gt;
&lt;br /&gt;
This is often referred to as:&lt;br /&gt;
* HATEOAS (Hypermedia As The Engine Of Application State)&lt;br /&gt;
&lt;br /&gt;
In practical terms:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The response tells the client what is possible next.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== 4. Machine‑Readable Capability Descriptions ===&lt;br /&gt;
The system provides formal descriptions such as:&lt;br /&gt;
* OpenAPI&lt;br /&gt;
* WADL&lt;br /&gt;
* JSON Schema&lt;br /&gt;
* ALPS&lt;br /&gt;
* Link relation metadata&lt;br /&gt;
&lt;br /&gt;
These allow:&lt;br /&gt;
* Tooling&lt;br /&gt;
* Validation&lt;br /&gt;
* Client generation&lt;br /&gt;
* Inspection&lt;br /&gt;
* Automation&lt;br /&gt;
&lt;br /&gt;
They do not replace runtime discovery — they complement it.&lt;br /&gt;
&lt;br /&gt;
== Describing Endpoints Properly ==&lt;br /&gt;
A well‑described endpoint answers:&lt;br /&gt;
&lt;br /&gt;
* What does this do?&lt;br /&gt;
* What input does it accept?&lt;br /&gt;
* What output does it return?&lt;br /&gt;
* What errors can occur?&lt;br /&gt;
* What links does it expose?&lt;br /&gt;
* What state does it represent?&lt;br /&gt;
&lt;br /&gt;
Poor descriptions focus on:&lt;br /&gt;
* URL patterns&lt;br /&gt;
* Parameter lists&lt;br /&gt;
* Code samples only&lt;br /&gt;
&lt;br /&gt;
Good descriptions focus on:&lt;br /&gt;
* Behaviour&lt;br /&gt;
* Meaning&lt;br /&gt;
* Transitions&lt;br /&gt;
&lt;br /&gt;
== HTTP Itself Is a Discovery Mechanism ==&lt;br /&gt;
HTTP already provides discovery tools — they are just underused.&lt;br /&gt;
&lt;br /&gt;
=== OPTIONS ===&lt;br /&gt;
The &amp;lt;code&amp;gt;OPTIONS&amp;lt;/code&amp;gt; method allows a client to ask:&lt;br /&gt;
* “What is allowed here?”&lt;br /&gt;
&lt;br /&gt;
This can expose:&lt;br /&gt;
* Supported methods&lt;br /&gt;
* Accepted content types&lt;br /&gt;
* Authentication requirements&lt;br /&gt;
&lt;br /&gt;
=== Content Negotiation ===&lt;br /&gt;
Through headers like:&lt;br /&gt;
* &amp;lt;code&amp;gt;Accept&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Content-Type&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clients and servers discover:&lt;br /&gt;
* Available representations&lt;br /&gt;
* Versioning strategies&lt;br /&gt;
* Backwards compatibility paths&lt;br /&gt;
&lt;br /&gt;
=== Status Codes ===&lt;br /&gt;
Status codes are not errors — they are signals.&lt;br /&gt;
&lt;br /&gt;
* 200 tells you success&lt;br /&gt;
* 401 tells you authentication is required&lt;br /&gt;
* 403 tells you the capability exists but is denied&lt;br /&gt;
* 404 tells you nothing exists here&lt;br /&gt;
* 409 tells you state matters&lt;br /&gt;
&lt;br /&gt;
Each one communicates system behaviour.&lt;br /&gt;
&lt;br /&gt;
== Well‑Known URIs ==&lt;br /&gt;
The &amp;lt;code&amp;gt;/.well-known/&amp;lt;/code&amp;gt; namespace exists specifically for discovery.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* OpenID configuration&lt;br /&gt;
* Service metadata&lt;br /&gt;
* Capability manifests&lt;br /&gt;
&lt;br /&gt;
Using well‑known locations avoids:&lt;br /&gt;
* Guesswork&lt;br /&gt;
* Hard‑coding&lt;br /&gt;
* Documentation drift&lt;br /&gt;
&lt;br /&gt;
It also signals architectural maturity.&lt;br /&gt;
&lt;br /&gt;
== Discovery vs Versioning ==&lt;br /&gt;
One of the strongest arguments for discovery is version resilience.&lt;br /&gt;
&lt;br /&gt;
If clients:&lt;br /&gt;
* Follow links&lt;br /&gt;
* Honour media types&lt;br /&gt;
* React to capabilities&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
* URLs can change&lt;br /&gt;
* Versions can coexist&lt;br /&gt;
* Features can be introduced gradually&lt;br /&gt;
&lt;br /&gt;
Versioning becomes a property of behaviour, not path names.&lt;br /&gt;
&lt;br /&gt;
== Common Pitfalls ==&lt;br /&gt;
* Treating URLs as permanent contracts&lt;br /&gt;
* Encoding behaviour into paths&lt;br /&gt;
* Returning data without links&lt;br /&gt;
* Relying entirely on external documentation&lt;br /&gt;
* Generating OpenAPI but not aligning runtime behaviour&lt;br /&gt;
* Confusing routing structure with API design&lt;br /&gt;
&lt;br /&gt;
Most API “breakages” are discovery failures.&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Architecture Considerations ==&lt;br /&gt;
When designing endpoint discovery:&lt;br /&gt;
&lt;br /&gt;
* Start from an entry point&lt;br /&gt;
* Think in capabilities, not controllers&lt;br /&gt;
* Make transitions explicit&lt;br /&gt;
* Use links generously&lt;br /&gt;
* Keep descriptions close to the runtime system&lt;br /&gt;
* Allow clients to ask questions&lt;br /&gt;
&lt;br /&gt;
Discovery is not overhead — it is operational safety.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting &amp;amp; Diagnostics ==&lt;br /&gt;
When clients struggle:&lt;br /&gt;
&lt;br /&gt;
* Inspect the first response — is there an entry point?&lt;br /&gt;
* Check for missing links&lt;br /&gt;
* Look for hard‑coded assumptions&lt;br /&gt;
* Verify content negotiation&lt;br /&gt;
* Test OPTIONS responses&lt;br /&gt;
* Compare documentation to live behaviour&lt;br /&gt;
&lt;br /&gt;
Most issues appear immediately once discovery is examined.&lt;br /&gt;
&lt;br /&gt;
== Related Topics ==&lt;br /&gt;
* [[REST and Hypermedia]]&lt;br /&gt;
* [[OpenAPI and WADL]]&lt;br /&gt;
* [[Designing Evolvable APIs]]&lt;br /&gt;
* [[Progressive Enhancement in APIs]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* HTTP/1.1 and HTTP/2 specifications&lt;br /&gt;
* REST architectural style&lt;br /&gt;
* OpenAPI Specification&lt;br /&gt;
* WADL&lt;br /&gt;
* RFC 5785 (Well‑Known URIs)&lt;/div&gt;</summary>
		<author><name>Dex</name></author>
	</entry>
</feed>