Skip to content

Introduction

The input page stores configuration information for data collection. Multiple inputs can be created on the Inputs page.

Developers are required to add services in the global config file to create a new Input. If multiple services are provided, a dropdown field will appear on the Inputs page. In contrast, a button will be displayed for a single service.

Properties

Property Type Description
title* string -
description string It provides a brief summary of an inputs page.
subDescription object It provides broader description of an inputs page.
menu object This property allows you to enable the custom menu feature.
table object It displays input stanzas in a tabular format.
groupsMenu array This property allows you to enable the multi-level menu feature.
services* array It specifies a list of modular inputs.
readonlyFieldId string A field of the boolean entity that UCC checks for each input. If the field’s value is truthful, the corresponding input cannot be edited from the UI. There is no way to change this from the UI; it is supposed to be changed via REST.
hideFieldId string A field of the boolean entity that UCC checks for each input. If the field’s value is truthful, the corresponding input is hidden from the UI. There is no way to change this from the UI; it is supposed to be changed via REST. Check out an example below.

Services Properties

Property Type Description
name* string It defines the particular service name.
title* string It shows the title of the service.
subTitle string It shows the subtitle (or additional information) of the service.
entity* array It is a list of fields and their properties.
groups array It is used to divide forms into distinct sections, each comprising relevant fields.
style string By specifying this property in the global configuration file, the forms can either be opened as a new page or in a dialog.
Supported values are “page” or “dialog”.
The default value is dialog.
options object This property allows you to enable the saveValidator feature.
hook object It is used to add custom behaviour to forms. Visit the Custom Hook page to learn more.
warning object It is used to add the custom warning message for each of the modes of ‘create’, ‘edit’, ‘config’, and ‘clone’. The message is displayed on the form.
inputHelperModule string A module that contains validate_input and stream_events methods. By default it is not used.
conf string Configuration name for a rest handler.
restHandlerName string It specify name of the REST handler script, that provides fields, models and validators for the fields supported under the specified input and any specific actions to be performed on CRUD operations for the given input. (Do NOT use with restHandlerModule or restHandlerClass)
restHandlerModule string It specify name of the REST handler script that implements the custom actions to be performed on CRUD operations for the given input. (Use with restHandlerClass)
restHandlerClass string It specify name of the class present in the restHandlerModule, which implements methods like handleCreate, handleEdit, handleList, handleDelete and is child class of splunktaucclib.rest_handler.admin_external.AdminExternalHandler. (Use with restHandlerModule)
hideForPlatform string Defines for which platform element should be hidden from UI perspective. Currently only two platforms are supported cloud or enterprise.

Usage

This is how the global configuration looks like without tabs

