Live data from Hacker News

What it means for an API to be RESTful

en.andros.dev

1–10 of 59 posts

Re: What it means for an API to be RESTful

#2
One thing missing from the hypermedia section: links do not have to live in the payload. RFC 8288 lets you carry the same relations in a Link header, and for some clients that is the only place they look. I advertise a markdown twin of a page as Link: ; rel="describedby"; type="text/markdown" for exactly that reason, no body parsing needed.

Conditional requests feel like the other omission. ETag and 304 are part of the same "use HTTP as intended" argument, and they change client behaviour more often than whether someone hardcoded a route.

Re: What it means for an API to be RESTful

#6
Isn't this well defined already? https://en.wikipedia.org/wiki/REST

> REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of a distributed, Internet-scale hypermedia system, such as the Web, should behave.

And isn't it always misused, mis-represented basically all the time? Often confused with things that are basically just JSON API(s)?

Re: What it means for an API to be RESTful

#7
post #4
post #3

Well, this inevitable flamewar will be a nice change from the pro-AI / anti-AI comment threads, at least...

Are you sure it is not just a AI authored rehash of the thousands of articles online that make the same points already?

Nice! Not 100% sure, but it reads very human to me. The only LLM-ism that jumped out at me was "An honest note before we continue", but that was the only time the word "honest" appeared. If it's not human-written it does an exceptionally good job of appearing so.

Re: What it means for an API to be RESTful

#8
post #6

Isn't this well defined already? https://en.wikipedia.org/wiki/REST > REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of a distributed, Internet-scale hypermedia system, such as the Web, should behave. And isn't it always misu…

It's kind of interesting to go through the examples in the article, because it largely really describes a HAL-style JSON API really. It in parts also described the Web Linking Standard (RFC 8288) too.

Re: What it means for an API to be RESTful

#10
post #6

Isn't this well defined already? https://en.wikipedia.org/wiki/REST > REST (Representational State Transfer) is a software architectural style that was created to describe the design and guide the development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of a distributed, Internet-scale hypermedia system, such as the Web, should behave. And isn't it always misu…

> And isn't it always misused, mis-represented basically all the time? Often confused with things that are basically just JSON API(s)?

The article makes this point.

Post reply on HN