When I select the format of the āHTTP Body Payload Formatā while creating a webhook, Iām presented with API v1, v2, and v3.
I canāt find anything when I try to find docs or a reference for what these APIs are.
Am I missing something? Does Dato not have versioned docs?
Hello @corysimmons ,
You can read about API Versioning here: API versioning - DatoCMS
But as a general rule, using v3 should be the way to go.
The past versions have only been kept as to not break backwards compatibility to legacy applications, as the different versions sometimes introduce breaking changes to past API versions
There should still be versioned docs with payloads of the difference as a developer convenience.
Currently, to figure out the difference, I have to manually go in and create content, trigger the webhook, console.log(req.body)
, etc.
Time consuming vs. just looking at some docs. 
Hi @corysimmons these are the changes between api versions. V3 is the current version since more than two years. We left that select in the webhook form in order to preserve backwards compatibility with webhooks created long time ago, so if you are developing a new project please use V3.
v3
Changes in returned JSON payloads
-
Item, Single asset field. Single asset attribute is no more a string containing the upload ID, but itās now an hash with upload_id
, alt
, and title
attributes. alt
and title
contain the alternative text and title defined in the item.
-
Item, Asset gallery field. Asset gallery attribute is no more an array of strings, but itās now an array of hash with upload_id
, alt
, and title
attributes. alt
and title
contain the alternative text and title defined in the item.
-
Upload. alt
and title
attribute have been removed as top level attributes. They are available in their localized version inside default_field_metadata
key.
v2
Changes in returned JSON payloads
-
Item, Single Asset. Single asset attribute is no more an hash with path
, format
, size
, alt
, title
, width
and height
attributes, but itās a string containing the ID of the upload.
-
Item, Asset gallery. Asset gallery attribute is no more an array of hash with path
, format
, size
, alt
, title
, width
and height
attributes, but itās an array of strings representing the ID of the upload.
-
Item, SEO. image
attribute inside seo
fields is no more an hash with path
, format
, size
, alt
, title
, width
and height
attributes, but itās a string containing the ID of the upload.
-
Site. theme.logo
attribute is no more an hash with path
, format
, size
, alt
, title
, width
and height
attributes, but itās a string containing the ID of the upload.
-
Site. favicon
attribute is no more an hash with path
, format
, size
, alt
, title
, width
and height
attributes, but itās a string containing the ID of the upload.
-
Site. global_seo.{locale}.fallback_seo.image
attribute is no more an hash with path
, format
, size
, alt
, title
, width
and height
attributes, but itās a string containing the ID of the upload.
-
Field. field_type
attribute for sigle asset field does not equal to image
anymore when there is a image extension validation on the field. From now on, it always equals file
.
v1
- First public version of API
1 Like