<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.17 (Ruby 3.0.2) -->
<?rfc tocindent="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-httpapi-api-catalog-03" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.22.0 -->
  <front>
    <title abbrev="api-catalog well-known URI">api-catalog: a well-known URI and link relation to help discovery of APIs</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-httpapi-api-catalog-03"/>
    <author initials="K." surname="Smith" fullname="Kevin Smith">
      <organization>Vodafone</organization>
      <address>
        <email>kevin.smith@vodafone.com</email>
        <uri>https://www.vodafone.com</uri>
      </address>
    </author>
    <date/>
    <area>IETF</area>
    <keyword>internet-draft</keyword>
    <abstract>
      <?line 78?>

<t>This document defines the "api-catalog" well-known URI and link relation. It is intended to facilitate automated discovery and usage of the APIs published by a given organisation or individual. A request to the api-catalog resource will return a document providing information about, and links to, the publisher's APIs.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://ietf-wg-httpapi.github.io/api-catalog/draft-ietf-httpapi-api-catalog.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-httpapi-api-catalog/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Building Blocks for HTTP APIs Working Group mailing list (<eref target="mailto:httpapi@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/httpapi/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/httpapi/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/ietf-wg-httpapi/api-catalog"/>.</t>
    </note>
  </front>
  <middle>
    <?line 83?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>An organisation or individual 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 publisher exposes, their purpose, any policies for usage, and the endpoint to interact with each APIs. To facilitate automated discovery of this information, and automated usage of the APIs, this document proposes:</t>
      <ul spacing="normal">
        <li>
          <t>a well-known URI, 'api-catalog', as a reference to the URI of an API Catalog document describing a Publisher's API endpoints.</t>
        </li>
        <li>
          <t>a link relation, 'api-catalog', of which the target resource is the Publisher's API Catalog document.</t>
        </li>
      </ul>
      <section anchor="terminology">
        <name>Terminology</name>
        <ul spacing="normal">
          <li>
            <t>'Publisher' - an organisation, company or individual that publishes one or more APIs for usage by external third parties.</t>
          </li>
        </ul>
      </section>
      <section anchor="goals">
        <name>Goals and non-goals</name>
        <t>The primary goal 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 <xref target="RFC8615"/> that returns an API catalog document. The API catalog document is primarily machine-readable to enable automated discovery and usage of APIs, and it may also include links to human-readable documentation.</t>
        <t>Non-goals: this document does not mandate paths for API endpoints. i.e., it does not mandate that my_example_api's endpoint should be example.com/.well-known/api-catalog/my_example_api , nor even to be hosted at example.com (although it is not forbidden to do so). This document does not mandate a specific format for the API catalog document, although it does suggest some existing formats and provide a recommendation.</t>
      </section>
      <section anchor="requirements">
        <name>Requirements Language</name>
        <t>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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="usage">
      <name>Using the 'api-catalog' well-known URI</name>
      <t>The api-catalog well-known URI is intended for HTTP(S) servers that publish APIs. As the key aim is to facilitate discovery and usage of APIs, a Publisher supporting this URI:</t>
      <ul spacing="normal">
        <li>
          <t>SHOULD publish the /.well-known/api-catalog URI at a predictable location. For example as companies typically own a .com TLD, a predictable location for the company 'example' would be https://www.example.com/.well-known/api-catalog</t>
        </li>
        <li>
          <t>SHALL resolve an HTTP(S) GET request to /.well-known/api-catalog and return an API catalog document ( as described in <xref target="API-CATALOG"/> ).</t>
        </li>
        <li>
          <t>SHOULD resolve an HTTP(S) HEAD request to /.well-known/api-catalog with a response including a Link header with the relation(s) defined in <xref target="LINK-RELATION"/></t>
        </li>
      </ul>
      <t>The location (URL) of the API Catalog document is decided by the Publisher: the./well-known/api-catalog URI provides a convenient reference to that URL.</t>
    </section>
    <section anchor="LINK-RELATION">
      <name>Link relations</name>
      <ul spacing="normal">
        <li>
          <t>"api-catalog": the 'api-catalog' link relation identifies a target resource that represents a list of APIs available from the Publisher of the context resource. The target resource URI may be ./well-known/api-catalog , or any other URI chosen by the Publisher. For example, the Publisher 'example.com' could include the api-catalog link relation in the HTTP header and/or content payload when responding to a request to https://example.com :</t>
        </li>
      </ul>
      <sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Location: http://www.example.com/
