One of Tiki's new features is the ability to register webservices to be used by plugins. This is a
handler which, combined with
Plugin Alias Handler, allows to create brand new plugins exploiting data from external systems. Please see:
WebServicePlugin
Bugzilla Webservice example
This plugin would ask for the real data export URL for the webservice. This is not mandatory.
YAML
preferences:
enable: [ wikiplugin_$profileobject:bugzilla_ws$ ]
objects:
-
type: webservice
ref: bugzilla_ws
data:
name: $profilerequest:Webservice Name$bugzilla$
url: $profilerequest:Bugzilla Webservice URL$http://example.com/bugzilla/json_export.pl?id=%bugid%$
schema_version: 1.0
schema_documentation: http://example.com/bugzilla_exporter/doc/1.0
-
type: webservice_template
ref: base
data:
webservice: $bugzilla_ws
name: base
engine: smarty
output: tikiwiki
content: |
Title: $profileobject:response.title$
Status: $profileobject:response.status$
Assigned to: $profileobject:response.assignee.full_name$
-
type: plugin_alias
ref: plugin
data:
name: $bugzilla_ws
implementation: webservice
description:
name: Bugzilla
description: Displays bugs from remote hosts
prefs: [ wikiplugin_$profileobject:bugzilla_ws$ ]
params:
template:
name: Template
required: n
description: Name of the template to use. Default to base.
id:
name: Bug ID
required: y
description: Bug number from Bugzilla
body:
input: ignore
default: ""
params:
service: $bugzilla_ws
template: base
id: 0
Webservice Object
Name | Mandatory | Value
|
name | yes | Alpha-only name of the webservice
|
url | yes | URL of the web service with arguments entered as %arg_name%
|
schema_version | | Schema version number disclosed by the web service
|
schema_documentation | | URL of the documentation for the web service
|
Webservice Template Object
Name | Mandatory | Value
|
webservice | yes | Webservice to add the template to
|
name | yes | Alpha-only name of the webservice
|
engine | yes | Rendering engine used (smarty or javascript at this time)
|
output | yes | Output produced by the engine (tikiwiki or html)
|
content | yes | Template content
|