Re: [httpapi] I-D: api-catalog: A well-known URI to help discovery of APIs

Herbert Van de Sompel <hvdsomp@gmail.com> Wed, 12 July 2023 11:27 UTC

Return-Path: <hvdsomp@gmail.com>
X-Original-To: httpapi@ietfa.amsl.com
Delivered-To: httpapi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 12F81C151B1D for <httpapi@ietfa.amsl.com>; Wed, 12 Jul 2023 04:27:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PpA6kQ_GRYlc for <httpapi@ietfa.amsl.com>; Wed, 12 Jul 2023 04:27:34 -0700 (PDT)
Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4C42C151AFC for <httpapi@ietf.org>; Wed, 12 Jul 2023 04:27:34 -0700 (PDT)
Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-ca9804dc6e4so306052276.0 for <httpapi@ietf.org>; Wed, 12 Jul 2023 04:27:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689161254; x=1691753254; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Uql44TsRyd0qaqFAkuxuQJGGggjIEkU7OKeLGuSGpow=; b=Bii6MArsIcb5gjG5vm98M6S3rzN7kzQzrjlVRsHoTC35Zqm4Rg743E0IN2j9FsB92a KV9G3EHu80tMMnOn1XrIniZtT15IvZE0WiCHvjnAhEnaosLvLJ4hMShRE22HJsFfWuQk k+WCderxL1F+PIfjUyImI8VUmUWTV5CIcfZ5DXcLXm7HgBzUZ3qUSGwFHtqyn/af17Jj SxkOxZZQxH4F9mFY8/xcYQU90lSErW5evJ37Z3CMsTot31sb0M+Xo0mvAWG+P4rmlt+l SfDg0CRj/1WgJq10PqjfAlI2Xm6k+EgIfFSqAoeDh3caGEvEctulS9ZoaDvT2vfurgtZ xeIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689161254; x=1691753254; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Uql44TsRyd0qaqFAkuxuQJGGggjIEkU7OKeLGuSGpow=; b=Q0o4AmGUmA30vhKy/4xIweXtFNx4B3bYMqOhxBb67j43EbQWrK04VQs+eJkDDMEuav 4LwRKsG79wy6xVklzmKhoitt6hAMHVj3d8z4gT2sfw6nl5JE+lYVzJJxlB+hDM1J8x6y PA0oFhtCuYasAYJatF3a0y39Sa5aHrqMzvWGXdgtnATMC4E/HJ/BJGQZ4SRuT88ZM7ty lkZOM7AYaDAhCQ7jPnBMNLs2x0KeISsBhQ3ruXS0GN2M2iXcI9TlmWaKM95DmaSfli8w w5aHd9e7ptUz+/R7iRJstYn2TpSfXDHB+YUAL5ln64duRuMGiD2WFHd9DnC+dwSODrzP 8yLw==
X-Gm-Message-State: ABy/qLaBTsf4jzk0iWJ2CxDlG4hRYyW2Xh7i0TltJcC2LFSzwOvVxTVk Gzg0aSf8W6SaCa4SjR8pKNm2DUWGpf6WnsRDI0o=
X-Google-Smtp-Source: APBJJlEk6XsxUfvfF/pzQL0kKzWr4X5/duX2mJ8nkErl3OYxNjDguMNHbRZYSJwGxYeveT/DN3qRvICVmL3gtWGYzms=
X-Received: by 2002:a25:41d0:0:b0:be5:4d4b:27c8 with SMTP id o199-20020a2541d0000000b00be54d4b27c8mr1936840yba.2.1689161253916; Wed, 12 Jul 2023 04:27:33 -0700 (PDT)
MIME-Version: 1.0
References: <AM5PR0501MB2418A51DEAFA56200C47257391769@AM5PR0501MB2418.eurprd05.prod.outlook.com> <AM5PR0501MB2418FF42FB0AF1BCBAB08A7F914DA@AM5PR0501MB2418.eurprd05.prod.outlook.com>
In-Reply-To: <AM5PR0501MB2418FF42FB0AF1BCBAB08A7F914DA@AM5PR0501MB2418.eurprd05.prod.outlook.com>
From: Herbert Van de Sompel <hvdsomp@gmail.com>
Date: Wed, 12 Jul 2023 13:27:22 +0200
Message-ID: <CAOywMHeCJObyqunxL7O+tiYXbqB3tOz6hbsP-hFo2xodYfvBHw@mail.gmail.com>
To: "Kevin Smith, Vodafone" <Kevin.Smith=40vodafone.com@dmarc.ietf.org>
Cc: "httpapi@ietf.org" <httpapi@ietf.org>, Herbert Van de Sompel <hvdsomp@gmail.com>
Content-Type: multipart/alternative; boundary="0000000000008216b80600488093"
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/goJalxP2lOR9WtirkL80PO2e0rI>
Subject: Re: [httpapi] I-D: api-catalog: A well-known URI to help discovery of APIs
X-BeenThere: httpapi@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Building Blocks for HTTP APIs <httpapi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/httpapi>, <mailto:httpapi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/httpapi/>
List-Post: <mailto:httpapi@ietf.org>
List-Help: <mailto:httpapi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/httpapi>, <mailto:httpapi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Jul 2023 11:27:39 -0000

