-
Notifications
You must be signed in to change notification settings - Fork 39
Description
This is a proposal to improve the behavior of the imgData endpoint in addition to the improvements in #584 / #653
For images with missing pyramid, missing files, etc. an exception is thrown internally and returned instead of the expected JSON response, but still in valid JSON. Each client currently needs to look out for that and handle it accordingly.
The main issue is that image metadata that should otherwise be still available is not passed along.
The proposal is to change this API or create a replacement that always returns available image metadata (dimensions, channels, etc.) and also includes any exceptions or errors in a predictable location in the JSON. Right now it is also not possible to distinguish between pyramids currently being generated but not available yet and pyramids that are permanently missing.
Since this will change the behavior significantly, perhaps a new endpoint should be created and imgData deprecated?
Additionally, it would be helpful to make certain server configuration settings available to clients, either with this endpoint (if sensible and related) or via an additional new endpoint. For example, iviewer currently makes node descriptions available to the client via Django templating; if we had an API not every client would have to reimplement this.