REST API¶
REST-based protocols¶
- HAL (http://tools.ietf.org/html/draft-kelly-json-hal-07)
- JSON API (http://jsonapi.org/)
- Restful Objects (http://www.restfulobjects.org/)
- “collection.document+json” (http://cdoc.io/)
- “collection+json” (http://amundsen.com/media-types/collection/)
- OData ( www.odata.org ), soutenu par Microsoft et SAP…
- http://www.hydra-cg.com/spec/latest/core/#hydra-at-a-glance
- https://github.com/JornWildt/Mason
Alternatives (not REST)¶
- GRPC-Web - https://github.com/grpc/grpc-web
- GraphQL
Comparisons¶
From: https://www.nginx.com/blog/building-your-api-for-longevity-best-practices/
- The first is HAL, which is a very popular specification. [The IETF draft is JSON Hypertext Application Language.]
- The second one is JSON‑LD, which is a W3C standard but was really designed for linking definitions between databases. I’d actually avoid using that one.
- JSON API is a very popular hypermedia format which I highly recommend.
- Collection+JSON was one of the original ones created by Mike Amundsen. It’s a great specification, but I would still lean towards HAL or JSON API.
- Siren is actually really interesting in that it went a different direction. Siren has foreign properties, class properties, and entity properties, and it’s action‑driven.
- Then there’s CPHL. I put the asterisk on because I made it. It’s also action‑driven.
Best practices¶
https://www.nginx.com/blog/building-your-api-for-longevity-best-practices/
Page last modified: 2023-03-08 11:32:44