Create a new Plugin

Create a new Plugin

Will create a service user in the UMS, upload the code file if sent, publish the plugin,
create an accessible endpoint for it and subscribe all requested notifications and interceptions to that endpoint.
If code is not sent it will use a seed code instead.
If this API fails, it will roll back the changes it made.
This is a "multipart/form-data" request that includes both the binary zip file and configuration
information.
The form should include 2 parameters:

  1. "code": Non-mandatory binary zip file.
  2. "configuration": Mandatory JSON configuration of the plugin as follows:
    {
    "name": "string",
    "displayName": "string",
    "version": 1,
    "environmentVariables": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
    },
    "subscriptions": {
    "interceptionOrder": 1,
    "interceptions": [
    {
    "type": "PRE_REQUEST",
    "apiId": "string",
    "entityTypeName": "string",
    "order": 5
    }
    ],
    "notifications": [
    {
    "entityTypeName": "string",
    "actionName": "string"
    }
    ]
    }
    }

The below table describes the request parameters:

ParameterTypeMandatoryDescription
nameStringtrueUnique plugin name. A prefix "Plugin-" will be added to it
displayNameStringtrueThe display name of the plugin. It will be added to environment variables with a reserved key
versionStringtrueThe plugin version number, Must be between 1 and 32767
environmentVariablesJSONfalseA map that contains environment variables as key value pairs, keys starting with BIOT_ are reserved for system use
subscriptionsJSONfalse
subscriptions.interceptionOrderStringtrueThe order of which this plugin will be executed if more than one interceptor exist for the API. This parameter applies for all interceptors sent in the request. Must be positive
subscriptions.interceptionsJSONfalseA list of interceptors APIs that this plugin will handle
subscriptions.interceptions.typeStringtrueThe interception's type, must be sent for every interception
subscriptions.interceptions.apiIdStringfalseThe ID of the API that you want to subscribe to, This only applies to PRE_REQUEST & POST_REQUEST types
subscriptions.interceptions.entityTypeNameStringfalseThe entity name that you want to modify. Provided only if type=ADAPT_ENTITY
subscriptions.interceptions.orderStringfalseIf sent, this will override the interceptionOrder parameter for a specific interception. Must be positive
subscriptions.notificationsJSONfalseA list of notifications APIs that this plugin will handle
subscriptions.notifications.entityTypeNameStringtrueThe entity type that you would like to be notified about
subscriptions.notifications.actionNameStringtrueThe action performed on the entity that you would like to be notified about

This API requires SETTINGS_PLUGIN_CREATE permission(s).

Language
Authentication
Bearer
JWT
Click Try It! to start a request and see the response here!