For the complete documentation index, see llms.txt. This page is also available as Markdown.

/api/v1/objecttype

Read and write objecttypes — the per-record-type configuration that fylr layers on the datamodel definition (default masks, exposure flags, ACL, tags, transitions, mask / column filters, asset-filename policy, watermark and janitor policy). The objecttype itself (its name, fields and hierarchy) is part of the datamodel and is created through the schema endpoints; this endpoint only configures objecttypes that already exist in the current (committed) datamodel. A write updates the objecttype configuration directly and takes effect immediately when the request transaction commits — there is no working copy and no separate schema/commit step.

GET is open to any authenticated user; POST requires system.objecttypemanager. Authentication is by access token (a Bearer header or the access_token query parameter).

Differs from easydb 5: writes that touch collection ACLs are confirmed with the confirm / allow_invalid_acl / background_invalid_acl query parameters instead of easydb 5's single collection_rights_policy parameter.

GET /objecttype — List all objecttypes in the current datamodel.

List all objecttypes in the current datamodel.

get

Returns every objecttype in the current datamodel as an array of descriptors. Any authenticated user may read; the auxiliary fields that need system.objecttypemanager are included only when that right is held (or are dropped entirely with format=short).

Authorizations
AuthorizationstringRequired

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

Query parameters
formatstring · enumOptional

Set format=short to omit the auxiliary fields that require the system.objecttypemanager right (_acl, tags, transitions, mask / column filters, etc.). Any other value, or omitting the parameter, returns the full descriptor. Only short is special-cased — there is no separate long / standard behaviour.

Possible values:
Responses
200

Array of objecttype descriptors.

application/json

An objecttype descriptor — fylr's per-record-type configuration layered on top of the datamodel definition: per-objecttype default masks, exposure flags (frontend menus, collections, facets), ACL rules, tags, transitions, mask / column filters, asset filename policy, watermark and janitor (cleanup) policy.

Returned by /api/v1/objecttype and /api/v1/objecttype/{id}. The same shape is accepted as the request body of POST /api/v1/objecttype (only the fields the requester is allowed to mutate are honoured).

_basetypestring · enumRequired

Fixed marker identifying this object as an objecttype.

Possible values:
_standard_masksinteger · int64[] · nullableOptional

Ordered list of mask ids to prefer when rendering objects of this type. The first entry is the default mask. null (rather than an empty array) signals "no preference defined" — the datamodel's standard mask is then used.

_private_transitionsbooleanOptional

If true, transitions configured directly on this objecttype do not inherit transitions from the parent pool / global.

_private_tagsbooleanOptional

If true, the tag set configured on this objecttype shadows the inherited tags (does not merge with them).

POST /objecttype — Create or update the settings of one or more objecttypes.

Create or update the settings of one or more objecttypes.

post

Updates the configuration of an array of objecttypes directly. The objecttypes must already exist in the committed datamodel; this endpoint writes their settings, not their structure. The change takes effect immediately when the request transaction commits — there is no schema/commit step. The user needs system.objecttypemanager (or system.root). When the instance is in read-only mode the request is rejected before processing (see the 400 response).

The objecttype itself (its name, fields, hierarchy) is defined by the datamodel, not created here — every element must carry an existing objecttype._id, and objecttype._version must be current + 1 (optimistic locking; a mismatch is a 400 VersionMismatch). Only the configuration fields are mutated; fields the requester is not allowed to change are ignored. Fields omitted from the body keep their stored value (the server reloads the current objecttype and merges). Notable parse rules:

  • mapping_* fields take a mapping id or the string "none" to clear; mapping_image_import_recipe_configs may only be set when mapping_image_import names a real mapping.
  • _standard_masks: null clears the preference; a non-empty array of mask ids sets it; an empty array [] is rejected (ObjecttypeNeedsStandardMask).
  • watermark.gravity, if present, must be one of nw n ne w c e sw s se or empty.
  • caption keys must each name an existing files field that is not inside a reverse-nested and whose objecttype's pool management matches the endpoint (objecttype, not pool).
  • janitor_policy bounds must be null or >= 0. janitor_policy is only meaningful for non-pool objecttypes; for a pool objecttype it is neither stored nor returned. The key is merged from the stored value only when omitted — sending null explicitly clears it.
  • standard_numbering is accepted for compatibility but ignored (never stored, always returned empty).

The save can pause and return a 202 to ask for confirmation (see the 202 response). The query parameters below are how the client answers those confirmations: it re-sends the same request body with the matching parameter appended.

Differs from easydb 5: the 202 confirmation contract uses confirm / allow_invalid_acl / background_invalid_acl rather than easydb 5's collection_rights_policy.

Authorizations
AuthorizationstringRequired

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

Query parameters
confirmstring · enumOptional

