Product Selector

Fusion 5.9
    Fusion 5.9

    Query Stage Plugins APIFusion Query APIs

    The Query Stage Plugins API manages custom query stages developed using the Query Stage SDK.

    Custom-made query stages are developed using the Query Stage SDK, which saves them as plugins. A plugin is a ZIP file that contains one or more query stage implementations. The ZIP file contains JAR files for stage definitions and additional dependencies. It also contains a manifest file that holds the metadata Fusion uses to run the plugin. To learn more, see Example Query Stage Plugin.

    Example: Upload a custom plugin stage

    Fusion uses a cURL command with a PUT method for both installing and updating a plugin stage. Once all necessary information is entered or modified and saved as a ZIP file, use the following command to send the plugin stage to Fusion. Change the value of sample-plugin-stage-0.0.1.zip to match the name of your ZIP file.

    curl -u USERNAME:PASSWORD -X PUT -H "Content-Type:application/zip" --data-binary @sample-plugin-stage-0.0.1.zip https://FUSION_HOST:FUSION_PORT/api/query-stage-plugins

    You can use a GET request to the query-stage-plugins endpoint to obtain the names of installed query stage plugins. Here the USERNAME:PASSWORD is base64 encoded. The response returns a list of query stage plugin IDs, which are needed if you want to use the API to delete a plugin.

    curl --request GET \
      --url https://FUSION_HOST:FUSION_PORT/api/query-stage-plugins \
      --header 'Accept: application/json' \
      --header 'Authorization: Basic USERNAME:PASSWORD

    To delete a query stage plugin, you will need to know the plugin ID that you want to delete.

    curl --request DELETE \
      --url https://FUSION_HOST:FUSION_PORT/api/query-stage-plugins/PLUGIN_ID \
      --header 'Authorization: Basic USERNAME:PASSWORD