Re: Link relation for adding a resource

Paul Cohen <[email protected]>
Newsgroups gmane.comp.web.services.rest
Message-ID <CAA1Y72FF84UBDyJ+ic_iWPqvvbm0vh-M2tJF8HrCf359hCNdSQ@mail.gmail.com>
Hi,

Thanks for the feedback.

Mike, I've registered myself to the link-relations list. However I'd
like to continue the discussion here first.

On Fri, Aug 31, 2012 at 6:55 PM, mike amundsen <[email protected]> wrote:
> I think registering a link relation w/ the IANA that conveys the meaning of
> "use this URL to create a new resource of the type you are currently
> viewing" would be valuable. I'd would prefer the value "create" over "add"
> or "new" as I think it a broader value that covers not just adding new items
> to a collection, but also creating new stand-alone content, etc.

I have previously designed and implemented a few "read-only" HTTP
API:s (as REST-ful as possible!) and I have only had the need for
using the methods GET HEAD and OPTIONS. This has made the linking
aspect of the API rather straight forward for me. I have been able to
use established link relation types without any significant problems.

However, now I'm designing a more interactive HTTP API for a
company-internal production system and I have the need for
creating/adding new resources. I now find that for more interactive
HTTP API:s there seems to be a lack of established link relation
types.

To elaborate a bit on you suggestion Mike, and based on my current
needs, I would like to propose:

1. "create": "Use this URL to create a new resource (possibly without
providing any data)".

2. "add": "Use this URL to add an existing resource by providing data".

3. "remove": "Use this URL to remove an existing resource".

4. "start": "Use this URL to start an 'execution' resource". Eg:
transaction, update, dump, backup etc. These resources are typically
transient. In my case I have an resource representing a ongoing
download of various data sets.

5. "stop": Use this URL to stop an execution resource".

/Paul

-- 
Paul Cohen
www.seibostudios.se
mobile: +46 730 787 035
e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.