/produce
This endpoint is used to produce a new version of the file. It allows to crop and rotate images. The new file gets a new id. The produce_version setting from the parent is inherited.
Differs from easydb 5: easydb 5 accepts a description field (optional l10n) in the produce body; fylr ignores it — the request only reads eas_parent_id, format and transform.
POST /eas/produce
Access token in the Authorization header:
Authorization: Bearer <token>.
The _uuid of the object the file is linked into. This is used for the permission check.
The file "original" the new produced version should be created from.
The target format of the produced file. Defaults to the
extension of the file parent. If that extension cannot be
produced (for example jfif, which can be read but not
written), the default output format of the produce recipe
is used (jpg).
Image parents only: target color space. Empty (or omitted)
applies no color space conversion of its own. rgb and
sRGB are fulfilled by the color profile (the explicit
colorprofile or the built-in sRGB default); cmyk and
gray convert without embedding a profile unless an
explicit matching colorprofile is given. Values outside
the enum are rejected with RecipeParamUnsupportedValue.
Image parents only: name of the ICC color profile for the
produced file — a built-in profile (for example
eciRGB_v2) or a profile uploaded in the base
configuration. The profile is converted to and embedded in
the produced file and wins over colorspace. Empty (or
omitted) uses the default sRGB profile
(sRGB_IEC61966-2-1_black_scaled); - embeds no profile.
Unknown names are rejected with
RecipeParamUnsupportedValue.
The newly created file will be returned.
The file rendering in long format.
The produce request could not be processed — typical reasons are
EasNoParentID (no / zero eas_parent_id), ProduceOriginalOnly
(the parent is not an original), ProduceExtensionNotSupported,
ProduceFormatNotSupported and RecipeParamUnsupportedValue
(unknown colorspace / colorprofile). ReadOnlyMode is
returned if the instance is read-only. An eas_parent_id that
does not match any stored file surfaces as a generic 400 error
(ServerGeneric), not a 404.
The caller may not produce a version of the parent: it is
neither the parent's uploader nor a user with write +
asset_upload on a linked object. The code is
InsufficientRights (the caller cannot even see the parent) or
RightRequired (visible but not producible). This endpoint
returns no 401; a missing or invalid token is treated as an
anonymous request and rejected with 403.
{}Last updated