Hi all,

I have looked at the discussion thread and the latest version of the
api-catalog spec and arrived at a possible other approach for the linkset:
* It has an anchor for each API endpoint
* It uses the existing link relation types service-desc, service-doc, and
service-meta as defined in Erik's
https://www.rfc-editor.org/rfc/rfc8631.html

Advantages I see:
- Re-use of existing well-documented link relation types
- Ability to point at both machine readable and human readable documentation
- Ability to advertise support for standards/specifications for which no
machine readable API documentation exists.

This is a rendition of Kevin's example from the I-D according to that
approach:

{
  "linkset": [
    {
      "anchor": "https://developer.example.com/apis/foo_api",
      "service-desc": [
        {
          "href": "https://developer.example.com/apis/foo_api/spec",
          "type": "text/n3"
        }
      ],
      "service-doc": [
        {
          "href": "https://developer.example.com/apis/foo_api/doc",
          "type": "text/html"
        }
      ]
    },
    {
      "anchor": "https://developer.example.com/apis/bar_api",
      "service-desc": [
        {
          "href": "https://developer.example.com/apis/bar_api/spec",
          "type": "application/json"
        }
      ],
      "service-doc": [
        {
          "href": "https://developer.example.com/apis/bar_api/doc",
          "type": "text/plain"
        }
      ]
    },
    {
      "anchor": "https://developer.example.com/apis/cantona_api",
      "service-desc": [
        {
          "href": "https://developer.example.com/apis/cantona_api/spec",
          "type": "text/n3"
        }
      ],
      "service-doc": [
        {
          "href": "https://developer.example.com/apis/cantona_api/doc",
          "type": "text/html"
        }
      ]
    }
  ]
}

Greetings

Herbert

On Mon, Jun 5, 2023 at 5:09 PM Kevin Smith, Vodafone <Kevin.Smith=
40vodafone.com@dmarc.ietf.org> wrote:

> Hi,
>
> https://datatracker.ietf.org/doc/draft-smith-api-catalog/
>
> V0.2 published with a suggested linkset format and two link relations. Per
> earlier discussion, these changes are intended to facilitate
> machine-readability/automated API discovery and usage, with the draft
> specifying that the api-catalog media type be a linkset containing API
> bookmarks. I think that following a bookmark should return a description
> with sufficient information for automated API usage,  and I've made a note
> that RESTdesc may provide the appropriate semantic binding. But any advice
> welcome!
>
> All best
> Kevin
>
>
> C2 General
>
> --
> httpapi mailing list
> httpapi@ietf.org
> https://www.ietf.org/mailman/listinfo/httpapi
>


-- 
==================
Herbert Van de Sompel
https://hvdsomp.info
https://orcid.org/0000-0002-0715-6126