Internet-Draft | Abbreviated Title | May 2023 |
Smith | Expires 5 November 2023 | [Page] |
This document defines the "api-catalog" well-known URI. It is intended to facilitate discovery of the APIs published by a Web host.¶
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 https://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 5 November 2023.¶
Copyright (c) 2023 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 (https://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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
A Web host may publish Application Programming Interfaces (APIs) to encourage requests for interaction from external parties. Such APIs must be discovered before they may be used - i.e., the external party needs to know what APIs a given Web host exposes, including their purpose, any constraints to use, and the endpoints to interact with the APIs. To faciliate discovery of this information, this document proposes a well-known URI, 'api-catalog', as a location where a Web host's API endpoints are listed and described.¶
The primary goal is to facilitate the discovery of both a Web Host's public API endpoints, and metadata that informs the potential API client of the purpose of each API and any constraints around usage.¶
Non-goals: this document does not mandate paths for API endpoints. i.e., it is not mandating that my_example_api should be available at example.com/.well-known/api-catalog/my_example_api (although it is not forbidden to do so).¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] when, and only when, they appear in all capitals, as shown here.¶
The api-catalog well-known URI is intended for HTTP(S) servers that publish APIs and wish to facilitate their discovery. The api-catalog URI SHALL follow the path-prefix for "well-known locations" defined in [RFC8615], namely /.well-known/ : i.e., example.com/.well-known/api-catalog¶
A Web host (example.com) supporting this URI SHALL resolve an HTTP(S) GET request to /.well-known/api-catalog with a list of public APIs. Web hosts SHOULD utilise existing formats to list their APIs, for example [apisJson] or [HAL].¶
This specification registers the "host-meta" well-known URI in the Well-Known URI Registry as defined by [RFC6415].¶
URI suffix: api-catalog¶
Specification document(s): draft-smith-api-catalog-00¶
Related information: The "api-catalog" documents obtained from the same host using the HTTP and HTTPS protocols (using default ports) MUST be identical.¶
TODO, add examples in HAL and apisJson¶
TODO¶