[OSM-dev] API: version number of newly created objects.

D Tucny d at tucny.com
Tue Apr 28 09:41:12 BST 2009


2009/4/28 Chris Browet <cbro at semperpax.com>

> Hi,
>
> I see in the api doc:
> "Version numbers will most of the time begin at *1* and increase by *1*every time an element is changed but this behaviour is not guaranteed and
> should not be relied upon"
> I understand that phrase as "I cannot assume that a newly created object
> will be at version 1".
>
> As a creation PUT do not return the version number (AFAIK), does that mean
> that we are suppose to do a "GET" on the newly created object to get the
> version number?
>

If you do a diff upload (
http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6#Diff_upload:_POST_.2Fapi.2F0.6.2Fchangeset.2F.23id.2Fupload)
you will get the version number back in the response and if you update an
existing individual object you will get the version number in the response,
but, as you say, as documented, creating an individual object won't return
the version... I don't know for sure, but, I'd hope that the version number
starting at 1 bit is guaranteed even if the increase by 1 isn't...

d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090428/31b06e66/attachment.html>


More information about the dev mailing list