/api/v1/eas

Fetch the file renderings for several files at once. The file ids are passed as a JSON array in the query; the response is a map keyed by file ID. A file is shown if the user holds RIGHT_ASSET_SHOW or RIGHT_ASSET_DOWNLOAD on the original or on at least one of its versions. There is no blanket login gate: an unauthenticated request is served via the deep_link system user if deep linking is enabled. Use GET /eas/{fileId} to address a single file.

Differs from easydb 5: easydb 5 requires an authenticated user on GET /eas ("The user must be authenticated."); fylr has no login gate here — a missing token is served as the anonymous deep_link user, and a denied request is 403 (InsufficientRights), never 401.

GET /eas/{fileId} — Get information about a file. The file is shown if the caller holds RIGHT_ASSET_SHOW or RIGHT_ASSET_DOWNLOAD on the original or any version.

Get information about a file. The file is shown if the caller holds `RIGHT_ASSET_SHOW` or `RIGHT_ASSET_DOWNLOAD` on the original or any version.

get
Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
fileIdnumber · int64Required

The ID of the file.

Query parameters
obj_uuidstringOptional

The _uuid of the object the file is linked into. This is used for the permission check.

check_for_duplicatesbooleanOptional

If set, the fylr database is queried for duplicates of the file. The _duplicate property will be added to the response.

mappingone ofOptional

If mapping is given, the file's metadata is used to compile a _mapped_metadata object in the response. mapping can either be the _id of the mapping or the keyword standard. The standard mapping will use the object type (and pool i.A.) to determine the standard mapping.

number · int64Optional
or
string · enumOptionalPossible values:
objecttypestringOptional

The object type for which the mapping is compiled.

maskstringOptional

The mask the mapping is compiled for.

pool_idnumber · int64Optional

The pool_id sets the pool id to determine the mapping if standard is requested.

formatstring · enumOptional

The format of the output. standard is the default and includes the versions property. long includes metadata and versions. short doesn't include neither. If an unknown format is given short is used.

Possible values:
Responses
200

The response is the file rendering object for the addressed file id (returned directly, not wrapped in a map keyed by id — the keyed map applies only to the multi-id GET /eas?ids=[...]).

Differs from easydb 5: easydb 5 has no single-id path — even one asset is fetched via GET /eas?ids=[...] and returned as "A JSON object containing entries for each requested ID". fylr adds GET /eas/{fileId} and returns the file object directly.

application/json
objectOptional

The file rendering. Format depends on format (default standard).

POST /eas/{fileId} — Change information about a file. The caller must be allowed to produce the file (its uploader, or a user with write access to a linked object).

Change information about a file. The caller must be allowed to produce the file (its uploader, or a user with write access to a linked object).

post

Change information about a file. Access is checked via rightcheck.ProduceFile: the caller passes if it is the file's uploader, or if the file is linked to an object on which the caller holds both RIGHT_WRITE and RIGHT_ASSET_UPLOAD. The target file must be an original. The body must set at least one of filename, reference or custom_produce_config; otherwise the request is rejected with 400 (ServerGeneric). The patched file is written back to the file table inside the request transaction, so the change takes effect on commit of this request — there is no working copy and no separate commit step.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Path parameters
fileIdnumber · int64Required

The ID of the file.

Query parameters
permission_check_onlybooleanOptional

If set, the call is only checking if the current user is allowed to update the file information.

Body
filenamestringOptional

The new filename of the file. It is stored as original_filepath.

referencestringOptional

The reference string for the file. Note that the reference is unique across all files in the storage.

Responses
200

Update was successful.

application/json
or
objectOptional

The file rendering in standard format.

GET /eas — Get information about a file.

Get information about a file.

get
Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Query parameters
idsstring · jsonRequired

A json formatted array of file IDs. Example: [1,3,4].

obj_uuidstringOptional

The _uuid of the object the file is linked into. This is used for the permission check.

check_for_duplicatesbooleanOptional

If set, the fylr database is queried for duplicates of the file. The _duplicate property will be added to the response.

mappingone ofOptional

If mapping is given, the file's metadata is used to compile a _mapped_metadata object in the response. mapping can either be the _id of the mapping or the keyword standard. The standard mapping will use the object type (and pool i.A.) to determine the standard mapping.

number · int64Optional
or
string · enumOptionalPossible values:
objecttypestringOptional

The object type for which the mapping is compiled.

maskstringOptional

The mask the mapping is compiled for.

pool_idnumber · int64Optional

The pool_id sets the pool id to determine the mapping if standard is requested.

formatstring · enumOptional

The format of the output. standard is the default and includes the versions property. long includes metadata and versions. short doesn't include neither. If an unknown format is given short is used.

Possible values:
mapping_recipe_configsobject · jsonOptional

Configuration for recipes used in the metadata mapping profile. The value must be an JSON-encoded object. See collections for a details description of the format.

Responses
200

The response contains the file infos in a map.

application/json
Other propertiesobjectOptional

The file rendering. The key is the file ID.

Last updated