Problem Details for HTTP APIs
draft-ietf-appsawg-http-problem-01

The information below is for an old version of the document
Document Type Active Internet-Draft (appsawg WG)
Authors Mark Nottingham  , Erik Wilde 
Last updated 2015-12-04 (latest revision 2015-09-06)
Replaces draft-nottingham-http-problem
Stream Internent Engineering Task Force (IETF)
Formats pdf htmlized (tools) htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Murray Kucherawy
Shepherd write-up Show (last changed 2015-11-20)
IESG IESG state Waiting for AD Go-Ahead
Consensus Boilerplate Unknown
Telechat date
Responsible AD Barry Leiba
Send notices to "Murray Kucherawy" <superuser@gmail.com>
IANA IANA review state IANA OK - Actions Needed
Network Working Group                                      M. Nottingham
Internet-Draft                                                    Akamai
Intended status: Standards Track                                E. Wilde
Expires: March 10, 2016                                      UC Berkeley
                                                       September 7, 2015

                     Problem Details for HTTP APIs
                   draft-ietf-appsawg-http-problem-01

Abstract

   This document defines a "problem detail" as a way to carry machine-
   readable details of errors in a HTTP response, to avoid the need to
   invent new error response formats for HTTP APIs.

Note to Readers

   This draft should be discussed on the apps-discuss mailing list [1].

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 March 10, 2016.

Copyright Notice

   Copyright (c) 2015 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

Nottingham & Wilde       Expires March 10, 2016                 [Page 1]
Internet-Draft               Problem Details              September 2015

   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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Requirements  . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  The Problem Details JSON Object . . . . . . . . . . . . . . .   4
     3.1.  Problem Details Object Members  . . . . . . . . . . . . .   5
     3.2.  Extension Members . . . . . . . . . . . . . . . . . . . .   6
   4.  Defining New Problem Types  . . . . . . . . . . . . . . . . .   6
     4.1.  Example . . . . . . . . . . . . . . . . . . . . . . . . .   8
     4.2.  Pre-Defined Problem Types . . . . . . . . . . . . . . . .   8
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   9
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   9
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  10
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  11
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  11
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  11
   Appendix A.  HTTP Problems and XML  . . . . . . . . . . . . . . .  12
   Appendix B.  Using Problem Details with Other Formats . . . . . .  14
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  14

1.  Introduction

   HTTP [RFC7230] status codes are sometimes not sufficient to convey
   enough information about an error to be helpful.  While humans behind
   Web browsers can be informed about the nature of the problem with an
   HTML [W3C.REC-html401-19991224] response body, non-human consumers of
   so-called "HTTP APIs" are usually not.

   This specification defines simple JSON [RFC7159] and XML
   [W3C.REC-xml-20081126] document formats to suit this purpose.  They
   are designed to be reused by HTTP APIs, which can identify distinct
   "problem types" specific to their needs.

   Thus, API clients can be informed of both the high-level error class
   (using the status code) and the finer-grained details of the problem
   (using one of these formats).

   For example, consider a response that indicates that the client's
   account doesn't have enough credit.  The 403 Forbidden status code
   might be deemed most appropriate to use, as it will inform HTTP-
   generic software (such as client libraries, caches and proxies) of
   the general semantics of the response.

Nottingham & Wilde       Expires March 10, 2016                 [Page 2]
Internet-Draft               Problem Details              September 2015

   However, that doesn't give the API client enough information about
   why the request was forbidden, the applicable account balance, or how
   to correct the problem.  If these details are included in the
Show full document text