[OSM-dev] Changeset upload answering Not Found at Dev API

"Álvaro Monares G." amonares at dcc.uchile.cl
Sat Feb 26 08:22:22 GMT 2011


El 26-02-2011 5:04, "Álvaro Monares G." escribió:
> Hi everybody. I'm using the josm class osmApi.java 
> (http://tinyurl.com/49tcxrj)
> which I modified to work with a database to create an also delete 
> nodes, at this time.
> Mainly I am dealing with the function sendRequest.
> The creation of nodes and changeset (open and close) are working good.
> I have a issue when trying to delete, jsom class said that:
>
> // can't use a the individual DELETE method in the 0.6 API. Java 
> doesn't allow
> // submitting a DELETE request with content, the 0.6 API requires it, 
> however. Falling back
> // to diff upload.
>
> So I need to create an XML changeset for example this:
> <osmChange version="0.1" generator="Huilliche BOT">
> <delete version="0.1" generator="Huilliche BOT">
> <node id="913651276" version="1" changeset="8634"/>
> <node id="672790343" version="2" changeset="8634"/>
> <node id="588173111" version="1" changeset="8634"/>
> <node id="830685238" version="1" changeset="8634"/>
> <node id="597928568" version="1" changeset="8634"/>
> </delete>
> </osmChange>
>
> Then I need to send a POST request to this url:
> http://api06.dev.openstreetmap.org/api/0.6/changeset/8634/upload
> Posting the XML from above, but the responde code is: 404
> It's strange, because the URL exist, and so I not must response 404.
> I haven't test with the production API, for obviously reasons.
>
> Thanks in advance for your time.
> Best regards from Chile
>
> Álvaro Monares G.

I answer my self. I supose that the 404 was for the URL where I upload 
the XML.
But the 404 was for the nodes inside the XML. Maybe could be added to 
the wiki
in the API page, a 404 error code, yet are only 400,405,409 for:
Diff upload: POST /api/0.6/changeset/#id/upload

I don't know in which other cases can the Diff upload answer 404.

Best regards from Chile
Álvaro Monares G.



More information about the dev mailing list