RFC 9727: api-catalog: A Well-Known URI and Link Relation to Help Discovery of APIs
- K. Smith
Abstract
This document defines the "api-catalog" well-known URI and link relation. It is intended to facilitate automated discovery and usage of published Application Programming Interfaces (APIs). A request to the api-catalog resource will return a document providing information about, and links to, the Publisher's APIs.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2025 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://
1. Introduction
An application may publish 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 Publisher exposes, their purpose, any policies for usage, and the endpoint to interact with each API. To facilitate automated discovery of this information and automated usage of the APIs, this document proposes:¶
1.1. Goals and Non-Goals
The primary goal of this document is to facilitate the automated discovery
of a Publisher's public API endpoints, along with metadata that describes the
purpose and usage of each API, by specifying a well-known URI that returns an
API catalog document. The API catalog document is primarily machine
Non-goals: This document does not mandate paths for API endpoints, i.e., it does not mandate that myhttps://, nor
even to be hosted at www.example.com (although it is not forbidden to
do so).¶
1.2. Notational Conventions
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] [RFC8174] when, and only when, they appear in all capitals, as shown here. These words may also appear in this document in lower case as plain English words, absent their normative meanings.¶
The terms "content negotiation" and "status code" are from [HTTP]. The term "well-known URI" is from [WELL-KNOWN]. The term "link relation" is from [WEB-LINKING].¶
The term "Publisher" refers to an organisation, company, or
individual that publishes one or more APIs for use by external third
parties. A fictional Publisher named "example" is used throughout
this document. The examples use the Fully Qualified Domain Names
(FQDNs) "www
In this document, "API" refers to the specification resources required for an external party (or in the case of "private" APIs, an internal party) to implement software that uses the Publisher's API.¶
The specification recommends the use of TLS. Hence, "HTTPS" and "https://" are used throughout.¶
2. Using the "api-catalog" Well-Known URI
The api-catalog well-known URI is intended for HTTPS servers that publish APIs.¶
A Publisher supporting this URI:¶
3. The api-catalog Link Relation
This document introduces a new link relation [WEB-LINKING],
"api-catalog". This identifies a target resource that represents a
list of APIs available from the Publisher of the link context.
The target resource URI may be https://:¶
3.1. Using Additional Link Relations
When used in an API catalog document, the "item" [RFC6573] link relation identifies a target resource that represents an API that is a member of the API catalog.¶
Other link relations may be utilised in an API catalog to convey metadata descriptions for API links.¶
4. The API Catalog Document
The API catalog is a document listing a Publisher's APIs. The
Publisher may host the API catalog document at any URI(s)
they choose.
For example, the API catalog document URI of
https:// can be requested directly or
via a request to https://, which
the Publisher will resolve to https://.¶
4.1. API Catalog Contents
The API catalog MUST include hyperlinks to API endpoints. It is RECOMMENDED that the API catalog also includes useful metadata, such as usage policies, API version information, links to the OpenAPI Specification [OAS] definitions for each API, etc. If the Publisher does not include that metadata directly in the API catalog document, they SHOULD make that metadata available at the API endpoint URIs they have listed (see Appendix A.2 for an example).¶
4.2. API Catalog Formats
The Publisher MUST publish the API catalog document in the Linkset
format application (Section 4.2 of [RFC9264]).
The Linkset SHOULD include a profile parameter (Section 5 of [RFC9264]) with a Profile URI [RFC7284] value of "https://
The Publisher MAY make additional formats available via
content negotiation (Section 12 of [HTTP]) to their
4.3. Nesting API Catalog Links
An API catalog may itself contain links to other API catalogs by using the "api-catalog" relation type for each link. An example of this is given in Appendix A.4.¶
5. Operational Considerations
5.1. Accounting for APIs Distributed Across Multiple Domains
A Publisher ("example") may have their APIs hosted across multiple
domains that they manage, e.g., at www.example.com,
developer, apis.example.com,
apis.example.net, etc. They may also use a third-party API
hosting provider that hosts APIs on a distinct domain.¶
To account for this scenario, it is RECOMMENDED that:¶
For example, if the Publisher's primary API portal is
https://, then
https:// should resolve to
the location of the Publisher's latest API catalog document. If the
Publisher is also the domain authority for www.example.net,
which also hosts a selection of their APIs, then a request to
https:// should redirect
to https://.¶
If the Publisher is not the domain authority for www.example.net,
then the Publisher's API Catalog MAY include a link to the
API catalog of the third-party that is the domain authority for www.example.net. For example, the API catalog available
at https:// may list APIs
hosted at apis.example.com and also link to the API catalog hosted
at https:// using the
"api-catalog" link relation:¶
5.2. Internal Use of api-catalog for Private APIs
A Publisher may wish to use the api-catalog well-known URI on their
internal network to signpost authorised users (e.g., company
employees) towards internal
5.3. Scalability Guidelines
In cases where a Publisher has a large number of APIs potentially deployed across multiple domains, two challenges may arise:¶
In both cases, a Publisher may benefit from grouping their APIs,
providing an API catalog document for each group and using the main
API catalog hosted at gaming,
iot.example.net, etc.¶
Section 4.3 shows how the API catalog at
The Publisher SHOULD consider caching and compression techniques to reduce the network overhead of large API catalogs.¶
5.4. Monitoring and Maintenance
Publishers are RECOMMENDED to follow operational best practice when hosting API catalog(s), including, but not limited to:¶
5.5. Integration with Existing API Management Frameworks
A Publisher may already utilise an API management framework to produce their API portfolio. These frameworks typically include the publication of API endpoint URIs, deprecation and redirection of legacy API versions, API usage policies and documentation, etc. The api-catalog well-known URI and API catalog document are intended to complement API management frameworks by facilitating the discovery of the framework's outputs -- API endpoints, usage policies, and documentation -- and are not intended to replace any existing API discovery mechanisms the framework has implemented.¶
Providers of such frameworks may include the production of an API
catalog and the publication of the
If the
If the
6. Conformance to RFC 8615
The requirements in Section 3 of [WELL-KNOWN] for defining Well-Known URIs are met as described in the following subsections.¶
6.1. Path Suffix
The api-catalog URI SHALL be appended to the /.well-known/ path-prefix for "well-known locations".¶
6.2. Formats and Associated Media Types
A
7. IANA Considerations
7.1. The api-catalog Well-Known URI
This specification registers the "api-catalog" well-known URI in the "Well-Known URIs" registry as defined by [WELL-KNOWN].¶
7.2. The api-catalog Link Relation
This specification registers the "api-catalog" link relation in the "Link Relation Types" registry by following the procedures per Section 2.1.1.1 of [WEB-LINKING].¶
7.3. The api-catalog Profile URI
This specification registers "https://
8. Security Considerations
For all scenarios:¶
For the public-facing APIs scenario, security teams SHOULD
additionally audit the API catalog to ensure no APIs intended solely
for internal use have been mistakenly included. For example, a
catalog hosted on https:// should not expose
unnecessary metadata about any internal domains
(e.g., https://).¶
For the internal
A comprehensive API catalog that is regularly audited may assist the Publisher in decommissioning "zombie" APIs, i.e., legacy/obsolete APIs that should no longer be available. Such APIs represent a security vulnerability as they are unlikely to be supported, monitored, patched, or updated.¶
Note the registration of domain names and associated policies is out of scope of this document.¶
9. References
9.1. Normative References
- [HTTP]
-
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10
.17487 , , <https:///RFC9110 www >..rfc -editor .org /info /rfc9110 - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC6573]
-
Amundsen, M., "The Item and Collection Link Relations", RFC 6573, DOI 10
.17487 , , <https:///RFC6573 www >..rfc -editor .org /info /rfc6573 - [RFC7284]
-
Lanthaler, M., "The Profile URI Registry", RFC 7284, DOI 10
.17487 , , <https:///RFC7284 www >..rfc -editor .org /info /rfc7284 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC9264]
-
Wilde, E. and H. Van de Sompel, "Linkset: Media Types and a Link Relation Type for Link Sets", RFC 9264, DOI 10
.17487 , , <https:///RFC9264 www >..rfc -editor .org /info /rfc9264 - [WEB-LINKING]
-
Nottingham, M., "Web Linking", RFC 8288, DOI 10
.17487 , , <https:///RFC8288 www >..rfc -editor .org /info /rfc8288 - [WELL-KNOWN]
-
Nottingham, M., "Well-Known Uniform Resource Identifiers (URIs)", RFC 8615, DOI 10
.17487 , , <https:///RFC8615 www >..rfc -editor .org /info /rfc8615
9.2. Informative References
- [APIsjson]
-
Lane, K. and S. Willmott, "API Discovery Format", , <https://
apisjson >. Latest version available at <https://.org /format /apisjson _0 .19 .txt apisjson >..org / - [HAL]
-
Kelly, M., "JSON Hypertext Application Language", Work in Progress, Internet-Draft, draft
-kelly , , <https://-json -hal -11 datatracker >..ietf .org /doc /html /draft -kelly -json -hal -11 - [OAS]
-
Miller, D., Ed., Andrews, H., Ed., Whitlock, J., Ed., Mitchell, L., Ed., Gardiner, M., Ed., Quintero, M., Ed., Kistler, M., Ed., Handl, R., Ed., and R. Ratovsky, Ed., "OpenAPI Specification v3.1.0", , <https://
spec >. Latest version available at <https://.openapis .org /oas /latest spec >..openapis .org /oas /latest .html - [RESTdesc]
-
Verborgh, R., Mannens, E., Van de Walle, R., and T. Steiner, "RESTdesc", , <https://
restdesc >..org /about /descriptions - [RFC8631]
-
Wilde, E., "Link Relation Types for Web Services", RFC 8631, DOI 10
.17487 , , <https:///RFC8631 www >..rfc -editor .org /info /rfc8631 - [WebAPIext]
-
Ralphson, M., Ed. and N. Evans, Ed., "WADG0001 WebAPI type extension", Draft Community Group Report, , <https://
webapi >.-discovery .github .io /rfcs /rfc0001 .html
Appendix A. Example API Catalog Documents
This section is informative and provides and example of an API catalog document using the Linkset format.¶
A.1. Using Linkset with Link Relations Defined in RFC 8631
This example uses the Linkset format [RFC9264] and the following link relations defined in [RFC8631]:¶
- "service-desc":
- Used to link to a description of the API that is primarily intended for machine consumption (for example, the [OAS] specification, YAML, or JSON file).¶
- "service-doc":
- Used to link to API documentation that is primarily intended for human consumption (an example of human-readable documentation is the IETF Internet-Draft submission API instructions).¶
- "service-meta":
- Used to link to additional metadata about the API and is primarily intended for machine consumption.¶
- "status":
- Used to link to the API status (e.g., API "health" indication) for machine and/or human consumption.¶
Client request:¶
Server response:¶
A.2. Using Linkset with Bookmarks
This example also uses the Linkset format [RFC9264] and lists the API endpoints in an array of bookmarks. Each link shares the same context anchor (the well-known URI of the API catalog) and "item" [RFC9264] link relation (to indicate they are an item in the catalog). The intent is that by following a bookmark link, a machine client can discover the purpose and usage policy for each API; hence, the document targeted by the bookmark link should support this.¶
Client request:¶
Server response:¶
A.3. Other API Catalog Formats
A non-exhaustive list of other API catalog document formats includes:¶
A.4. Nesting API Catalog Links
In this example, a request to the
Client request:¶
Server response:¶
Acknowledgements
Thanks to Jan Algermissen, Phil Archer, Tim Bray, Ben Bucksch, Sanjay Dalal, David Dong, Erik Kline, Mallory Knodel, Murray Kucherawy, Max Maton, Darrel Miller, Mark Nottingham, Roberto Polli, Joey Salazar, Rich Salz, Herbert Van De Sompel, Orie Steele, Tina Tsou, Gunter Van de Velde, Éric Vyncke, and Erik Wilde for their reviews, suggestions, and support.¶