Note: The use of internal plug-ins such as API plug-ins has been deprecated in Assets Server 6.73. Their functionality should be implemented as an API, Webhook, or via WoodWing Connect.
Info: Performing the step described in this article requires direct server access. Depending upon how your system is hosted and the level of access you have to that system, coordination may be required with your Partner or WoodWing Support team. For a full overview of the steps that need to be done by WoodWing and how to request them, see WoodWing Cloud - Change management.
Assets Server API plug-ins extend the Assets Server API with custom functionality, thereby enabling developers to create additional REST services for Assets Server.
An external API can be developed in any programming language and needs to be accessible by the Assets Server node(s). Assets Server acts as a proxy server, handling all traffic between the process calling the API and the external API.
Example: Assume we have a Web shop with products and we want to show product information in a Web client application. In this case, you could create an Assets Server web client plug-in that displays the products and it could fetch the information directly from your shop API. This might work, but has the following disadvantages:
We resolve both by running the API requests through Assets Server. Cross-origin requests are now no longer required as the client only communicates with Assets Server, not the Shop API. As for authentication: the API plug-in contains support for Assets Server Capabilities, making it possible to for example configure the plug-in in such a way that only users who are logged in to Assets Server are given access to the external API. |
Configuration
An API plug-in consists of a single configuration file named api.config.xml.
Content
Its content is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<info>
<version>
<pluginVersion>1.0</pluginVersion>
<requiresAtLeast>6.7.0.0</requiresAtLeast>
</version>
<description>Shop API</description>
</info>
<api>
<url>https://shop-api.mycompany.com/</url>
<requiredRoles>
<role>ROLE_USER</role>
</requiredRoles>
</api>
</plugin>
Parameters
The following parameters can be defined:
pluginVersion | The version of the plug-in. |
requiresAtLeast | The minimum version of Assets Server that is required. |
description | A short description of the plug-in. |
url | The URL of the API to connect to. |
role |
(Optional) The Assets Server role(s) required to run the process:
|
Installation
Step 1. Create a folder containing the api.config.xml file and place it in the following location:
Assets Server location > Config > plugins > active
Step 2. Install it by following the steps described in Installing and managing plug-ins in Assets Server.
Sample
A sample plug-in is available on GitHub.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.