Skip to main content

 

Documentation & User Guides | FotoWare

Export API

Programmatic Export using the API

The system can now instantly generate an export without any further user interaction. Simply retrieve the asset href from the API or the Selection widget, and then perform the following web request:

​EXPORT /fotoweb/archives/5000-My%20Archive/Path/to/file.jpg.info
Content-Type: application/vnd.fotoware.export-request+json
Accept: application/vnd.fotoware.export-data+json
{
"width": 1234,
"height": 1234,
"publication": "http://example.org",
"preset": "/fotoweb/me/presets/exports/539ff28796aede3348c013b2"
}​

The width (and height) parameters are optional and specify the size of the exported image. At most one one them can be specified, and the other dimension is then calculated by FotoWeb to preserve the aspect ratio of the image.  For example, if the image is 4:3, and the width in the request is set to 400, the height will be 300.
To assign an aspect ratio to  a preset, open the CMS export dialog, draw a crop frame in the size & crop tab and save it as a preset. publication is an arbitrary string that is used for managing exports. It should identify where the export was published. It is recommended to be the URL of the site where the export is published. preset is the URL of the selected preset, which is obtained from the preset lists as described below.

  • Was this article helpful?