Personal tools
You are here: Home Free Software Minutus Programmer's Guide HTTP Interface

HTTP Interface

by jhmark last modified 2006-12-12 01:01

This chapter describes the HTTP interface to a Minutus web application.

Common Parameter Names

Minutus web pages accept some common parameter names:
type
Object type of the object being referenced (a short string).
objtype
Same as type.  (In future both "type" and "objtype" will probably change to "t".)
id
Object ID of the object being referenced (a decimal number).

Application Pages

This section lists the web pages defined by a Minutus application.  For example, if your application is at URL "http://xenops.com/app" then a valid URL would be:
http://xenops.com/app/addrelatedfile?type=person&id=2134
to prompt the user for a file to attach to the person whose id is 2145.


addrelatedfile

Parameters: type, id

Prompts for a file to be uploaded; directs to relatefile on completion.

choose

Parameters: pred, objtype, id, valtype
valtype = The objtype of the value to be chosen.  If missing, the first element is chosen from operanddef.objectdefs.

Displays a form allowing the user to modify the choices for a given object and predicate.  Choices of type valtype are shown (a link allows the user to switch valtype's to some other type listed in operanddef.objectdefs).  Directs to "relate" on completion.

delete

Parameters: id, type

Prompts the user to confirm deletion of the object identified by "type" and "id".  If the user confirms, directs to update with parameters (id, type, delete = 1).

history

Parameters: id, type

Displays a representation of the change history of the object identified by "type" and "id".

relate

Parameters: cancelbutton, gotoobj, gotoid, preds, old_range_*, new_range_*

Adds, modifies, or removes relationships between objects.
"preds" can have multiple values, each of which is of the form PRED#TAG.
Each PRED must be one of the predicate names in appdef.predicateDefs, optionally preceded by "inv_" which indicates that the sense of the predicate is inverted (domain and range are swapped).
Each TAG is an integer.




Pages for Object Types

Each objtype defined will have two page names, one singular and one plural.  The singular page allows a single object to be viewed or edited, while the plural version shows the list of all such objects.

Application-Defined Pages

The application can add arbitrary page names by adding valuedefs to tablePageValuedefs in the app description.


Built-in Object Types

Minutus defines the following built-in object types:

doc

A document.  Application pages doc and docs are defined to manipulate a single document or the collection of them.


Powered by Plone, the Open Source Content Management System