API fixes and improvements
This release mostly addresses API behaviour that was either buggy, inconsistent, or not working as intended. There are also a few other fixes, listed below.
API changes:
404 not found
,405 method not supported
,301 redirect
(missing trailing slash) errors and many others now return JSON objects in the standard format instead of HTML error messages- Return status 404 instead of 200 when a file or folder is deleted a second time (since the file/folder no longer exists the second time around)
- The
image
object was being returned as 3 different structures and has now been standardised. As well as the standard fields it now always includes the calculated fields:url
,download
,supported
, andfilename
. - The
image
object was sometimes being returned with the audit trailhistory
field present if (and only if) the file was newly detected on the server. This was not documented or intended and no longer happens. - The
user
andowner
objects are no longer returned from the Portfolios functions. These were potentially leaking names and email addresses to users who should not have access to user information. The remaininguser_id
andowner_id
fields can be used to look up user information if permitted. - There is a new method to retrieve a portfolio by its
human_id
field - The
human_id
field on portfolios is no longer allowed to contain any of the characters:%<>&.?:/
- When reordering images in a portfolio, the
order_num
field now returns the correct value for the image moved (it was already correct for the others) - The user list and folder list functions no longer return deleted records by default. Both now take a new
status
parameter that can be used to request deleted records or to restore the old behaviour. The image list function is unchanged, it never returned deleted records. - API documentation improvements - clarifying URL parameters vs post/put data, added more examples and descriptions of examples
Other changes:
- As a result of the Google Maps API now requiring a Google account and an API key, the embedded map (when viewing the details of an image that has GPS tags) has been changed to use OpenStreetMap
- Enabled
ico
files by default in the Premium edition
Other bug fixes:
- Fix creation of new user accounts when using LDAP authentication
- Fix "Timed out waiting for image template data" warning from wrongly appearing in the logs
- Fix "Tile base generation already performed" warning from wrongly appearing in the logs