Answer to the renditions-resync 202 that is raised when a watermark or caption change requires recomputing the renditions of already-stored files. resync recomputes them now; skip saves without recomputing. Any other value is rejected with a generic 400 (confirm "<value>" not supported).

Possible values:
allow_invalid_aclbooleanOptional

Answer to the invalid-collection-ACL 202. When true, a save whose ACL change would invalidate a collection the owner can no longer fully grant is allowed to proceed; the affected collections are flagged invalid_acl and sharing for them is disabled. If the user lacks bag-acl on such a collection the request instead fails with UrlParameterNotSupported for allow_invalid_acl.

background_invalid_aclbooleanOptional

Answer to the ACL-revalidation timeout 202. When true, the collection-ACL revalidation runs as an asynchronous background task and the request returns immediately instead of completing the check synchronously.

background_invalid_acl_timelimitstringOptional

Overrides the synchronous time budget before the timeout 202 is offered. A Go duration string (e.g. 5s); an invalid value surfaces as a generic 400.

Bodyobject · ObjecttypeApi[]

An objecttype descriptor — fylr's per-record-type configuration layered on top of the datamodel definition: per-objecttype default masks, exposure flags (frontend menus, collections, facets), ACL rules, tags, transitions, mask / column filters, asset filename policy, watermark and janitor (cleanup) policy.

Returned by /api/v1/objecttype and /api/v1/objecttype/{id}. The same shape is accepted as the request body of POST /api/v1/objecttype (only the fields the requester is allowed to mutate are honoured).

_basetypestring · enumRequired

Fixed marker identifying this object as an objecttype.

Possible values:
_standard_masksinteger · int64[] · nullableOptional

Ordered list of mask ids to prefer when rendering objects of this type. The first entry is the default mask. null (rather than an empty array) signals "no preference defined" — the datamodel's standard mask is then used.

_private_transitionsbooleanOptional

If true, transitions configured directly on this objecttype do not inherit transitions from the parent pool / global.

_private_tagsbooleanOptional

If true, the tag set configured on this objecttype shadows the inherited tags (does not merge with them).

Responses
200

The objecttypes were saved. The body echoes the saved descriptors (with _acl, tags, transitions and mask filters included). The X-Fylr-Cache-ID response header carries the new datamodel cache id so clients can invalidate caches.

application/json

GET /objecttype/{id} — Retrieve a single objecttype.

Retrieve a single objecttype.

get

Loads one objecttype by numeric id and returns it wrapped in a one-element array (the descriptor is the only array entry — the response is not a bare object).

Authorizations
AuthorizationstringRequired

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

Path parameters
idinteger · int64Required

The numeric id of the objecttype. The path segment must be a positive integer (route pattern [1-9][0-9]*); name-based lookup is not supported on this endpoint.

Query parameters
formatstring · enumOptional

Set format=short to omit the auxiliary fields that require the system.objecttypemanager right (_acl, tags, transitions, mask / column filters, etc.). Any other value, or omitting the parameter, returns the full descriptor. Only short is special-cased — there is no separate long / standard behaviour.

Possible values:
Responses
200

A one-element array containing the objecttype descriptor.

application/json

An objecttype descriptor — fylr's per-record-type configuration layered on top of the datamodel definition: per-objecttype default masks, exposure flags (frontend menus, collections, facets), ACL rules, tags, transitions, mask / column filters, asset filename policy, watermark and janitor (cleanup) policy.

Returned by /api/v1/objecttype and /api/v1/objecttype/{id}. The same shape is accepted as the request body of POST /api/v1/objecttype (only the fields the requester is allowed to mutate are honoured).

_basetypestring · enumRequired

Fixed marker identifying this object as an objecttype.

Possible values:
_standard_masksinteger · int64[] · nullableOptional

Ordered list of mask ids to prefer when rendering objects of this type. The first entry is the default mask. null (rather than an empty array) signals "no preference defined" — the datamodel's standard mask is then used.

_private_transitionsbooleanOptional

If true, transitions configured directly on this objecttype do not inherit transitions from the parent pool / global.

_private_tagsbooleanOptional

If true, the tag set configured on this objecttype shadows the inherited tags (does not merge with them).

GET /objecttype/{id}/stats — Asset statistics for an objecttype.

Asset statistics for an objecttype.

get

Aggregates, in SQL, the originals and their renditions across all latest / history / deleted objects of the type, bucketing by file class and extension. Requires the system.objecttypemanager right (or system.root).

Authorizations
AuthorizationstringRequired

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

Path parameters
idinteger · int64Required

The numeric id of the objecttype (positive integer; route pattern [1-9][0-9]*). Name-based lookup is not supported.

Responses
200

Asset statistics for the objecttype — file counts and storage usage rolled up across every object of the type.

application/json

Asset statistics for one objecttype — the rolled-up file counts and storage usage across every object of the type.

Last updated