Webservice Registration
- Overview
- With this feature you can pull data from any JSON or SOAP enabled service, for example from Yahoo:
- To access
- Click the Webservice Registration icon on the Admin Panel
or
Access http://example.org/tiki-admin.php?page=webservices
- Note
- This feature is mainly useful for the Webservice Plugin
Option | Description | Default |
---|---|---|
Web services | Can receive web services via JSON or YAML. | Disabled |
Default cache | Cache time in seconds to use if the webservice does not supply "max-age" or "no-cache" in the response. | 300 seconds |
Option | Description | Default |
---|---|---|
Web services | Can receive web services via JSON or YAML. | Disabled |
Default cache | Cache time in seconds to use if the webservice does not supply "max-age" or "no-cache" in the response. | 300 seconds |
Option | Description | Default |
---|---|---|
Web services | Can receive web services via JSON or YAML. | Disabled |
Default cache | Cache time in seconds to use if the webservice does not supply "max-age" or "no-cache" in the response. | 300 seconds |
Option | Description | Default |
---|---|---|
Web services | Can receive web services via JSON or YAML. | Disabled |
Default cache | Cache time in seconds to use if the webservice does not supply "max-age" or "no-cache" in the response. | 300 seconds |
Option | Description | Default |
---|---|---|
Web services | Can receive web services via JSON or YAML. | Disabled |
Default cache | Cache time in seconds to use if the webservice does not supply "max-age" or "no-cache" in the response. | 300 seconds |
Example
Webservice returning JSON.
- In the "url" field enter:
Copy to clipboardhttp://luciash.eu/paypal_balance_conversion_in_json.php?amount_in=%amount_in%¤cy_in=%currency_in%¤cy_out=%currency_out%
- In the "Type" dropdown leave "REST" selected.
- In the "Parameters" textarea fill in the parameters as:
Copy to clipboard%amount_in% %currency_in% %currency_out%
- Click "Lookup" button.
Now you can test the parameters.
You should see 3 new fields appear where you can enter the values to test.
Enter:
- amount_in: 2
- currency_in: EUR
- currency_out: USD
The returned data under the "Response Information" will be something like this:
Array ( [amount_out_formatted] => 2.49 [from_currency_code] => USD [exchange_rate_formatted] => 1.24567 )
When tested you can save the Webservice under a name, e.g. paypalexchangerate (cannot contain anything else than letters) by clicking the "Register" button. Now you have registered Webservice called "paypalexchangerate" which you can use in PluginWebservice.