<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Uh, not entirely sure how to read the current state of the draft, but just wanted to make sure that<BR>
POST /assets/new should returd assetid in response, as we can't rely on everybody 'playing nice'.<BR>
<BR>
The Draft should also define the response on all commands; I'd suggest we use an xml posted object response; something like<BR>
<BR>
GET:<BR>
The binary asset,<BR>
Content-type: xxx<BR>
<BR>
DELETE:<BR>
<DeleteResponse><BR>
<Result success="true">Ok</Result><BR>
</DeleteResponse><BR>
Content-type: application/xml<BR>
<BR>
POST:<BR>
<CreateResponse><BR>
<Result success="true">Ok</Result><BR>
<AssetId>xxx</AssetId><BR>
</CreateResponse><BR>
Content-type: application/xml<BR>
<BR>
(I'm not entirely sure about the syntax, writing this off the top of my head, but should be something that can be easily deserialized into a c# class)<BR>
/Stefan<BR><BR><BR><BR><BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
Date: Mon, 5 Nov 2007 07:49:55 +0100<BR>From: tleiades@gmail.com<BR>To: opensim-dev@lists.berlios.de<BR>Subject: Re: [Opensim-dev] Asset Server Rest Interface<BR><BR>
<DIV>
<BLOCKQUOTE class=EC_gmail_quote style="PADDING-LEFT: 1ex"><BR>I'd really like to get this back into the URL itself like it was<BR>previously. Typically params are not used in REST interfaces, with <BR>PATHINFO being the prefered mechanism.</BLOCKQUOTE>
<DIV><BR><question><BR>I thought that REST used a mixture of paths and parameters, based on "what makes sense in the current scenario", how ever you define this. <BR></DIV></question><BR>
<DIV><BR>Based on input from this thread I would suggest this interface<BR></DIV><BR></DIV><SPAN class=q>GET /assets/assetid/<value><BR>DELETE /assets/assetid/<value><BR>POST /assets/new - asset server creates new asset <BR> - grabs asset it from the serialized asset in the request body.<BR><BR>Changes from my first proposal:<BR><BR>PUT/UPDATE has been removed<BR><BR><BR>The path now begins with the plural 'asset <SPAN style="FONT-WEIGHT: bold">s</SPAN>'.<BR><BR>assetid is a "sub-folder" under "assets", used to retrieve individual assets by assetid.<BR><BR>/tleiades<BR></SPAN></BLOCKQUOTE></body>
</html>