DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: TYPO3 webservice¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2011-11-07T23:17:38 |
Classification: | typo3_webservice |
Description: | The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- |
Keywords: | forAdmins, forDevelopers, forIntermediates |
Author: | Helut Hummel |
Email: | typo3-ext@naw.info |
Info 4: | |
Language: | en |
EXT: TYPO3 webservice - typo3_webservice
EXT: TYPO3 webservice¶
Extension Key: typo3_webservice
Language: en
Keywords: forAdmins, forDevelopers, forIntermediates
Copyright 2000-2008, Helut Hummel, <typo3-ext@naw.info>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
`Introduction 3 <#1.1.Introduction|outline>`_
`Users manual 4 <#1.2.Users%20manual|outline>`_
`Administration 5 <#1.3.Administration|outline>`_
`Using the webservice 9 <#1.4.Using%20the%20webservice|outline>`_
`API Description 12 <#1.5.API%20Description|outline>`_
`Example: the iPhone App 13 <#1.6.Example:%20the%20iPhone%20App|outline>`_
`Sources, Features, Knows Problems 14 <#1.7.Sources,%20Features,%20Knows%20Problems|outline>`_
`FAQs 15 <#1.8.FAQs|outline>`_
`ChangeLog 16 <#1.9.ChangeLog|outline>`_
Introduction¶
What does it do?¶
This extension brings a webservice to TYPO3 that enables you to create, read, edit, and delete data in TYPO3 through an external application. This documentation describes the webservice and the functions it provides. It does not describe any external application.
For details on this service, please read the paper and the slides from our talk at the TYPO3 Conference t3con09 in Frankfurt: http://www.naw.info/en/skills-and-services/typo3-web-service-iphone- app.html
We will update this documentation in the near future with more details.
Screenshots¶
This extension has no GUI, so there is no screenshot to show here.
Users manual¶
This extension has no functions for normal users, because it provides a webservice. Please read on in the Administration section.
Administration¶
Installation¶
Download and install the extension as usual from the TER. The extension key is typo3_webservice. The webservice can be reached via the URL http://yourdomain.tld/typo3conf/ext/typo3_webservice/modRpc/ . To shorten that URL, you can configure a redirect on your webserver configuration. Here is an example for a Apache .htaccess file:
RewriteRule ^rpc(.*) typo3conf/ext/typo3_webservice/modRpc/index.php [L]
As always when accessing the TYPO3 backend, please use https instead of http to access the webservice.
Configuration¶
Only a user with the desired rights can access the webservice. These steps are exactly the same as for creating normal editors.
Create a backend user group, and configure the following:
Under “Access List” choose “Webservices->XMLRPC”.
Under “Tabes (listing)” choose the tables you want an user to see when he enters via the webservice (in this case “Pages”, because we want to read data from a sysfolder and “News”).
At “Tables (modify)” choose the tables that should be modified by a user who enters via webservice (in this case “News, because we want to create and edit news).
Under “Alowed excludefields” choose the fields the user can edit when he enters via the webservice (In this case some fields from news, we want to edit).
Finally create a backend user with a password and assign the created group to that user.
Assign the desired sysfolder(s) or page(s) to the user or the group. This DB Mount will be given to the user/group. (In this case we assigned the sysfolder “News” to the user as a DB Mount)
Last but not least, check/ set the permissions of the pages within this mountpoint using the Access module.
Using the webservice¶
The webservice provides functions you can access from a third party application. These functions will use the TYPO3 API to access TYPO3 and to modify the data in TYPO3. We will expand this section in the near future. For now, here are some screenshots, that show how you can interact with the webservice. We hope, these screens will give you an idea on how your application could talk with the webservice.
(The tool we used to try the webservice is called “XML-RPC-Client” and can be downloaded here http://ditchnet.org/xmlrpc/ )
There's also an online XMLRPC tool which is available here: http://www.tomhost.de/dev/tools/xmlrpc-tt/
API Description¶
system.listMethods¶
Method
system.listMethods
Parameters
none
General description
This list returns a list (array) of all registered methods
Return Value
array of strings
system.methodHelp¶
Method
system.methodHelp
Parameters
string
General description
This method returns a short description of the requested method
Return Value
string
system.methodSignature¶
Method
system.methodSignature
Parameters
string
General description
This method returns information about the type of parameters and return value of the requested method
Return Value
array of strings
login¶
Method
login
Parameters
string (user), string (pass)
General description
Pass credentials of a backend user which is considered to use the rpc service. A session id will be returned if the user is authenticated.
Return Value
string (session id)
call¶
Method
call
Parameters
string (id),
string (method),
array (params)
General description
Use this method to call rpc methods that need authentication. You have to pass the session id as first and the method name as a second parameter.
Return Value
mixed (depends on the method called)
multicall¶
Method
multicall
Parameters
string (id),
array (method name and array of parameters)
General description
Call multiple methods at once and get the response of the called methods as an array
Return Value
array of mixed values
record.list¶
Method
record.list
Parameters
int (pageid),
string (table),
array (extra fields)
General description
This method returns a list of mount pages of the user, if you do not specify a parameter. If a page id is specified it returns an array with all records ordered by tables (like in list module). With the third parameter other fields of the records (besides the label) can be returned. A forth parameter taking a limit description si planned but not yet implemented.
Return Value
array of records
record.create¶
Method
record.create
Parameters
int (pageid),
string (table)
General description
This methods returns a dummy record, respecting all tca defaults that may be set. This data can be used with the record.update method to really create a record in the database.
Return Value
array (fields and values of the record)
record.delete¶
Method
record.delete
Parameters
string (table),
int (uid)
General description
Delete record with the given uid in the specified table.
Return Value
int (uid)
record.update¶
Method
record.update
Parameters
string (table),
int/string (uid),
array (data)
General description
Update the specified record with the given data. The given data must be provided in the same form it is served by record.get. The uid must be integer or in the form “NEW324sdf23sdf” as returned from record.create
Return Value
int (uid)
record.get¶
Method
record.get
Parameters
string (table),
int (uid)
General description
This method returns the fieldnames, the field types (date, relation etc.) and the field values of the given record uid of the specified table.
Return Value
array
record.hide¶
Method
record.hide
Parameters
string (table),
int (uid)
General description
Hide the record with the given uid in the specified table.
Return Value
int (uid)
record.hide¶
Method
record.hide
Parameters
string (table),
int (uid)
General description
Unhide the record with the given uid in the specified table.
Return Value
int (uid)
Example: the iPhone App¶
We created an iPhone App as a proof of concept for our webservice. You can download the App from the AppStore .
Sources, Features, Knows Problems¶
We started a project on forge: http://forge.typo3.org/projects/show /extension-typo3_webservices
Please use the functions provided there to give us feedback, suggest new features or contribute code.
FAQs¶
Please refer to the Wiki page on forge for a list of frequently asked questions:
http://forge.typo3.org/wiki/extension-typo3_webservices/FAQ/