/api/v1/xmlmapping
GET /xmlmapping/list — List all profiles with the mappings built from each.
GET /xmlmapping/list — List all profiles with the mappings built from each.Returns every registered profile together with the concrete
mappings derived from it (the mappings sub-array). Profiles
with no mappings are still included.
Access token in the Authorization header:
Authorization: Bearer <token>.
Array of profile-with-mappings descriptors.
A profile for XML / Exiftool / Dublin Core import or export — the
template from which concrete XmlMappingApi mappings are derived.
Profiles are loaded from xmlmapping/<profile>.yml files in the
base config (and from plugins that contribute their own).
Returned by GET /api/v1/xmlmapping/profile/{profile} and embedded
in each entry of GET /api/v1/xmlmapping/list (with its concrete
mappings appended under mappings).
Stable profile name as stored — this is the file's profile:
value and includes the source file extension, e.g. dc.yml.
This exact string is the {profile} path parameter of
GET /xmlmapping/profile/{profile} and the XmlMappingApi.profile
value of mappings built from it.
Base XML namespace URL that the resulting XML documents anchor themselves to. Mostly relevant for XML export.
No authenticated user. The request must carry a valid access token.
GET /xmlmapping/tags — List the metadata tags the exif-list recipe knows about.
GET /xmlmapping/tags — List the metadata tags the exif-list recipe knows about.Runs the recipe named by produceConfig.metadata.exif_list (default
_metadata:_exif_list) and copies its output straight to the response
body. The default recipe invokes fylr metadata list -, which runs
exiftool -listx and converts the XML tag list to JSON — a structured
list of every metadata tag exiftool understands, used by the mapping
editor to autocomplete tag names.
The response is the recipe's output streamed through unmodified,
so a custom recipe determines its own shape. With the default
recipe the response follows the XmlMappingTagCatalog schema:
each entry in tags carries path, group, writable, type
and two capability flags the mapping editor uses to offer only
the value-shapes the tag actually supports — l10n (the tag is
a localized lang-alt) and list (the tag is a repeatable
list, with list_type Bag or Seq). The two combine into
four container kinds: scalar (neither), list (list), lang-alt
(l10n), and list-of-lang-alt (both — e.g. XMP-plus:Custom1).
Requires system.profile.
Access token in the Authorization header:
Authorization: Bearer <token>.
The recipe's JSON output, streamed through unmodified
(Content-Type: application/json; charset=utf-8). With the
default exif_list recipe this is the exiftool tag catalog.
The metadata tag catalog returned by GET /xmlmapping/tags
with the default exif_list recipe — the JSON conversion of
exiftool -f -listx, produced by fylr metadata list.
The version of the exiftool binary that produced the catalog.
13.50No authenticated user. The request must carry a valid access token.
The authenticated user has neither the system.profile nor the
system.root right. One of them is required for GET /tags,
GET /mapping/{mapping}, PUT /mapping, POST /mapping/{mapping}
and DELETE /mapping/{mapping}. (GET /list and
GET /profile/{profile} require only an authenticated user — no
right.) Response code is SystemRightRequired.
GET /xmlmapping/profile/{profile} — Retrieve a single XML profile.
GET /xmlmapping/profile/{profile} — Retrieve a single XML profile.Access token in the Authorization header:
Authorization: Bearer <token>.
Stable profile name exactly as returned by GET /xmlmapping/list
— it includes the source file extension, e.g. dc.yml. The full
list is reachable via GET /xmlmapping/list.
The profile descriptor.
A profile for XML / Exiftool / Dublin Core import or export — the
template from which concrete XmlMappingApi mappings are derived.
Profiles are loaded from xmlmapping/<profile>.yml files in the
base config (and from plugins that contribute their own).
Returned by GET /api/v1/xmlmapping/profile/{profile} and embedded
in each entry of GET /api/v1/xmlmapping/list (with its concrete
mappings appended under mappings).
Stable profile name as stored — this is the file's profile:
value and includes the source file extension, e.g. dc.yml.
This exact string is the {profile} path parameter of
GET /xmlmapping/profile/{profile} and the XmlMappingApi.profile
value of mappings built from it.
Base XML namespace URL that the resulting XML documents anchor themselves to. Mostly relevant for XML export.
The {mapping} id (or {profile} name) in the URL does not match
any stored entry. The handler returns a plain error, so the
response code is ServerGeneric with status 400 — there is no
404/NotFoundError for this endpoint.
No authenticated user. The request must carry a valid access token.
PUT /xmlmapping/mapping — Create a new mapping.
PUT /xmlmapping/mapping — Create a new mapping.The body's id is ignored on create — a fresh id is drawn from the
mapping.id sequence and the row is inserted into the mapping table
(plus mapping_field / mapping_field_easydb). The same handler serves
POST /xmlmapping/mapping/{mapping} for updates.
Differs from easydb 5: easydb 5 stores each mapping as a JSON file in the
schema folder (schema/<db>/<current>/xmlmapping-mappings/<mapping_id>.json).
fylr stores mappings directly in the mapping / mapping_field /
mapping_field_easydb database tables — there is no per-mapping file and
no schema-folder path.
Access token in the Authorization header:
Authorization: Bearer <token>.
A concrete XML mapping — pairs a profile with a target objecttype, the field bindings and any recipe configuration the mapping needs at runtime.
Used as the request body of PUT /api/v1/xmlmapping/mapping and
POST /api/v1/xmlmapping/mapping/{mapping}, and as the response
body of GET /api/v1/xmlmapping/mapping/{mapping}.
Server-issued numeric id. Empty / 0 on create; required on update.
Objecttype id this mapping targets. Required for every mapping except global / cross-objecttype ones.
Profile name (xmlmapping.Profile.profile) the mapping is
built from. Must match an existing profile registered with the
instance.
Override of the profile's xml_base namespace anchor for this
mapping. Optional.
Optional whitelist of file extensions (e.g. tif, jpg)
this mapping should be offered for. Empty means no restriction.
Read-only marker set when the mapping was created by a user (vs. loaded from a config file). Custom mappings are editable and deletable through the API; config-loaded ones aren't.
The created mapping.
A concrete XML mapping — pairs a profile with a target objecttype, the field bindings and any recipe configuration the mapping needs at runtime.
Used as the request body of PUT /api/v1/xmlmapping/mapping and
POST /api/v1/xmlmapping/mapping/{mapping}, and as the response
body of GET /api/v1/xmlmapping/mapping/{mapping}.
Server-issued numeric id. Empty / 0 on create; required on update.
Objecttype id this mapping targets. Required for every mapping except global / cross-objecttype ones.
Profile name (xmlmapping.Profile.profile) the mapping is
built from. Must match an existing profile registered with the
instance.
Override of the profile's xml_base namespace anchor for this
mapping. Optional.
Optional whitelist of file extensions (e.g. tif, jpg)
this mapping should be offered for. Empty means no restriction.
Read-only marker set when the mapping was created by a user (vs. loaded from a config file). Custom mappings are editable and deletable through the API; config-loaded ones aren't.
The body failed validation — for example an unknown easydb field
type, a text_fixed/deep_link_url source placed among the
text/custom sources, a field name that is not a valid target column,
an idTable (objecttype id) that does not exist, or a recipe config
that names a recipe the mapping does not use. A duplicate field
name within the mapping hits the mapping_field unique index and
surfaces as DatabaseUniqueKeyViolation. (An unknown profile
name is accepted silently — it is not validated on save.) Returned
with code ReadOnlyMode when the instance is in read-only mode —
this read-only check runs first, before the right check and before
the body is decoded.
No authenticated user. The request must carry a valid access token.
The authenticated user has neither the system.profile nor the
system.root right. One of them is required for GET /tags,
GET /mapping/{mapping}, PUT /mapping, POST /mapping/{mapping}
and DELETE /mapping/{mapping}. (GET /list and
GET /profile/{profile} require only an authenticated user — no
right.) Response code is SystemRightRequired.
GET /xmlmapping/mapping/{mapping} — Retrieve an XML mapping.
GET /xmlmapping/mapping/{mapping} — Retrieve an XML mapping.Access token in the Authorization header:
Authorization: Bearer <token>.
The mapping's numeric id (parsed with pflib.GetInt); a non-numeric
or 0 value resolves to id 0, which matches no mapping.
The mapping descriptor.
A concrete XML mapping — pairs a profile with a target objecttype, the field bindings and any recipe configuration the mapping needs at runtime.
Used as the request body of PUT /api/v1/xmlmapping/mapping and
POST /api/v1/xmlmapping/mapping/{mapping}, and as the response
body of GET /api/v1/xmlmapping/mapping/{mapping}.
Server-issued numeric id. Empty / 0 on create; required on update.
Objecttype id this mapping targets. Required for every mapping except global / cross-objecttype ones.
Profile name (xmlmapping.Profile.profile) the mapping is
built from. Must match an existing profile registered with the
instance.
Override of the profile's xml_base namespace anchor for this
mapping. Optional.
Optional whitelist of file extensions (e.g. tif, jpg)
this mapping should be offered for. Empty means no restriction.
Read-only marker set when the mapping was created by a user (vs. loaded from a config file). Custom mappings are editable and deletable through the API; config-loaded ones aren't.
The {mapping} id (or {profile} name) in the URL does not match
any stored entry. The handler returns a plain error, so the
response code is ServerGeneric with status 400 — there is no
404/NotFoundError for this endpoint.
No authenticated user. The request must carry a valid access token.
The authenticated user has neither the system.profile nor the
system.root right. One of them is required for GET /tags,
GET /mapping/{mapping}, PUT /mapping, POST /mapping/{mapping}
and DELETE /mapping/{mapping}. (GET /list and
GET /profile/{profile} require only an authenticated user — no
right.) Response code is SystemRightRequired.
POST /xmlmapping/mapping/{mapping} — Update an existing XML mapping.
POST /xmlmapping/mapping/{mapping} — Update an existing XML mapping.Access token in the Authorization header:
Authorization: Bearer <token>.
The mapping's numeric id, written into the body's id before saving.
Must be > 0, otherwise the request fails with ServerGeneric 400.
An id that matches no row makes the UPDATE a no-op (no 404).
A concrete XML mapping — pairs a profile with a target objecttype, the field bindings and any recipe configuration the mapping needs at runtime.
Used as the request body of PUT /api/v1/xmlmapping/mapping and
POST /api/v1/xmlmapping/mapping/{mapping}, and as the response
body of GET /api/v1/xmlmapping/mapping/{mapping}.
Server-issued numeric id. Empty / 0 on create; required on update.
Objecttype id this mapping targets. Required for every mapping except global / cross-objecttype ones.
Profile name (xmlmapping.Profile.profile) the mapping is
built from. Must match an existing profile registered with the
instance.
Override of the profile's xml_base namespace anchor for this
mapping. Optional.
Optional whitelist of file extensions (e.g. tif, jpg)
this mapping should be offered for. Empty means no restriction.
Read-only marker set when the mapping was created by a user (vs. loaded from a config file). Custom mappings are editable and deletable through the API; config-loaded ones aren't.
The updated mapping.
A concrete XML mapping — pairs a profile with a target objecttype, the field bindings and any recipe configuration the mapping needs at runtime.
Used as the request body of PUT /api/v1/xmlmapping/mapping and
POST /api/v1/xmlmapping/mapping/{mapping}, and as the response
body of GET /api/v1/xmlmapping/mapping/{mapping}.
Server-issued numeric id. Empty / 0 on create; required on update.
Objecttype id this mapping targets. Required for every mapping except global / cross-objecttype ones.
Profile name (xmlmapping.Profile.profile) the mapping is
built from. Must match an existing profile registered with the
instance.
Override of the profile's xml_base namespace anchor for this
mapping. Optional.
Optional whitelist of file extensions (e.g. tif, jpg)
this mapping should be offered for. Empty means no restriction.
Read-only marker set when the mapping was created by a user (vs. loaded from a config file). Custom mappings are editable and deletable through the API; config-loaded ones aren't.
The body failed validation — for example an unknown easydb field
type, a text_fixed/deep_link_url source placed among the
text/custom sources, a field name that is not a valid target column,
or a recipe config that names a recipe the mapping does not use. A
duplicate field name within the mapping hits the
mapping_field unique index and surfaces as
DatabaseUniqueKeyViolation. Returned with code ReadOnlyMode
when the instance is in read-only mode — this read-only check runs
first, before the right check and before the body is decoded.
No authenticated user. The request must carry a valid access token.
The authenticated user has neither the system.profile nor the
system.root right. One of them is required for GET /tags,
GET /mapping/{mapping}, PUT /mapping, POST /mapping/{mapping}
and DELETE /mapping/{mapping}. (GET /list and
GET /profile/{profile} require only an authenticated user — no
right.) Response code is SystemRightRequired.
DELETE /xmlmapping/mapping/{mapping} — Delete an XML mapping.
DELETE /xmlmapping/mapping/{mapping} — Delete an XML mapping.Access token in the Authorization header:
Authorization: Bearer <token>.
The mapping's numeric id.
Resolves the 202 confirmation that is returned when the mapping
is still linked from one or more collections' upload settings.
The only accepted value is delete, which unlinks the mapping
from every affected collection (sets
collection_create_object.mapping_id to NULL) and then deletes
the mapping — it is a save-side-effect switch, not a no-op
confirmation. Omit it on the first call to receive the 202
listing the affected collections.
The mapping was deleted (no collections linked it, or the unlink
was confirmed with delete_policy=delete).
Always true when the mapping was deleted.
The mapping is still linked from one or more collections' upload
settings. Re-send the same request with ?delete_policy=delete to
unlink it from those collections and delete it.
Returned with code ReadOnlyMode when the instance is in
read-only mode — this is checked before the right check and before
the mapping is loaded. With code UnknownDeletePolicy when
delete_policy is present but not delete. With code
ServerGeneric when the {mapping} id matches no stored mapping
(the loader returns a plain error — there is no 404).
No authenticated user. The request must carry a valid access token.
The authenticated user has neither the system.profile nor the
system.root right. One of them is required for GET /tags,
GET /mapping/{mapping}, PUT /mapping, POST /mapping/{mapping}
and DELETE /mapping/{mapping}. (GET /list and
GET /profile/{profile} require only an authenticated user — no
right.) Response code is SystemRightRequired.
Last updated