Update Plugin

Update Plugin

Performs partial update, if a field is specified in the request it will be updated

Will upload the code file and publish the plugin if code is sent,
and subscribe to all requested notifications and interceptions to the endpoint.
displayName and version must be sent even if they were not changed.
Existing environment variables that arent sent will be removed.
Existing subscriptions that are not sent will be unsubscribed from.
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:
    {
    "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
nameStringtrueThe name of the plugin with the prefix "Plugin-" included
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_UPDATE permission(s).

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