[httpapi] Link-Template introduction feedback
Austin Wright <aaa@bzfx.net> Thu, 28 March 2024 00:21 UTC
Return-Path: <aaa@bzfx.net>
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 AA98CC15152D for <httpapi@ietfa.amsl.com>; Wed, 27 Mar 2024 17:21:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.106
X-Spam-Level:
X-Spam-Status: No, score=-7.106 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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 (1024-bit key) header.d=bzfx.net
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 aruSPDRLiq8i for <httpapi@ietfa.amsl.com>; Wed, 27 Mar 2024 17:21:22 -0700 (PDT)
Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 CE553C14CE33 for <httpapi@ietf.org>; Wed, 27 Mar 2024 17:21:22 -0700 (PDT)
Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e0411c0a52so4127155ad.0 for <httpapi@ietf.org>; Wed, 27 Mar 2024 17:21:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bzfx.net; s=google; t=1711585281; x=1712190081; darn=ietf.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=kcS0jRxbpXPVWFIFp6ehRbuIRwbeOGOxe6fUXR3artY=; b=4dk6wMZDAB29eOe/nyQQCJ8WeZq25tqxKEtvNM+m5dp2VbyaSrzbcd1Usp7YwHs+CK 03ToIwrSv4u6yQKauRg3+Pi71b5c61YkpDV4jTYS771tsBQLTQFB+VL61IOpW0GgWlcV p+GcBsrlmY/aSNtpG1lWbw1hTHLoCHrq8NEgA=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711585281; x=1712190081; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kcS0jRxbpXPVWFIFp6ehRbuIRwbeOGOxe6fUXR3artY=; b=dlOfSR8/lMo2Z2TZKKkV3kzDy0mt5CZZdfdIN7L8MzbYthBczeZRqRhHzP6GSKMxz7 mnX87ccEv6C7MRPU1ENw3q0lWPT8Q+Hv7ruGiDhM/aWpSLqfUn8nfYeINOhwnhlNhRiI 45L5+Ug4evP66acX4rCuMTnpVezhEnmRgXthDtmMdG17DTZRhIOsyHYK4U9gHQ3hA3bO 52lj2s0GGjLkc25rVYU8Mbky/T6Nn5IVMj4QSUbAnYpSb7dB8HuIHVFM/vsbiLmUn9hK 29List4AGjgkn7KwFJod2E/3mHX+VZMzmd5suKaR1ZQE4NGZEkHuVkKPp/sCPbnNLbs7 e8Fw==
X-Gm-Message-State: AOJu0Ywa43C0W0HdxfE9ihRC/lLfz90cVrcy2+5DUL3FnNX9TQKzCcNh 42RXrz5PePq7qOhzfwnigPuHoAbQnv6xwSCdfbTdnOwhnjsphrZAZAS/avISDysBKmlzBrRX7xM =
X-Google-Smtp-Source: AGHT+IHxeRvX8Q0hPewSMvsu1iIQ5EpbEpn13oH55sq8MOYjfHS8skmbxXLNcNYd2F8ZiFRec/Hk2A==
X-Received: by 2002:a17:902:ea09:b0:1e0:e6b0:2364 with SMTP id s9-20020a170902ea0900b001e0e6b02364mr1496456plg.64.1711585281314; Wed, 27 Mar 2024 17:21:21 -0700 (PDT)
Received: from smtpclient.apple (71-223-72-164.phnx.qwest.net. [71.223.72.164]) by smtp.gmail.com with ESMTPSA id m9-20020a170902db0900b001dd578121d4sm124669plx.204.2024.03.27.17.21.20 for <httpapi@ietf.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2024 17:21:20 -0700 (PDT)
From: Austin Wright <aaa@bzfx.net>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
Message-Id: <A9E03354-8093-416E-A9D5-4B58530101FF@bzfx.net>
Date: Wed, 27 Mar 2024 17:21:09 -0700
To: HTTP APIs Working Group <httpapi@ietf.org>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/I2-FT-f75kAGvpaVBQGL48jPrfo>
Subject: [httpapi] Link-Template introduction feedback
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: Thu, 28 Mar 2024 00:21:27 -0000
Reading the Link-Template draft, it’s not immediately clear to me what the practical use of a Link-Template is, or what it means semantically. Those familiar with hypermedia APIs will understand it’s a feature currently missing from HTTP, and what its applications are; but I think the document would benefit if this were elaborated on in the introduction (non-normatively). There appears to be an IESG reviewer who shares this view.
To address this, I would suggest mentioning that Link-Template is a way to map some non-URL value to a link; or to relate one document to an unbounded set of documents via a parameter. And that it is semantically similar to an HTML form with method=GET.
This functionality does exist in some media types, and sometimes would be better suited in the response body. For example, equating an ISBN to a product page is traditionally best as an HTML form and would make little sense in Link-Template. So, I would point out that Link-Template is there for responses that are not otherwise hypermedia. So as a more realistic example, if an HTTP server returns an image, it might use Link-Template to attach a link describing how to resize or crop the image in the response body, or perform a full text search within the underlying date:
HTTP/1.1 200 OK
Content-Type: application/png
Content-Location: /map.jpeg
Link-Template: “/map.jpeg{?cropx,cropy,cropw,croph}";
rel="https://example.org/map/crop";
var-base="https://example.org/map/crop/vars"
The Link-Template in this example equates an image to a set of documents that crop it in various ways, depending on the parameters.
Regards,
Austin Wright.
- [httpapi] Link-Template introduction feedback Austin Wright