[openstack-dev] [nova][glance] Consistency around proposed server instance tagging API

Davanum Srinivas davanum at gmail.com
Thu Jun 5 00:48:37 UTC 2014


+1 to 404 for a DELETE if the tag does not exist.

There's a good discussion in this paragraph from "RESTful Web APIs"
book - http://books.google.com/books?id=wWnGAAAAQBAJ&lpg=PA36&ots=Ff9jCI293b&dq=restful%20http%20delete%20404%20sam%20ruby&pg=PA36#v=onepage&q=restful%20http%20delete%20404%20sam%20ruby&f=false

-- dims

On Wed, Jun 4, 2014 at 8:21 PM, Christopher Yeoh <cbkyeoh at gmail.com> wrote:
>
> On Thu, Jun 5, 2014 at 4:14 AM, Jay Pipes <jaypipes at gmail.com> wrote:
>>
>> Hi Stackers,
>>
>> I'm looking to get consensus on a proposed API for server instance tagging
>> in Nova:
>>
>> https://review.openstack.org/#/c/91444/
>>
>> In the proposal, the REST API for the proposed server instance tagging
>> looks like so:
>>
>> Remove a tag on a server:
>>
>> DELETE /v2/{project_id}/servers/{server_id}/tags/{tag}
>>
>> It is this last API call that has drawn the attention of John Garbutt
>> (cc'd). In Glance v2 API, if you attempt to delete a tag that does not
>> exist, then a 404 Not Found is returned. In my proposal, if you attempt to
>> delete a tag that does not exist for the server, a 204 No Content is
>> returned.
>>
>
> I think attempting to delete a tag that doesn't exist should return a 404.
> The user can always ignore the error if they know there's a
> chance that the tag they want to get rid of doesn't exist. But for those
> that believe it should exist its an error is more useful to them as
> it may be an indicator that something is wrong with their logic.
>
> Chris
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Davanum Srinivas :: http://davanum.wordpress.com



More information about the OpenStack-dev mailing list