background preloader


Facebook Twitter

JSON API — A specification for building APIs in JSON. C# - Generating Hypermedia links in a Web API. RFC 5988 - Web Linking. [Docs] [txt|pdf] [draft-nottingham-...]

RFC 5988 - Web Linking

[Diff1] [Diff2] [Errata] PROPOSED STANDARD Errata Exist Internet Engineering Task Force (IETF) M. Nottingham Request for Comments: 5988 October 2010 Updates: 4287 Category: Standards Track ISSN: 2070-1721 Abstract This document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field. Status of This Memo This is an Internet Standards Track document. RFC 5988 Web Linking October 2010 This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. Generating Hypermedia links in ASP.NET Web API - Ben Foster. Over the past few weeks I've been developing an API for fabrik, the portfolio and blogging platform I launched last year.

Generating Hypermedia links in ASP.NET Web API - Ben Foster

This has been a great way to learn both ASP.NET Web API (Microsoft's new way for creating HTTP services) and REST. One design principle of REST, or specifically Hypermedia that I wanted to adhere to was to include links in my resource representations. To quote Wikipedia: RESTful interaction is driven by hypermedia, rather than out-of-band information. This was also necessary as I wanted to support AtomPub which dictates each Atom entry must provide an "edit" link so that clients know how to update entries.

So how can we achieve this in ASP.NET Web API, especially as my default response format is JSON, which has no concept of hyperlinks. First I created the following a base class for all my Resource representations: The Link class is an abstract class for defining link relations. ASP.NET - Building Hypermedia Web APIs with ASP.NET Web API. Hypermedia—better known as Hypermedia as the Engine of Application State (HATEOAS)—is one of the main constraints of Representational State Transfer (REST).

ASP.NET - Building Hypermedia Web APIs with ASP.NET Web API

The idea is that hypermedia artifacts, such as links or forms, can be used to describe how clients can interact with a set of HTTP services. This has quickly become an interesting concept for developing evolvable API design. This is not any different from how we usually interact with the Web. We typically remember a single entry point or URL for the homepage of a Web site, and later move through the different sections of the site using links. We also use forms, which come with a predefined action or URL to submit data that the site might need to perform some action.

Developers have a tendency to provide static descriptions of all the supported methods in a service, ranging from formal contracts such as Web Services Description Language (WSDL) in SOAP services to simple documentation in non-hypermedia Web APIs. Forms in Action. Richardson Maturity Model. A model (developed by Leonard Richardson) that breaks down the principal elements of a REST approach into three steps.

Richardson Maturity Model

These introduce resources, http verbs, and hypermedia controls. Recently I've been reading drafts of Rest In Practice : a book that a couple of my colleagues have been working on. Their aim is to explain how to use Restful web services to handle many of the integration problems that enterprises face. At the heart of the book is the notion that the web is an existence proof of a massively scalable distributed system that works really well, and we can take ideas from that to build integrated systems more easily. Microsoft/api-guidelines. Replace REST and RESTful appropriately by AlexZeitler · Pull Request #29 · Microsoft/api-guidelines.

ASP.NET Core RESTful Web API versioning made easy. REST APIs must be hypertext-driven » Untangled. I am getting frustrated by the number of people calling any HTTP-based interface a REST API.

REST APIs must be hypertext-driven » Untangled

Today’s example is the SocialSite REST API. That is RPC. It screams RPC. There is so much coupling on display that it should be given an X rating. What needs to be done to make the REST architectural style clear on the notion that hypertext is a constraint? API designers, please note the following rules before calling your creation a REST API: A REST API should not be dependent on any single communication protocol, though its successful mapping to a given protocol may be dependent on the availability of metadata, choice of methods, etc.

There are probably other rules that I am forgetting, but the above are the rules related to the hypertext constraint that are most often violated within so-called REST APIs. Roy Fielding on Versioning, Hypermedia, and REST. Designing, implementing, and maintaining APIs for the Web is more than a challenge; for many companies, it is an imperative.

Roy Fielding on Versioning, Hypermedia, and REST

This series takes the reader on a journey from determining the business case for APIs to a design methodology, meeting implementation challenges, and taking the long view on maintaining public APIs on the Web over time. Along the way there are interviews with influential individuals and even a suggested reading list on APIs and related topics. This InfoQ article is part of the series “Web APIs From Start to Finish”. You can subscribe to receive notifications via RSS. Roy T. Fielding’s contributions to open standards are extensive. Recently Roy took some time while traveling between standards meetings to answer a series of questions on a topic that often starts debates; Versioning on the Web. InfoQ: Back in August of 2013, you gave a talk for the Adobe Evolve conference and, in that talk, you offered advice on how to approach "versioning" APIs on the web.

Roy: No.