Adaptive Media Images offers and API that allows developer to obtain the Adaptive Images and search for the appropriate image variant. The possibilities it offers right now are:
- Obtain all the image variants available for a particular file entry
- Obtain all the image variants available for a particular file version
- Ordering the image variants based on the width or height, ascending or descending
- Obtain the image variants whose width and/or height are more similar to a specific value
This API is local and it's been documented in https://docs.google.com/document/d/1BhpkoYql1X1ndA1qB4c9zDjnbwyUxeVtneeFFVXuxVY/edit?usp=sharing . However, there's no way to access to this API from a external device using web services.
The aim of this story is to create a REST api that will allow third party developers to access to this service so they can search for the appropriate image variants, obtain the URL to them, as well as accessing the image attributes such as width and height.
- This API should do permission check, so the image variants can only be found and displayed if the user has permission to VIEW the original document where the image variants come from. If the user doesn't have permission this should also be handled and the response should be appropriate.
- The API should allow developers to browse the configuration of Adaptive Media images so developers can see whether Adaptive Media is enabled or not and what are the different image variants of width and height.
- Given a width or height or both, the API should allow developers to obtain the image bytes of a particular file entry or a particular version that best fits the width or height provided. It should also allow developers to obtain the metadata (width, height, additional attributes...) of the image variant.
- Given a particular file entry or file version, the API should allow developers to obtain the list of available image variants for that particular image.