Historically, Kazoo would set some useful but internal and/or unchangeable data under data._read_only when fetching a single entity. Starting from the Kazoo 5.3 release, some APIs response data have been changed in which the internal and/or non-changeable fields are moved to a top level field called metadata.
The change also may include any fields that previously where under _read_only in data field of response.
This change does not applied to any API that returns a list of entities, unless otherwise is noted.
🔥
Please be informed that this only affects the APIs that returned a single entity (an account object for example), and not endpoints that operates on a list of entities, for example fetching a list of users, conferences unless otherwise noted.
All API response now should include an extra field in response payload like:
{ "data": { // ... some field from here are moved to metadata "_read_only": { // these fields are now moved to metadata, _read_only does not be exists anymore } }, "metadata": { // new in 5.3, includes internal fields previously included in data } // ... as before}
metadata also now includes generic fields (if there are any) such as:
id: ID of the document
created: the UTC Gregorian seconds the document is created
modified: the UTC Gregorian seconds the document is last updated
deleted: Indicates the document is deleted, presents on DELETE operations (soft delete or hard delete)