Home Documents for HTTP APIs
draft-nottingham-json-home-00

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Last updated 2012-05-09
Stream (None)
Intended RFC status (None)
Formats pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                      M. Nottingham
Internet-Draft                                                 Rackspace
Intended status: Informational                               May 9, 2012
Expires: November 10, 2012

                      Home Documents for HTTP APIs
                     draft-nottingham-json-home-00

Abstract

   This document proposes a "home document" format for non-browser HTTP
   clients.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on November 10, 2012.

Copyright Notice

   Copyright (c) 2012 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Nottingham              Expires November 10, 2012               [Page 1]
Internet-Draft        Home Documents for HTTP APIs              May 2012

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Requirements . . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.  JSON Home Documents  . . . . . . . . . . . . . . . . . . . . .  3
   4.  Resource Objects . . . . . . . . . . . . . . . . . . . . . . .  5
     4.1.  Resolving Templated Links  . . . . . . . . . . . . . . . .  5
   5.  Resource Hints . . . . . . . . . . . . . . . . . . . . . . . .  6
     5.1.  allow  . . . . . . . . . . . . . . . . . . . . . . . . . .  7
     5.2.  representations  . . . . . . . . . . . . . . . . . . . . .  7
     5.3.  accept-patch . . . . . . . . . . . . . . . . . . . . . . .  7
     5.4.  accept-post  . . . . . . . . . . . . . . . . . . . . . . .  7
     5.5.  accept-ranges  . . . . . . . . . . . . . . . . . . . . . .  7
   6.  Creating and Serving Home Documents  . . . . . . . . . . . . .  7
     6.1.  Managing Change in Home Documents  . . . . . . . . . . . .  8
     6.2.  Evolving and Mixing APIs with Home Documents . . . . . . .  8
     6.3.  Documenting APIs that use Home Documents . . . . . . . . .  8
   7.  Consuming Home Documents . . . . . . . . . . . . . . . . . . .  9
   8.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
   9.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  9
   10. References . . . . . . . . . . . . . . . . . . . . . . . . . .  9
     10.1. Normative References . . . . . . . . . . . . . . . . . . .  9
     10.2. Informative References . . . . . . . . . . . . . . . . . . 10
   Appendix A.  Frequently Asked Questions  . . . . . . . . . . . . . 10
     A.1.  Why not Microformats?  . . . . . . . . . . . . . . . . . . 10
     A.2.  What about authentication? . . . . . . . . . . . . . . . . 11
     A.3.  What about "Faults" (i.e., errors)?  . . . . . . . . . . . 11
     A.4.  How Do I find the XML Schema / JSON Schema / etc. for
           a particular media type? . . . . . . . . . . . . . . . . . 11
   Appendix B.  Open Issues . . . . . . . . . . . . . . . . . . . . . 11
   Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12

Nottingham              Expires November 10, 2012               [Page 2]
Internet-Draft        Home Documents for HTTP APIs              May 2012

1.  Introduction

   There is an emerging preference for non-browser Web applications
   (colloquially, "HTTP APIs") to use a link-driven approach to their
   interactions to assure loose coupling, thereby enabling extensibility
   and API evolution.

   This is based upon experience with previous APIs which specified
   static URI paths (such as
   "http://api.example.com/v1.0/widgets/abc123/properties") have
   resulted in brittle, tight coupling between clients and servers.

   Sometimes, these APIs are documented by a document format like
   WADL [1] that is used as a "design-time" description; i.e., the URIs
   and other information they describe are "baked into" client
Show full document text