URI
Uniform Resource Identifier
ELI5 — The Vibe Check
A URI is the general term for any identifier of a resource. URLs are URIs that tell you WHERE and HOW to get something. URNs are URIs that just name something. So URI is the parent concept, URL and URN are specific types. Think: every URL is a URI, but not vice versa.
Real Talk
A URI is a string of characters that uniquely identifies a resource. The two main types are URLs (which include location/access method) and URNs (which name a resource without implying how to access it). In REST APIs, URIs identify resources like /users/123.
Show Me The Code
// Examples of URIs
https://example.com/api/users // URL (location + protocol)
urn:isbn:978-3-16-148410-0 // URN (name, no location)
mailto:user@example.com // URI (email resource)
/api/v1/products/42 // Relative URI path
When You'll Hear This
"REST APIs use URIs to represent resources." / "A URI can be a URL or a URN depending on whether it specifies location."
Related Terms
Path Parameter
A path parameter is a variable embedded directly in the URL path. Instead of '?id=5', you put the value right in the path: '/users/5'.
REST (Representational State Transfer)
REST is a set of rules for how APIs should behave. Think of it as the etiquette guide for servers and clients talking to each other.
URL (Uniform Resource Locator)
A URL is the complete web address of something on the internet — the full 'how to get there' including the protocol, domain, path, and any query parameters...
URN (Uniform Resource Name)
A URN names something uniquely without saying where to find it.