Link: </my_api_catalog.json>; rel=api-catalog
Content-Length: 356

<!DOCTYPE HTML>
  <html>
    <head>
      <title>Welcome to Example Publisher</title>
    </head>
    <body>
      <p><a href="my_api_catalog.json" rel="api-catalog">Example Publisher's APIs</a>.</p>
      <p>(remainder of content)</p>
    </body>
  </html>

]]></sourcecode>
      <ul spacing="normal">
        <li>
          <t>"item" <xref target="RFC9264"/>. When used in an API Catalog document, the 'item' link relation identifies a target resource that represents an API that is a member of the API Catalog.</t>
        </li>
      </ul>
    </section>
    <section anchor="multiple_domains">
      <name>Accounting for APIs distributed across multiple domains</name>
      <t>A Publisher ('example') may have their APIs hosted across multiple domains that they manage: e.g., at example.com, developer.example.com, apis.example.com, apis.example.net etc. They may also use a third party API hosting provider which hosts APIs on a distinct domain.</t>
      <t>To account for this scenario, it is recommended that:</t>
      <ul spacing="normal">
        <li>
          <t>the Publisher publish the api-catalog well-known URI at a predictable location, e.g. example.com/.well-known/api-catalog .</t>
        </li>
        <li>
          <t>the Publisher also publish the api-catalog well-known URI at each of their API domains e.g. apis.example.com/.well-known/api-catalog, developer.example.net/.well-known/api-catalog etc.</t>
        </li>
        <li>
          <t>an HTTP GET request to any of these URIs should return the same result, namely, the API Catalog document.</t>
        </li>
        <li>
          <t>Since the physical location (URL) of the API Catalog document is decided by the Publisher, and may change, it is RECOMMENDED that the Publisher choose one of their instances of .well-known/api-catalog as a canonical reference to the location of the latest API Catalog. The Publisher's other instances of ./well-known/api-catalog SHOULD redirect to this canonical instance of /.well-known/api-catalog , using HTTP Status Code 308 Permanent Redirect <xref target="RFC9110"/>, to ensure the latest API Catalog is returned.</t>
        </li>
      </ul>
      <t>As illustration, if the Publisher's primary API portal is apis.example.com, then apis.example.com/.well-known/api-catalog should resolve to the location of the latest API Catalog document. If the Publisher is also the domain authority for example.net, which also hosts a selection of their APIs, then a request to www.example.net/.well-known/api-catalog SHOULD return a redirect as follows.</t>
      <t>Client request:</t>
      <sourcecode type="http-message"><![CDATA[
GET /.well-known/api-catalog HTTP/1.1
User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
Host: www.example.net
]]></sourcecode>
      <t>Server response:</t>
      <sourcecode type="http-message"><![CDATA[
HTTP/1.1 308 Permanent Redirect
Content-Type: text/html; charset=UTF-8
Location: http://apis.example.com/.well-known/api-catalog
Content-Length: 356

<!DOCTYPE HTML>
  <html>
    <head>
      <title>Permanent Redirect</title>
      <meta http-equiv="refresh" content="0; url=https://apis.example.com/.well-known/api-catalog">
    </head>
    <body>
      <p>Redirected to:  <a href=https://apis.example.com/.well-known/api-catalog>https://apis.example.com/.well-known/api-catalog</a>.</p>
    </body>
  </html>

]]></sourcecode>
    </section>
    <section anchor="INTERNAL-USE">
      <name>Internal use of api-catalog for private APIs</name>
      <t>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/private APIs not intended for third-party use. This scenario may incur additional security considerations, as noted in <xref target="security"/></t>
    </section>
    <section anchor="API-CATALOG">
      <name>The API Catalog</name>
      <t>The API Catalog is a document listing hyperlinks to a Publisher's APIs.  The Publisher may host this API Catalog document at any URI(s) they choose. Hence the API Catalog document URI of example.com/my_api_catalog.json can be requested directly, or via a request to example.com/.well-known/api-catalog, which the Publisher will resolve to example.com/my_api_catalog.</t>
      <t>There is no mandated format for the API Catalog document: the Publisher is free to choose any format that supports the automated discovery, and machine (and human) usage of their APIs. However, it is RECOMMENDED to use a linkset <xref target="RFC9264"/> of API endpoints (see <xref target="api-catalog-example-linkset"/> for an example).</t>
      <t>The API Catalog document MUST include hyperlinks to API endpoints, and is RECOMMENDED to include useful metadata, such as usage policies, API version information, links to the OpenAPI Specification <xref target="OAS"/> definitions for each API, etc. . If the Publisher does not include these metadata directly in the API Catalog document, they SHOULD make that metadata available at the API endpoint URIs they have listed (see <xref target="api-catalog-example-linkset-bookmarks"/> for an example).</t>
      <t>Some suitable API Catalog document formats include:</t>
      <ul spacing="normal">
        <li>
          <t>(RECOMMENDED) A linkset <xref target="RFC9264"/> of API endpoints and information to facilitate API usage. The linkset SHOULD include a profile parameter (section 5 of <xref target="RFC9264"/>) with the Profile URI 'THIS-RFC-URL' to indicate the linkset is representing an API Catalog document as defined above.</t>
        </li>
        <li>
          <t>An APIs.json document <xref target="APIsjson"/></t>
        </li>
        <li>
          <t>API bookmarks that represent an API entry-point URI, which may be followed to discover purpose and usage</t>
        </li>
        <li>
          <t>A RESTDesc semantic description for hypermedia APIs <xref target="RESTdesc"/></t>
        </li>
        <li>
          <t>A Hypertext Application Language document <xref target="HAL"/></t>
        </li>
        <li>
          <t>An extension to the Schema.org WebAPI type <xref target="WebAPIext"/></t>
        </li>
      </ul>
      <t>Appendix A includes example API Catalog documents based on the linkset format.</t>
    </section>
    <section anchor="CONFORM-RFC8615">
      <name>Conformance to RFC8615</name>
      <t>The requirements in section 3 of <xref target="RFC8615"/> for defining Well-Known Uniform Resource Identifiers are met as follows:</t>
      <section anchor="path-prefix">
        <name>Path prefix</name>
        <t>The api-catalog URI SHALL be appended to the /.well-known/ path-prefix for "well-known locations".</t>
      </section>
      <section anchor="supported-uri-schemes">
        <name>Supported URI schemes</name>
        <t>The api-catalog well-known URI may be used with the HTTP and HTTPS URI schemes.</t>
      </section>
      <section anchor="registration-of-the-api-catalog-well-known-uri">
        <name>Registration of the api-catalog well-known URI</name>
        <t>See <xref target="IANA"/> considerations below.</t>
      </section>
    </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <section anchor="the-api-catalog-well-known-uri">
        <name>The api-catalog well-known URI</name>
        <t>This specification registers the "api-catalog" well-known URI in the Well-Known URI Registry as defined by <xref target="RFC8615"/>.</t>
        <ul spacing="normal">
          <li>
            <t>URI suffix: api-catalog</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification document(s):  THIS-RFC</t>
          </li>
          <li>
            <t>Status: permanent</t>
          </li>
          <li>
            <t>Related information:  The "api-catalog" documents obtained from the same host using the HTTP and HTTPS protocols (using default ports) MUST be identical.</t>
          </li>
        </ul>
      </section>
      <section anchor="the-api-catalog-link-relation">
        <name>The api-catalog link relation</name>
        <t>This specification registers the "api-catalog" link relation by following the procedures per section 4.2.2 of <xref target="RFC8288"/></t>
        <ul spacing="normal">
          <li>
            <t>Relation Name:  api-catalog</t>
          </li>
          <li>
            <t>Description:  Identifies a catalog of APIs published by the context Publisher.</t>
          </li>
          <li>
            <t>Reference:  THIS-RFC</t>
          </li>
        </ul>
      </section>
      <section anchor="the-api-catalog-profile-uri">
        <name>the api-catalog Profile URI</name>
        <t>This specification registers "THIS-RFC-URL" in the "Profile URIs" registry according to <xref target="RFC7284"/>.</t>
        <ul spacing="normal">
          <li>
            <t>Profile URI: THIS-RFC-URL</t>
          </li>
          <li>
            <t>Common Name: API Catalog</t>
          </li>
          <li>
            <t>Description: A profile URI to request or signal a linkset representing an API Catalog.</t>
          </li>
          <li>
            <t>Reference: THIS-RFC</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>For all scenarios: the Publisher SHOULD perform a security and privacy review of the API Catalog prior to deployment, to ensure it does not leak personal, business or other metadata, nor expose any vulnerability related to the APIs listed.</t>
      <t>For the internal/private APIs scenario: the Publisher SHOULD take steps to ensure that appropriate access controls are in place to ensure only authorised users access the internal api-catalog well-known URI.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC8615" target="https://www.rfc-editor.org/info/rfc8615" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8615.xml">
          <front>
            <title>Well-Known Uniform Resource Identifiers (URIs)</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <date month="May" year="2019"/>
            <abstract>
              <t>This memo defines a path prefix for "well-known locations", "/.well-known/", in selected Uniform Resource Identifier (URI) schemes.</t>
              <t>In doing so, it obsoletes RFC 5785 and updates the URI schemes defined in RFC 7230 to reserve that space. It also updates RFC 7595 to track URI schemes that support well-known URIs in their registry.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8615"/>
          <seriesInfo name="DOI" value="10.17487/RFC8615"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC9264" target="https://www.rfc-editor.org/info/rfc9264" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9264.xml">
          <front>
            <title>Linkset: Media Types and a Link Relation Type for Link Sets</title>
            <author fullname="E. Wilde" initials="E." surname="Wilde"/>
            <author fullname="H. Van de Sompel" initials="H." surname="Van de Sompel"/>
            <date month="July" year="2022"/>
            <abstract>
              <t>This specification defines two formats and associated media types for representing sets of links as standalone documents. One format is based on JSON, and the other is aligned with the format for representing links in the HTTP "Link" header field. This specification also introduces a link relation type to support the discovery of sets of links.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9264"/>
          <seriesInfo name="DOI" value="10.17487/RFC9264"/>
        </reference>
        <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2022"/>
            <abstract>
              <t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
              <t>This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
        <reference anchor="RFC8288" target="https://www.rfc-editor.org/info/rfc8288" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8288.xml">
          <front>
            <title>Web Linking</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <date month="October" year="2017"/>
            <abstract>
              <t>This specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").</t>
              <t>It also defines the serialisation of such links in HTTP headers with the Link header field.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8288"/>
          <seriesInfo name="DOI" value="10.17487/RFC8288"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="OAS" target="https://spec.openapis.org/oas/latest">
          <front>
            <title>OpenAPI Specification 3.1.0</title>
            <author initials="" surname="Darrel Miller">
              <organization/>
            </author>
            <author initials="" surname="Jeremy Whitlock">
              <organization/>
            </author>
            <author initials="" surname="Marsh Gardiner">
              <organization/>
            </author>
            <author initials="" surname="Mike Ralphson">
              <organization/>
            </author>
            <author initials="" surname="Ron Ratovsky">
              <organization/>
            </author>
            <author initials="" surname="Uri Sarid">
              <organization/>
            </author>
            <date year="2021" month="February" day="15"/>
          </front>
        </reference>
        <reference anchor="APIsjson" target="http://apisjson.org/format/apisjson_0.16.txt">
          <front>
            <title>APIs.json</title>
            <author initials="" surname="Kin Lane">
              <organization/>
            </author>
            <author initials="" surname="Steve Willmott">
              <organization/>
            </author>
            <date year="2020" month="September" day="15"/>
          </front>
        </reference>
        <reference anchor="HAL" target="https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-11">
          <front>
            <title>JSON Hypertext Application Language</title>
            <author initials="" surname="Mike Kelly">
              <organization/>
            </author>
            <date year="2020" month="September" day="15"/>
          </front>
        </reference>
        <reference anchor="RESTdesc" target="http://apisjson.org/format/apisjson_0.16.txt">
          <front>
            <title>RESTdesc</title>
            <author initials="" surname="Ruben Verborgh">
              <organization/>
            </author>
            <author initials="" surname="Erik Mannens">
              <organization/>
            </author>
            <author initials="" surname="Rick Van de Walle">
              <organization/>
            </author>
            <author initials="" surname="Thomas Steiner">
              <organization/>
            </author>
            <date year="2023" month="September" day="15"/>
          </front>
        </reference>
        <reference anchor="WebAPIext" target="https://webapi-discovery.github.io/rfcs/rfc0001.html">
          <front>
            <title>WebAPI type extension</title>
            <author initials="" surname="Mike Ralphson">
              <organization/>
            </author>
            <author initials="" surname="Nick Evans">
              <organization/>
            </author>
            <date year="2020" month="July" day="08"/>
          </front>
        </reference>
        <reference anchor="RFC7284" target="https://www.rfc-editor.org/info/rfc7284" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7284.xml">
          <front>
            <title>The Profile URI Registry</title>
            <author fullname="M. Lanthaler" initials="M." surname="Lanthaler"/>
            <date month="June" year="2014"/>
            <abstract>
              <t>This document defines a registry for profile URIs to be used in specifications standardizing profiles.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7284"/>
          <seriesInfo name="DOI" value="10.17487/RFC7284"/>
        </reference>
        <reference anchor="RFC8631" target="https://www.rfc-editor.org/info/rfc8631" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8631.xml">
          <front>
            <title>Link Relation Types for Web Services</title>
            <author fullname="E. Wilde" initials="E." surname="Wilde"/>
            <date month="July" year="2019"/>
            <abstract>
              <t>Many resources provided on the Web are part of sets of resources that are provided in a context that is managed by one particular service provider. Often, these sets of resources are referred to as "Web services" or "Web APIs". This specification defines link relations that represent relationships from Web services or APIs to resources that provide documentation, descriptions, metadata, or status information for these resources. Documentation is primarily intended for human consumers, whereas descriptions are primarily intended for automated consumers. Metadata provides information about a service's context. This specification also defines a link relation to identify status resources that are used to represent information about service status.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8631"/>
          <seriesInfo name="DOI" value="10.17487/RFC8631"/>
        </reference>
      </references>
    </references>
    <?line 263?>

