This TYPO3 extension exposes database tables as Hydra JSON-LD resources through a configuration-driven REST API. Drop a PHP array into Configuration/TcaApi/ naming the table, and the extension handles routing, serialization, filtering, sorting, pagination, validation, and access control — no controllers, no Extbase models.
<?php
// EXT:my_ext/Configuration/TcaApi/Articles.php
return [
'general' => [
'table' => 'tx_myext_domain_model_article',
'resourceName' => 'articles',
'resourceType' => 'Article',
],
];That is a complete, read-only API at /_api/articles, including an OpenAPI spec and Swagger UI. Everything beyond it is opt-in.
Resource definitions — Expose a table by registering a PHP array
- Full CRUD (
list,show,create,update,delete); reads are on by default, writes are explicit - Serialization groups control which columns appear per operation
- Override third-party configs the way TYPO3's
TCA/Overrides/works
Querying — Exact, partial, word-start, range, full-text and MM filters
- Relation-path filters (
categories.title) reach across up to three hops - Sorting, offset pagination, and sparse fieldsets (
?fields[]=…)
Security — Per-operation roles, from PUBLIC to record-level OWNER
- Write privilege model with actor-aware writes, a table deny list, and audit logging
- Validation auto-derived from TCA, with structured
422responses
Serialization — Every TCA field type handled, relations resolved
- Relations as IRI strings or embedded records, created inline on write
- Virtual properties, image processing, speaking URLs and file uploads
Multi-language & caching — Production concerns handled
- URL base segments and an
X-Localeheader resolve theSiteLanguage - Tag-based response caching, invalidated automatically by the DataHandler
OpenAPI — Spec and Swagger UI generated from the registered resources
- Interactive Swagger UI at the API prefix, plus a backend module on TYPO3 v14
- Compatible with API Platform and its admin
Extensibility — Every layer is replaceable
- Custom operation handlers, filters, validators and column processors
- PSR-14 events around every operation and every write
- TYPO3 13.4 LTS or 14.3+
- PHP 8.2+
composer require maikschneider/tca-apiDownload the zip file from TYPO3 extension repository (TER).
The extension ships a TYPO3 site set. Add it to your site's config/sites/<site>/config.yaml, or via
Site Management → Sites in the backend:
dependencies:
- maikschneider/tca-apiThe API then responds under /_api/. Prefix, pagination defaults, CORS and OpenAPI access are
site settings,
editable under Site Management → Sites → Settings.
Please have a look at the official extension documentation.
A runnable demo covering a range of configurations lives at maikschneider/typo3-petstore.
Please have a look at CONTRIBUTING.md, and join the
discussions — feedback on the architecture,
security model and design decisions is very welcome.
Please read our security policy if you discover a security vulnerability in this extension.
This project is licensed under GNU General Public License 2.0 (or later).