/api/v1/config
GET /config — Get all base configuration
GET /config — Get all base configurationAny authenticated user may read the config; items the session is not
permitted to read are filtered out of the response rather than causing a
403. The request itself is never rejected for lack of system.config.
Differs from easydb 5: reading the config does not require the
system.config system right (in easydb 5 the GET config call requires
system.config); fylr instead filters out the items the session may not
read.
Access token in the Authorization header:
Authorization: Bearer <token>.
The response contains the base configuration values. Items the session is not permitted to read are omitted.
No authenticated user. The request must carry a valid access token.
POST /config — Write all base configuration
POST /config — Write all base configurationAccess token in the Authorization header:
Authorization: Bearer <token>.
If set to ignore_errors, the save persists the config despite
recoverable ("savable") errors in the base config, such as an LDAP
connection that fails to dial. A non-savable error still aborts the
save. Implied when confirm=yes.
Set to yes to acknowledge a pending confirmation (HTTP 202) task and
proceed with the save. When confirm=yes, config errors are also
ignored (equivalent to save=ignore_errors).
Answer to the re-index confirmation raised when the frontend or
database languages change (system.languages). skip = no re-index;
reindex = re-index in the background; reindex_block = re-index and
temporarily lock the frontend. Omitted = no re-index requested.
The response contains the base configuration values.
The save needs confirmation before it can complete. Two cases:
(1) the config has errors that are individually savable (for example
an LDAP connection that fails to dial) — resend with
save=ignore_errors (button name=save, value=ignore_errors);
(2) the frontend or database languages changed — resend with
reindex=skip|reindex|reindex_block and confirm=yes.
The config payload could not be processed. A malformed, empty or
(for DELETE) non-empty request body, or a body whose top-level
values are not maps, is rejected as code ServerGeneric. A payload
that parses but fails base-config validation carries a BaseConfig*
code: a parse failure is BaseConfigParse; a value that does not
match the expected type, or a rejection from a base-config consumer
(license, LDAP, mail address, ...), raises its own code
(BaseConfigInvalidLicense, BaseConfigLDAPDial,
BaseConfigInvalidMailAddress, ...). The error field carries the
human-readable message; branch on code.
No authenticated user. The request must carry a valid access token.
The authenticated user lacks the system.config system right required
to write the base configuration (system.root always satisfies it).
code is SystemRightRequired.
GET /config/{path} — Read a single base-config item or nested value
GET /config/{path} — Read a single base-config item or nested valueReturns the config sub-tree addressed by the path — a config item object,
or a scalar when the path reaches a leaf value. Like GET /config, any
authenticated user may read; items the session is not permitted to read
are filtered out. The request is never rejected for lack of
system.config.
Differs from easydb 5: reading the config does not require the
system.config system right (in easydb 5 the GET config call requires
system.config).
Access token in the Authorization header:
Authorization: Bearer <token>.
Slash-separated config path, either system/config/<name>/... or
plugin/<plugin>/config/<name>/.... The leading segments select the
config item; any further segments address a nested value inside it. A
segment may itself contain a / encoded as %2F. Examples:
system/config/name, system/config/name/title/de-DE,
plugin/fylr_example/config/custom/data.
The config sub-tree (an object) or the scalar value addressed by the path.
The config item object, or the scalar value at the addressed leaf.
{"title":{"de-DE":"FYLR apitest [DE]","en-US":"FYLR apitest [EN]"}}No authenticated user. The request must carry a valid access token.
The addressed config path is unknown — no such system/plugin config
name, or the path resolves to no value. code is
BaseConfigPathNotFound.
POST /config/{path} — Set a single base-config item or nested value
POST /config/{path} — Set a single base-config item or nested valueSets the JSON value sent in the body at the addressed path, using an
sjson patch on the current stored value, then re-validates and re-saves
the whole affected config item. Because the whole item is re-saved, this
can raise the same 400 / 202 flows as POST /config. An empty body is
rejected. Requires system.config (system.root always satisfies it).
Access token in the Authorization header:
Authorization: Bearer <token>.
Slash-separated config path, either system/config/<name>/... or
plugin/<plugin>/config/<name>/.... The leading segments select the
config item; any further segments address a nested value inside it. A
segment may itself contain a / encoded as %2F. Examples:
system/config/name, system/config/name/title/de-DE,
plugin/fylr_example/config/custom/data.
The JSON value to set at the path. May be an object, array or scalar. Must not be empty.
{"a":"b"}The patched config sub-tree (the value now stored at the path).
The value stored at the addressed path after the patch.
{"a":"b"}The patch needs confirmation before it can complete — same cases as
POST /config (savable config errors → resend with
save=ignore_errors; language change → resend with
reindex=... and confirm=yes).
The config payload could not be processed. A malformed, empty or
(for DELETE) non-empty request body, or a body whose top-level
values are not maps, is rejected as code ServerGeneric. A payload
that parses but fails base-config validation carries a BaseConfig*
code: a parse failure is BaseConfigParse; a value that does not
match the expected type, or a rejection from a base-config consumer
(license, LDAP, mail address, ...), raises its own code
(BaseConfigInvalidLicense, BaseConfigLDAPDial,
BaseConfigInvalidMailAddress, ...). The error field carries the
human-readable message; branch on code.
No authenticated user. The request must carry a valid access token.
The authenticated user lacks the system.config system right required
to write the base configuration (system.root always satisfies it).
code is SystemRightRequired.
The addressed config path is unknown — no such system/plugin config
name, or the path resolves to no value. code is
BaseConfigPathNotFound.
DELETE /config/{path} — Remove a single base-config item or nested value
DELETE /config/{path} — Remove a single base-config item or nested valueRemoves the value at the addressed path (an sjson delete on the current
stored value), then re-saves the affected config item through the same
path as POST /config, so it can raise the same 400 / 202 flows.
Sending a request body is rejected (400, code ServerGeneric). A
DELETE on bare /config (no sub-path) always returns 404. Requires
system.config (system.root always satisfies it).
Access token in the Authorization header:
Authorization: Bearer <token>.
Slash-separated config path, either system/config/<name>/... or
plugin/<plugin>/config/<name>/.... The leading segments select the
config item; any further segments address a nested value inside it. A
segment may itself contain a / encoded as %2F. Examples:
system/config/name, system/config/name/title/de-DE,
plugin/fylr_example/config/custom/data.
The value at the path was removed. The body is the value at the path
after deletion — null for a removed leaf.
The value at the addressed path after deletion.
The re-save after deletion needs confirmation before it can complete
— same cases as POST /config (savable config errors → resend with
save=ignore_errors; language change → resend with reindex=... and
confirm=yes).
The config payload could not be processed. A malformed, empty or
(for DELETE) non-empty request body, or a body whose top-level
values are not maps, is rejected as code ServerGeneric. A payload
that parses but fails base-config validation carries a BaseConfig*
code: a parse failure is BaseConfigParse; a value that does not
match the expected type, or a rejection from a base-config consumer
(license, LDAP, mail address, ...), raises its own code
(BaseConfigInvalidLicense, BaseConfigLDAPDial,
BaseConfigInvalidMailAddress, ...). The error field carries the
human-readable message; branch on code.
No authenticated user. The request must carry a valid access token.
The authenticated user lacks the system.config system right required
to write the base configuration (system.root always satisfies it).
code is SystemRightRequired.
The addressed config path is unknown — no such system/plugin config
name, or the path resolves to no value. code is
BaseConfigPathNotFound.
No content
Last updated