Create or update a protocol plug-in

Purpose

Creates or updates a protocol plug-in.

URI

Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:

http://<admin-endpoint-IP:Port>/ima/v1/configuration/

Object configuration data

Provide ProtocolPlugin object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:


{    
  "Plugin": {
    "<NameOfPlugin>": {
      "File": "string",
      "PropertiesFile": "string",
      "Overwrite": true|false
      }
   }
}
Where:
NameOfPlugin
Required.
Specifies a name for the plug-in.
The name must match the value of the Name parameter in the plug-in configuration file.
The maximum length of the name is 256 characters.
File
Required if you are creating or updating the protocol plug-in; otherwise, optional.
Specifies the name of the plug-in .zip file that you uploaded by using the Eclipse Amlen REST API PUT method.
The maximum length of the plug-in .zip file name is 255 characters.
PropertiesFile
Required if you are updating the protocol plug-in properties file; otherwise, optional.
Specifies the protocol plug-in properties file name that you want to associate with the plug-in. You can develop a properties file in JSON format and the properties that it contains override any properties in the plug-in configuration file.
The maximum length of the protocol plug-in properties file name is 255 characters.
Overwrite: true|false
Specifies whether an existing plug-in is overwritten if it has the same name.
The default value is false which means that an existing plug-in is not overwritten if it has the same name.

Usage NotesĀ®

  • Capitalization and double quotation marks must be used as shown.
  • You must upload the plug-in .zip file before creating the protocol plug-in. Copy a file from the local machine to Eclipse Amlen to upload the protocol plug-in.
  • You must restart the protocol plug-in server after you create a protocol plug-in. The installation of the plug-in takes effect only when the protocol plug-in server is restarted.
  • The plug-in can be updated at any time. You must specify "Overwrite":true to update an existing plug-in. The update is not effective until the plug-in server is restarted.

Related REST Administration APIs

Example

Creates a protocol plug-in called json_msg by using cURL:
  
curl -X POST \
   -H 'Content-Type: application/json'  \
   -d  '{ 
           "Plugin": {
            "json_msg": {
             "File": "jsonmsg.zip"
            }
         }
       }
 '  \
http://127.0.0.1:9089/ima/v1/configuration/
An example response to the POST method:

{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}