Expand to see full json code
{
  "pages": {
    "configuration": {
      "title": "",
      "tabs": [
        {
          "name": "a",
          "title": "",
          "entity": []
        }
      ]
    },
    "inputs": {
      "services": [
        {
          "name": "demo_input",
          "entity": [
            {
              "type": "text",
              "label": "Name",
              "validators": [
                {
                  "type": "regex",
                  "errorMsg": "Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
                  "pattern": "^[a-zA-Z]\\w*$"
                },
                {
                  "type": "string",
                  "errorMsg": "Length of input name should be between 1 and 100",
                  "minLength": 1,
                  "maxLength": 100
                }
              ],
              "field": "name",
              "help": "A unique name for the data input.",
              "required": true
            },
            {
              "type": "text",
              "label": "Interval",
              "validators": [
                {
                  "type": "regex",
                  "errorMsg": "Interval must be an integer.",
                  "pattern": "^\\-[1-9]\\d*$|^\\d*$"
                }
              ],
              "defaultValue": "300",
              "field": "interval",
              "help": "Time interval of the data input, in seconds.",
              "required": true
            },
            {
              "type": "singleSelect",
              "label": "Account to use",
              "options": {
                "autoCompleteFields": [
                  {
                    "value": "value1",
                    "label": "Value1"
                  },
                  {
                    "value": "value2",
                    "label": "Value2"
                  }
                ]
              },
              "help": "Account to use for this input.",
              "field": "account",
              "required": true
            },
            {
              "type": "text",
              "label": "sometext",
              "validators": [
                {
                  "type": "string",
                  "errorMsg": "Length of input name should be between 1 and 100",
                  "minLength": 1,
                  "maxLength": 1000
                }
              ],
              "field": "sometext",
              "help": "A unique text for the data input.",
              "required": true
            },
            {
              "type": "singleSelect",
              "label": "Some Select Dropdown",
              "options": {
                "disableSearch": true,
                "autoCompleteFields": [
                  {
                    "value": "DEBUG",
                    "label": "DEBUG"
                  },
                  {
                    "value": "INFO",
                    "label": "INFO"
                  },
                  {
                    "value": "WARN",
                    "label": "WARN"
                  },
                  {
                    "value": "ERROR",
                    "label": "ERROR"
                  },
                  {
                    "value": "CRITICAL",
                    "label": "CRITICAL"
                  }
                ]
              },
              "defaultValue": "INFO",
              "field": "someselectdropdown"
            },
            {
              "type": "checkboxGroup",
              "label": "CheckboxGroupTitle",
              "field": "api3",
              "options": {
                "groups": [
                  {
                    "label": "Group 1",
                    "options": {
                      "isExpandable": true,
                      "expand": true
                    },
                    "fields": [
                      "rowUnderGroup1"
                    ]
                  },
                  {
                    "label": "Group 3",
                    "options": {
                      "isExpandable": true,
                      "expand": true
                    },
                    "fields": [
                      "field223", "160validation"
                    ]
                  }
                ],
                "rows": [
                  {
                    "field": "rowWithoutGroup",
                    "input": {
                      "defaultValue": 1,
                      "required": true
                    }
                  },
                  {
                    "field": "rowUnderGroup1",
                    "checkbox": {
                      "label": "Row under Group 1",
                      "defaultValue": true
                    },
                    "input": {
                      "defaultValue": 1200,
                      "required": false
                    }
                  },
                  {
                    "field": "field223",
                    "checkbox": {
                      "label": "Required field",
                      "defaultValue": true
                    },
                    "input": {
                      "required": true
                    }
                  },
                  {
                    "field": "160validation",
                    "checkbox": {
                      "label": "from 1 to 60 validation"
                    },
                    "input": {
                      "validators": [
                        {
                          "type": "number",
                          "range": [1, 60]
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ],
          "title": "demo_input"
        },
        {
          "name": "demo_input_page",
          "style": "page",
          "entity": [
            {
              "type": "text",
              "label": "Name",
              "validators": [
                {
                  "type": "regex",
                  "errorMsg": "Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.",
                  "pattern": "^[a-zA-Z]\\w*$"
                },
                {
                  "type": "string",
                  "errorMsg": "Length of input name should be between 1 and 100",
                  "minLength": 1,
                  "maxLength": 100
                }
              ],
              "field": "name",
              "help": "A unique name for the data input.",
              "required": true
            },
            {
              "field": "config2_help_link",
              "label": "",
              "type": "helpLink",
              "options": {
                "text": "SSL configuration documentation",
                "link": "https://ta-jira-service-desk-simple-addon.readthedocs.io/en/latest/configuration.html"
              }
            },
            {
              "type": "checkbox",
              "label": "Hide in UI boolean value",
              "field": "hide_in_ui",
              "options": {
                "display": false
              }
            },
            {
              "type": "checkbox",
              "label": "Is input readonly?",
              "field": "hard_disabled",
              "options": {
                "display": false
              }
            },
            {
              "type": "text",
              "label": "Interval",
              "validators": [
                {
                  "type": "regex",
                  "errorMsg": "Interval must be an integer.",
                  "pattern": "^\\-[1-9]\\d*$|^\\d*$"
                }
              ],
              "defaultValue": "300",
              "field": "interval",
              "help": "Time interval of the data input, in seconds.",
              "required": true
            },
            {
              "type": "singleSelect",
              "label": "Account to use",
              "options": {
                "autoCompleteFields": [
                  {
                    "value": "value1",
                    "label": "Value1"
                  },
                  {
                    "value": "value2",
                    "label": "Value2"
                  }
                ]
              },
              "help": "Account to use for this input.",
              "field": "account",
              "required": true
            },
            {
              "type": "text",
              "label": "sometext",
              "validators": [
                {
                  "type": "string",
                  "errorMsg": "Length of input name should be between 1 and 100",
                  "minLength": 1,
                  "maxLength": 1000
                }
              ],
              "field": "sometext",
              "help": "A unique text for the data input.",
              "required": true
            },
            {
              "type": "singleSelect",
              "label": "Some Select Dropdown",
              "options": {
                "disableSearch": true,
                "autoCompleteFields": [
                  {
                    "value": "DEBUG",
                    "label": "DEBUG"
                  },
                  {
                    "value": "INFO",
                    "label": "INFO"
                  },
                  {
                    "value": "WARN",
                    "label": "WARN"
                  },
                  {
                    "value": "ERROR",
                    "label": "ERROR"
                  },
                  {
                    "value": "CRITICAL",
                    "label": "CRITICAL"
                  }
                ]
              },
              "defaultValue": "INFO",
              "field": "someselectdropdown"
            },
            {
              "type": "checkboxGroup",
              "label": "CheckboxGroupTitle",
              "field": "api3",
              "options": {
                "groups": [
                  {
                    "label": "Group 1",
                    "options": {
                      "isExpandable": true,
                      "expand": true
                    },
                    "fields": [
                      "rowUnderGroup1"
                    ]
                  },
                  {
                    "label": "Group 3",
                    "options": {
                      "isExpandable": true,
                      "expand": true
                    },
                    "fields": [
                      "field223", "160validation"
                    ]
                  }
                ],
                "rows": [
                  {
                    "field": "rowWithoutGroup",
                    "input": {
                      "defaultValue": 1,
                      "required": true
                    }
                  },
                  {
                    "field": "rowUnderGroup1",
                    "checkbox": {
                      "label": "Row under Group 1",
                      "defaultValue": true
                    },
                    "input": {
                      "defaultValue": 1200,
                      "required": false
                    }
                  },
                  {
                    "field": "field223",
                    "checkbox": {
                      "label": "Required field",
                      "defaultValue": true
                    },
                    "input": {
                      "required": true
                    }
                  },
                  {
                    "field": "160validation",
                    "checkbox": {
                      "label": "from 1 to 60 validation"
                    },
                    "input": {
                      "validators": [
                        {
                          "type": "number",
                          "range": [1, 60]
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ],
          "title": "Demo input page"
        }
      ],
      "title": "Inputs",
      "description": "Manage your data inputs",
      "table": {
        "actions": ["edit", "delete", "search", "clone"],
        "header": [
          {
            "label": "Name",
            "field": "name"
          },
          {
            "label": "Interval",
            "field": "interval"
          },
          {
            "label": "Index",
            "field": "index"
          },
          {
            "label": "Status",
            "field": "disabled"
          },
          {
            "label": "Select Dropdown",
            "field": "someselectdropdown1"
          }
        ],
        "moreInfo": [
          {
            "label": "Name",
            "field": "name"
          },
          {
            "label": "Interval",
            "field": "interval"
          },
          {
            "label": "Index",
            "field": "index"
          },
          {
            "label": "Status",
            "field": "disabled",
            "mapping": {
              "1": "Disabled",
              "true": "Disabled",
              "false": "Enabled"
            }
          },
          {
            "label": "Exported",
            "field": "hard_disabled",
            "mapping": {
              "1": "Yes",
              "0": "No",
              "f": "No"
            }
          },
          {
            "label": "Select Dropdown",
            "field": "someselectdropdown2"
          }
        ]
      },
      "readonlyFieldId": "hard_disabled",
      "hideFieldId": "hide_in_ui"
    },
    "dashboard": {
      "panels": [
        {
          "name": "default"
        }
      ]
    }
  },
  "meta": {
    "name": "demo_addon_for_splunk",
    "restRoot": "demo_addon_for_splunk",
    "version": "5.32.0R0e2087fe",
    "displayName": "Demo Add-on for Splunk",
    "schemaVersion": "0.0.3"
  }
}

Output