-
Notifications
You must be signed in to change notification settings - Fork 0
Apidocumentation
ToMaTo offers an XML-RPC API that is accessible by all users.
The interface is an RPC interface, i.e. it offers a set of procedures that can be called (with parameters) and that return a return value. The internal data format is XML but this should be transparent. The interface adheres the XML-RPC standard with the following modifications:
- It uses an extension for null-value encoding that is not part of the standard. This extension is part of many implementations since the absence of the feature is seen as a flaw in the standard.
- It uses a special parameter encoding that allows for keyword arguments. All procedures accept exactly two parameters, the first one is a list of positional arguments and the second one is a mapping of keyword arguments.
The XML-RPC interface if offered via http (or https if SSL is enabled). For each request the user must send his login credentials via basic authentication.
The calls of the API keep changing from version to version as this is the only interface that the backend offers. Thus it does not make much sense to document the API calls in this place as they are already documented in the source code. This API is documented in the source directory backend/tomato/api.
Note that the arguments in these calls are already unpacked and that the keyword argument "user" is filled in using the user object obtained by a successful login.
The API can be used by any language that supports XML-RPC over http with the modifications mentioned above. The source directory cli contains a python library implementing a client to use the API. This library can also be used as an interactive program. Examples on how to use the program and the API can be seen in the subfolder tests.