[OSM-dev] API: version number of newly created objects.
d at tucny.com
Tue Apr 28 09:41:12 BST 2009
2009/4/28 Chris Browet <cbro at semperpax.com>
> 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 (
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...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev