How Can We Help?

This section describes the Topology API for adding new Forensic and Heal actions for your Enterprise in HEAL. At run time, the action executes when an event occurs.

API Name – actions
Format – POST /api/accounts/<account_identifier>/actions

JSON Format

{ “name”:”<Name of the action>”, “identifier”:”<Identifier of the action>”, “downloadType”:”<Output download format>”, “actionType”:”<Type of the action>”, “categories”:”<Categories to which the action is mapped>”, “commandDetails”:{ “name”:”<Command name>”, “identifier”:”<Command identifier>”, “commandName”:”<script name>”, “commandArguments” : [{ “argumentKey”:”<Identifier of the argument>”, “argumentValue”:”<Value of the argument>”, “defaultValue”:”<Default value of the argument>”, “argumentType”:”<Type of the argument>”, “argumentValueType”:”<Argument value based on the type>” }] }

Input Parameters

NameDescriptionConstraintsMandatory/Optional
nameName of the actionIt can be upto maximum 128 characters. It must be unique in the account (enterprise).Mandatory
identifierIdentifier of the actionIt should be unique,if specified. It can be upto maximum 128 characters.Optional
downloadTypeIt specifies the output download format.It can be either “PDF” or “CSV”.Default value is “PDF”Optional
actionTypeType of the action.It should be “string”. It can be either “Heal Action” or “Forensic Action”. Default value is “Forensic Action”.Optional
categoriesCategories to which the action is mapped. It can be single or multiple.It is List<string>. List should have at least one category. Categories must be already existing.Mandatory
commandDetailsThey specify additional information about the Command.
commandDetails: Parameters for script execution.
nameName of the commandIt can be upto maximum 128 characters. It must be unique in the account.Mandatory
identifierIdentifier of the commandIt can be upto maximum 128 characters.Optional
commandNameName of the script which gets executedIt can be upto maximum 128 characters.Mandatory
Command Arguments: They are optional. If specified, below attributes are mandatory.
argumentKeyIdentifier of the argumentIt can be upto maximum 64 characters.Mandatory
argumentValueValue of the argumentIt can be upto maximum 128 characters.Mandatory
defaultValueDefault value of the argumentIt can be upto maximum 128 characters.Mandatory
argumentTypeCommandLine, StandardInputMandatory
argumentValueTypeCheckBox, DropDown, Password, TextBoxMandatory

 

Sample
Input JSON to create a customized Forensic script to collect the Error Code data for XR Travels is as follows.

{ “name”: “Error Code Data”, “categories”: [ “DB_ERRORS” ], “commandDetails”: { “name”: “Command1”, “commandName”: “collectDBError.sh”, “commandArguments”: [ { “argumentKey”: “Path”, “argumentValue”: “/opt/check1”, “defaultValue”: “/opt/check1”, “argumentType”: “StandardInput”, “argumentValueType”: “TextBox” } ] } }

Success Rest Response

{ “message”: “Created Successfully.”, “responseStatus”: “SUCCESS”, “data”: 6 }

Failure Rest Response

{ “message”: “Invalid Tag”, “responseStatus”: “FAILURE”, }

Table of Contents