Loading ...
Sorry, an error occurred while loading the content.

Re: [rest-discuss] SUSE Studio RESTful API. Is it RESTful?

Expand Messages
  • Sam Johnston
    ... Yes. Sam
    Message 1 of 4 , Aug 17, 2009
    • 0 Attachment
      On Wed, Aug 12, 2009 at 3:31 AM, thedesignofsoftware <online@...> wrote:

      Wouldn't a more restful approach be something like

      DELETE /user/appliances/<id>/packages/<name>

      Yes.

      Sam

    • Bill de hOra
      ... Yes. This would do fine as well, albeit cruftier DELETE /api/v1/user/appliances/ /cmd/remove_package?name= point being is what s important wrt
      Message 2 of 4 , Aug 22, 2009
      • 0 Attachment
        thedesignofsoftware wrote:

        > Wouldn't a more restful approach be something like
        >
        > DELETE /user/appliances/<id>/packages/<name>

        Yes. This would do fine as well, albeit cruftier

        DELETE /api/v1/user/appliances/<id>/cmd/remove_package?name=<name>

        point being is what's important wrt REST is that DELETE is used for
        delete, not POST. If the server framework or programming idioms behind
        the interface are so limited that markers in the URL are needed to
        dispatch to the code, well it's just fugly rather than being a break
        with the architecture.

        Of course you have to wonder what happens here

        GET /api/v1/user/appliances/<id>/cmd/remove_package?name=<name>

        ;)

        Bill
      • Bill Burke
        ... Yeah, not very restful because their URI s aren t resource oriented (and RPCish), but per earlier discussions on DELETE vs. POST a POST
        Message 3 of 4 , Aug 27, 2009
        • 0 Attachment
          thedesignofsoftware wrote:
          >
          >
          > Hey there,
          >
          > I am totally new to REST, and I am looking at this API from the SUSE
          > Studio project (which is awesome and I recommend checking it out).
          >
          > http://susestudio.com/help/api/v1 <http://susestudio.com/help/api/v1>
          >
          > I fully understand the API and how it works, but I'm just wondering how
          > well(philosophically) some of the API methods fit into the REST
          > principles. For instance:
          >
          > POST /api/v1/user/appliances/<id>/cmd/remove_package?name=<name>
          >
          > Is used to *remove* a package from a virtual appliance.
          >
          > Wouldn't a more restful approach be something like
          >
          > DELETE /user/appliances/<id>/packages/<name>
          >
          > Any comments that will help my understanding of REST principles are
          > greatly appreciated. Also, if you can help me to understand why they
          > would have chosen one way over the other. The site is built on Ruby on
          > Rails (according to their twitter stream).
          >
          >



          Yeah, not very restful because their URI's aren't resource oriented (and
          RPCish), but per earlier discussions on DELETE vs. POST a

          POST /user/appliances/<id>/packages/<name>/remove_package is just as
          viable as
          DELETE /user/appliances/<id>/packages/<name>


          --
          Bill Burke
          JBoss, a division of Red Hat
          http://bill.burkecentral.com
        Your message has been successfully submitted and would be delivered to recipients shortly.