<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 14/08/12 11:27 AM, Lukas Zapletal
      wrote:<br>
    </div>
    <blockquote cite="mid:20120814102747.GG2850@lzapx.brq.redhat.com"
      type="cite">
      <pre wrap="">On Thu, Aug 09, 2012 at 01:42:44PM +0100, Dmitri Dolguikh wrote:
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">The issue boils down to renaming of environments. If we are to use
environment names for environment identification, we have to
provide resolution for urls that are no longer valid (via 301).
Doable, but additional work.
</pre>
        </blockquote>
        <pre wrap="">Additional work would include support for 301 responses on clients too.

</pre>
      </blockquote>
      <pre wrap="">
But why would we need 301 responses? I mean, once you rename, the thing
is done. Users are using CLI to interact with the backend, CLI takes
care of translating labels/names to IDs. This is transparent to the
users.

</pre>
    </blockquote>
    The original resource still exists, only its location has changed.
    Since we cannot know how API clients use resource urls, how long
    they keep them around, etc, we either: have to return the resource,
    its new location, or notify the user that the resource in question
    has been deleted. That is the reason why http response codes
    differentiate between "not found" (404) and "permanently moved"
    (301). <br>
    Think how many times you followed a link and got a 404, only to
    discover later that it still exists, but at a different URL? Let's
    not contribute to this problem.<br>
    <br>
    Katello cli is only one of the clients of our API. Please keep in
    mind that a generic Katello API client is a piece of software that
    may or may not interact with its users, or what information it
    persists locally.<br>
    <br>
    -d<br>
    <br>
    PS> on API design: (there was a video somewhere around too):
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://www.infoq.com/articles/API-Design-Joshua-Bloch/">http://www.infoq.com/articles/API-Design-Joshua-Bloch/</a>
  </body>
</html>