Re: [Tools-discuss] RESTful API style guide

Martin Thomson <martin.thomson@gmail.com> Tue, 18 June 2013 04:06 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 31E0F11E80DC for <tools-discuss@ietfa.amsl.com>; Mon, 17 Jun 2013 21:06:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.53
X-Spam-Level:
X-Spam-Status: No, score=-2.53 tagged_above=-999 required=5 tests=[AWL=0.070, BAYES_00=-2.599, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GjEc6PigB8xT for <tools-discuss@ietfa.amsl.com>; Mon, 17 Jun 2013 21:06:13 -0700 (PDT)
Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) by ietfa.amsl.com (Postfix) with ESMTP id 009F011E80C5 for <tools-discuss@ietf.org>; Mon, 17 Jun 2013 21:06:11 -0700 (PDT)
Received: by mail-we0-f180.google.com with SMTP id w56so2906879wes.25 for <tools-discuss@ietf.org>; Mon, 17 Jun 2013 21:06:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Hc0uYHL/WXoLIX8OYg1TBzORFO2duXpyKBbf/2dx+Ss=; b=QUQDr7QIXFOZXSsu+hwjg6vhgFqsUd9amsR8QEB4d3LmvnFcBmDUYd7zQl2SSJuqyM rHaQtKqepMIM9z4ohqQ+A81e/P+vz7897gWI3fEEEsyAFRjBKcLR/rR7/R3Xp6dxDm7v E/f6UfT8uwqq0RBCP8J79TARElv2m87cfN0NK3r2Zq9skHw4s1iFewMna5Eh5mGQJGYg yoeH6Fz4oPdtov2c8G1swJBQYDI6vmHUs4F5daM2hfMbl36pGuTH55/FN8mMTtvtSDJb fd1Rao5m31w/bkdwpAL43mnoMMCH/lFd7WQZyZoAkBtPnz+eLmpB6tJ7OE/OzeQYiDeR Tc1Q==
MIME-Version: 1.0
X-Received: by 10.194.77.99 with SMTP id r3mr1705534wjw.5.1371528371131; Mon, 17 Jun 2013 21:06:11 -0700 (PDT)
Received: by 10.194.60.46 with HTTP; Mon, 17 Jun 2013 21:06:11 -0700 (PDT)
In-Reply-To: <21266.1371520672@sandelman.ca>
References: <21266.1371520672@sandelman.ca>
Date: Mon, 17 Jun 2013 21:06:11 -0700
Message-ID: <CABkgnnVWDVe-NVJ71m2ak2yEcuSC11ktBjWd2_iL3pa0+emA2A@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Michael Richardson <mcr+ietf@sandelman.ca>
Content-Type: text/plain; charset="UTF-8"
Cc: "tools-discuss@ietf.org Discussion" <tools-discuss@ietf.org>
Subject: Re: [Tools-discuss] RESTful API style guide
X-BeenThere: tools-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF Tools Discussion <tools-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tools-discuss>
List-Post: <mailto:tools-discuss@ietf.org>
List-Help: <mailto:tools-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Jun 2013 04:06:15 -0000

On 17 June 2013 18:57, Michael Richardson <mcr+ietf@sandelman.ca> wrote:
> This is just *TOO SLOW*.  Too many small requests.  (I assume the browser has
> a 1.1-persistent session open, but I haven't checked actually).
> I'd like to replace it with:
>     GET /groups.json
> returning an array of groups.  Does this make sense, architecturally?

Yes.  That index can include any information you deem to be useful in
that context, which could be all fields.

I don't think that you have the PUT thing right, but I'd need more
context on what you are trying to achieve with that.  And probably a
more complete description of what happens (i.e., where the PUT is
targetted, not the URI, but the type of thing that you are PUTting
at.)  What you described sounds like a POST, not a PUT.