[TYPO3-dev] A standard AJAX interface to TCA tables
Martin Kutschker
masi-no at spam-typo3.org
Wed Apr 1 19:01:17 CEST 2009
Hi!
I'm playing around with ExtJS and needed some JSON/XML stores for my
grids. After a while I thought it might be nice to have a standardized
AJAX interface for data retrieving and manipluation in the BE.
Here's what I came up in a lonely brain storming :)
typo3/ajax.php?ajaxID=<command>
&format=<format>
Format may be json (default) or xml.
GET A SINGLE RECORD
typo3/ajax.php?ajaxID=tcaget
&table=<table>
&uid=<uid>
Possible modifications could be whether to apply or not to apply
versions/translations or to fetch also deleted records.
GET A LIST OF RECORDS
typo3/ajax.php?ajaxID=tcalist
&table=<table>
&uids=<uid>[,<uid>]
OR
typo3/ajax.php?ajaxID=tcalist
&table=<table>
&pids=<pid>[,pid>]
For the latter syntax "pids" may be omitted for admins.
Possible modifications could be whether to apply or not to apply
versions/translations.
Additonally there must be some parameters to allow for paging (start,
end or length) and filtering (a full blown where clause?)
CALL TCEmain directly
typo3/ajax.php?ajaxID=tcemain
&data=<data>
&cmd=<cmd>
At least one of "data" and "cmd" must be passed.
Maybe some TCEmain init variables could be set also via parameters.
UPDATE a single record
typo3/ajax.php?ajaxID=tcaupdate
&table=<table>
&uid=<uid>
&record=<record>
INSERT a single record
typo3/ajax.php?ajaxID=tcainsert
&table=<table>
&pid=<uid>
&record=<record>
DELETE a single record
typo3/ajax.php?ajaxID=tcadelete
&table=<table>
&uid=<uid>
&record=<record>
Masi
More information about the TYPO3-dev
mailing list