...
Note that except where noted, all methods require the requesting application to have a valid API key issued by the Wookie server administrator.
Widget Instances
See also https://issues.apache.org/jira/browse/WOOKIE-34
An instance is identified using a combination of the following parameters:
...
Action | Request | Example Response | Description | |
---|---|---|---|---|
| GET {wookie}/widgetinstances |
| Not supported. | |
Get or Create instance | POST {wookie}/widgetinstances {params:instance_params} | <widgetdata> | Either creates a new instance for the given parameters, or retrieves an already-created instance. If a new instance is successfully created, the response has a HTTP status code of 201; if an instance if successfully retrieved, a status code of 200 is returned. | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c0d8f72e-9b02-40d4-8d37-7aa78221fac1"><ac:plain-text-body><![CDATA[ |
| PUT {wookie}/widgetinstances {params:instance_params, action, [cloneshareddatakey]} |
| Either stop, resume, or clone an instance, depending on the content of the action parameter. If the action is "clone", a shared data key for the clone must be provided using the "cloneshareddatakey" parameter.]]></ac:plain-text-body></ac:structured-macro> |
Widgets
Action | Request | Example | Description |
---|---|---|---|
| GET {wookie}/widgets{?all=true, locale=language_tag} |
| Returns an XML representation of the set of available widgets. Note that this does not require an API key. If the "all=true" parameter is omitted, the list only contains the default widgets for defined service types. If a locale is specified, the returned information is localized, for example widget titles, descriptions, license information will be in the specified language where available. |
| GET {wookie}/widgets/{service_name} {?locale=language_tag} |
| Returns an XML representation of the set of widgets that belong to the given service_name. For example, all widgets categorized as "weather". (See issue WOOKIE-10). If a locale is specified, the returned information is localized, for example widget titles, descriptions, license information will be in the specified language where available. |
| GET {wookie}/widgets/{id} {?locale=language_tag} |
| Returns an XML representation of the widget with the specified id. Note that in the current release this is the actual database key; future releases should implement this using the widget URI as the id. If a locale is specified, the returned information is localized, for example widget titles, descriptions, license information will be in the specified language where available. |
...
Action | Request | Example | Description | |
---|---|---|---|---|
| GET {wookie}/properties |
| Not supported. | |
| GET {wookie}/properties {params: instance_params, propertyname} |
| Returns the value of the specified property for the specified instance. | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9f52eb3d-69a3-48fd-98b1-4de327cfaa8f"><ac:plain-text-body><![CDATA[ |
| POST {wookie}/properties {params: instance_params, propertyname, propertyvalue, [is_public=true]} |
| Sets a property for the specified instance. If is_public=true is set, the property set is a Shared Data entry; otherwise it is a Preference.]]></ac:plain-text-body></ac:structured-macro> |
| PUT {wookie}/properties {params: instance_params, propertyname, propertyvalue} |
| Updates the value of the specified property of the specified Widget Instance. | |
| DELETE {wookie}/properties {params: instance_params, propertyname} |
| Deletes a property. This method returns a 404 status code if there is no matching property. |