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

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-17 (latest revision 2015-12-05)
Replaces draft-nottingham-http-problem
Stream IETF
Intended RFC status Proposed Standard
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 IESG Evaluation::AD Followup
Consensus Boilerplate Yes
Telechat date
Needs 6 more YES or NO OBJECTION positions to pass.
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: June 8, 2016                                   December 6, 2015

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

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
   define new error response formats for HTTP APIs.

Note to Readers

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

   This section is to be removed before publication.

Note to RFC Editor

   Please replace all occurrences of "XXXX" with the final RFC number
   chosen for this draft.

   This section is to be removed before publication.

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 June 8, 2016.

Nottingham & Wilde        Expires June 8, 2016                  [Page 1]
Internet-Draft               Problem Details               December 2015

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
   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  . . . . . . . . . . . . . . . . . . . . . . . .   4
   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  . . . . . . . . . . . . . . . . . . . . . .  11
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  11
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  11
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  12
   Appendix A.  HTTP Problems and XML  . . . . . . . . . . . . . . .  13
   Appendix B.  Using Problem Details with Other Formats . . . . . .  15
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  16

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-html5-20141028] 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.

Nottingham & Wilde        Expires June 8, 2016                  [Page 2]
Internet-Draft               Problem Details               December 2015

   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.

   However, that doesn't give the API client enough information about
Show full document text