[OSM-dev] API 0.6 - DELETE question

Karl Guggisberg karl.guggisberg at guggis.ch
Mon May 4 18:22:43 BST 2009


> If it would not give you a 410 Gone then it would probably give you a 409
Conflict because of the version mismatch!
409 Conflict is what I would have expected from the API spec, not 410 Gone.
Adding

HTTP status code 410 (Gone)
    If at least one element in the changeset has already been deleted

to the spec of DELETE /api/0.6/[node|way|relation]/#id would sync it with
the current implementation.

But still, why not treat it like a successful DELETE and reply the version
number of the already deleted element on the server? 

-- Karl 


-----Ursprüngliche Nachricht-----
Von: Frederik Ramm [mailto:frederik at remote.org] 
Gesendet: Montag, 4. Mai 2009 19:08
An: karl.guggisberg at guggis.ch
Cc: dev at openstreetmap.org
Betreff: Re: [OSM-dev] API 0.6 - DELETE question

Hi,

Karl Guggisberg wrote:
> just wondering why DELETE /api/0.6/[node|way|relation]/#id isn't 
> idempotent, i.e.
> why DELETE(primitive) where primitive.visible=false will lead to 410 
> Gone instead of 200 OK?

I guess if you do not already know that the object is deleted (which I infer
from your trying to delete it!) this means that you have an old version of
the object. If it would not give you a 410 Gone then it would probably give
you a 409 Conflict because of the version mismatch!

Bye
Frederik

--
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"





More information about the dev mailing list