<section anchor="api-catalog-example-linkset">
      <name>Example API Catalog document</name>
      <t>This section is informative, and provides and example of an API Catalog document using the RECOMMENDED linkset format.</t>
      <section anchor="using-linkset-with-rfc8615-relations">
        <name>Using Linkset with RFC8615 relations</name>
        <t>This example uses the linkset format <xref target="RFC9264"/>, and the following link relations defined in <xref target="RFC8631"/>:</t>
        <ul spacing="normal">
          <li>
            <t>"service-desc", used to link to a description of the API that is primarily intended for machine consumption.</t>
          </li>
          <li>
            <t>"service-doc", used to link to API documentation that is primarily intended for human consumption.</t>
          </li>
          <li>
            <t>"service-meta", used to link to additional metadata about the API, and is primarily intended for machine consumption.</t>
          </li>
          <li>
            <t>"status", used to link to the API status (e.g. API "health" indication etc.) for machine and/or human consumption.</t>
          </li>
        </ul>
        <t>Client request:</t>
        <sourcecode type="http-message"><![CDATA[
GET .well-know/api-catalog HTTP/1.1
Host: example.com
Accept: application/linkset+json
]]></sourcecode>
        <t>Server response:</t>
        <sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK
Date: Mon, 01 Jun 2023 00:00:01 GMT
Server: Apache-Coyote/1.1
Content-Type: application/linkset+json;
    profile="THIS-RFC-URL"
]]></sourcecode>
        <artwork><![CDATA[
{
  "linkset": [
  {
    "anchor": "https://developer.example.com/apis/foo_api",
    "service-desc": [
      {
        "href": "https://developer.example.com/apis/foo_api/spec",
        "type": "application/yaml"
      }
    ],
    "status": [
      {
        "href": "https://developer.example.com/apis/foo_api/status",
        "type": "application/json"
      }
    ],
    "service-doc": [
      {
        "href": "https://developer.example.com/apis/foo_api/doc",
        "type": "text/html"
      }
    ],
    "service-meta": [
      {
        "href": "https://developer.example.com/apis/foo_api/policies",
        "type": "text/xml"
      }
    ]
  },
  {
    "anchor": "https://developer.example.com/apis/bar_api",
    "service-desc": [
      {
        "href": "https://developer.example.com/apis/bar_api/spec",
        "type": "application/yaml"
      }
    ],
    "status": [
      {
        "href": "https://developer.example.com/apis/bar_api/status",
       "type": "application/json"
      }
    ],
    "service-doc": [
      {
        "href": "https://developer.example.com/apis/bar_api/doc",
        "type": "text/plain"
      }
    ]
  },
  {
    "anchor": "https://apis.example.net/apis/cantona_api",
    "service-desc": [
      {
        "href": "https://apis.example.net/apis/cantona_api/spec",
        "type": "text/n3"
      }
    ],
    "service-doc": [
      {
        "href": "https://apis.example.net/apis/cantona_api/doc",
        "type": "text/html"
      }
    ]
  }
  ]
}
]]></artwork>
      </section>
      <section anchor="api-catalog-example-linkset-bookmarks">
        <name>Using Linkset with bookmarks</name>
        <t>This example also uses the linkset format <xref target="RFC9264"/>, listing the API endpoints in an array of bookmarks. Each link shares the same context (the API Catalog) and "item" <xref target="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 of each API, hence the document targeted by the bookmark link should support this.</t>
        <t>Note in the example below, the context anchor is example/com/.well-known/api-catalog, however as explained above the  context anchor may be any other URI at which the api-catalog is available.</t>
        <t>Client request:</t>
        <sourcecode type="http-message"><![CDATA[
GET .well-know/api-catalog HTTP/1.1
Host: example.com
Accept: application/linkset+json
]]></sourcecode>
        <t>Server response:</t>
        <sourcecode type="http-message"><![CDATA[
HTTP/1.1 200 OK
Date: Mon, 01 Jun 2023 00:00:01 GMT
Server: Apache-Coyote/1.1
Content-Type: application/linkset+json;
    profile="THIS-RFC-URL"
]]></sourcecode>
        <artwork><![CDATA[
[
  { "anchor": "https://example.com/.well-known/api-catalog",
    "item": [
      {"href": "https://developer.example.com/apis/foo_api"},
      {"href": "https://developer.example.com/apis/bar_api"},
      {"href": "https://developer.example.com/apis/cantona_api"}
    ]
  }
]
]]></artwork>
      </section>
    </section>
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to Phil Archer, Ben Bucksch, Sanjay Dalal, Max Maton, Darrel Miller, Mark Nottingham,  Roberto Polli, Rich Salz, Herbert Van De Sompel and Erik Wilde for their suggestions and feedback.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1cW3PbOLJ+d5X/A1Z5iD2rm+2ZSaJxsqvYTuKJb8eSJ7WV
SqUgChIxpgguQcrRuDy/fbsbAAlSku1ksnXOw0ntJBKJS9/76wa0rVZrcyOT
WSR6rMET2Qp4xiM17THObkQUta5jdROzq8tjxuMxi2R8zVIR8UyqmGWKhSJK
2FjqQM1FumBqwvoXx7qxucFHo1TMYZlyzdqCmxtjFcR8BjuPUz7JWlJkk1aY
ZQnO8ea1unswlmcw8PawPzy6g9VTwXvs+Gj4ZnMDRompShc9prPx5sbmhkzS
HsvSXGe73e6L7u7mxrVY3Kh03GMyzkQai6xFO25uJLLHPmYqaAIvgYzHIs6a
TKs0S8VEw6fFzH7IUhnAq0DNEm4/zGAwvJIxCEV8wo3nIs5Fb3ODsWmq8gQk
+jqX0VjGU/Y6UsG1ZhOVsnfD4YWTEmPZIkHRf1DpNY57ixPpxYzLCF5YefwT
hdNW6ZTe8TQI7Tvd63RwKD6Sc9F24zr4oDNK1Y0WHbtIhyZPZRbmI5hO8r6Z
OpF3PJHTQNCy0Jm3T21C26zUlsqf2rlfme0wm0UNlBbPs1ClKK4W7sZAkrrH
3rfZYAbrmkfGPN6LuYz9x8Afj+UfZIU99psa84mKhXknjOCucU5b45x/zu2A
NmjNDMpTULxj6+bmpl0dsrkRq3QGy89RnWRT8cR7wth5f9AzS1nnOU9EDEpl
g0QEciID4yF77Z1214wzBrzb3d1pdXdbOz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