Skip to main content

/integrations

The /integrations endpoint allows you to create and configure new integrations.

To retrieve and update existing integrations see /integrations/{integrationId}.

Back to Integrations API Endpoint Reference.

GET

Retrieves a list of configured integrations.

Path parameters

The /integrations endpoint takes no parameters. It returns data for all existing integrations.

Response

The GET request returns the following response:

Successful requests return an array of JSON objects containing the following:

Name

Type

Description

readonly

List

Read-only details about the integration. This can include the webhook URL of the integration and authorisation details.

type_id

String

Type of integration you have created.

inputs

String

Username (value) and password (key) you have configured to authenticate with the integration.

name

String

Name of the integration you have created.

id

Integer

ID of the integration you have created.

version

String

Version of the integration you have created.

config

Object

The integration's configuration.

Examples

The following examples demonstrate typical use making a GET request to the integrations endpoint:

Request example

Example cURL GET request to the instance:

curl -X GET \
https://example.com/integrations/api/v1/integrations \
-u phil:password123 \

Response example

Example response returning the configured integrations:

[
  {
    "id": 42,
    "name": "Webhook1",
    "type_id": "Webhook",
    "version": "1.14",
    "config": {
      "single_instance_only": false,
      "category": "monitoring",
      "description": "A webhook integration to allow events to be sent via generic REST and processed by Moogsoft AIOps",
      "display_name": "Slack",
      "type_id": "Webhook",
      "version": "1.14",
      "properties": [
        {
          "moobot_visibility": true,
          "property": "gatewayURL",
          "value": "jira"
        }
      ],
      "validations": [
        {
          "name": "jira_availability",
          "type": "HTTP",
          "method": "GET",
          "uri": "http://validator.com",
          "headers": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "params": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "body": "string",
          "errorMessage": "Provided credentials were rejected by the host"
        }
      ],
      "alert_url_tools": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "custom_fields": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "link_definitions": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "moolets": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "sig_url_tools": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "sitroom_plugins": [
        {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        }
      ],
      "config": {
        "monitor": {
          "additionalProp1": {},
          "additionalProp2": {},
          "additionalProp3": {}
        },
        "constants": {
          "additionalProp1": {
            "additionalProp1": {},
            "additionalProp2": {},
            "additionalProp3": {}
          },
          "additionalProp2": {
            "additionalProp1": {},
            "additionalProp2": {},
            "additionalProp3": {}
          },
          "additionalProp3": {
            "additionalProp1": {},
            "additionalProp2": {},
            "additionalProp3": {}
          }
        },
        "conversions": {
          "additionalProp1": {
            "input": "STRING",
            "output": "INTEGER"
          },
          "additionalProp2": {
            "input": "STRING",
            "output": "INTEGER"
          },
          "additionalProp3": {
            "input": "STRING",
            "output": "INTEGER"
          }
        },
        "filter": {
          "presend": "WebhookLam-SolutionPak.js",
          "modules": [
            "string"
          ],
          "dependencies": {
            "additionalProp1": {},
            "additionalProp2": {},
            "additionalProp3": {}
          }
        },
        "mapping": {
          "lambotOverridden": [
            "string"
          ],
          "builtInMapper": "CJsonDecoder",
          "catchAll": "overflow",
          "rules": [
            {
              "name": "signature",
              "rule": "$origin::$deviceId::$objectId",
              "conversion": "sevConverter"
            }
          ]
        }
      }
    },
    "inputs": [
      {
        "key": "username",
        "value": "admin"
      }
    ],
    "readonly": [
      {
        "name": "url",
        "description": "URL",
        "value": "$config#proxy($config.name)"
      }
    ]
  }
]

POST

Creates an integration's configuration.

Request arguments

The POST request takes the following request payload:

Name

Type

Required

Description

type_id

String

Yes

Type of integration to add, for example Webhook

inputs

String

Yes

The key and value of inputs to substitute into the integration's configuration. This can include username, password, URL to poll, and timing intervals.

name

String

Yes

Name of the integration to add, for example Webhook1

version

String

Yes

Version of the integration to use. For validation purposes, this must be the most recent version.

Response

The POST request returns the following response:

Successful requests return an array of JSON objects containing the following:

Name

Type

Description

readonly

List

Read-only details about the integration. This can include the webhook URL of the integration and authorisation details.

type_id

String

Type of integration you have created.

inputs

String

Username (value) and password (key) you have configured to authenticate with the integration.

name

String

Name of the integration you have created.

id

Integer

ID of the integration you have created.

version

String

Version of the integration you have created.

config

Object

The integration's configuration.

Examples

The following examples demonstrate typical use making a POST request to the integrations endpoint:

Request example

Example cURL POST request to create a Webhook integration:

curl -X POST \
https://example.com/integrations/api/v1/integrations \
-u phil:password123 \
-d '{
    "type_id": "Webhook",
    "inputs": [
    {
        "name": "username",
        "value": "myusername"
    },
    {
        "name": "password",
        "value": "mypassword"
    }
    ],
    "name": "Webhook1",
    "version": "1.14"
    }'

Response example

Example response returning the new Webhook integration's configuration:

{
    "id": 4,
    "name": "Webhook2",
    "type_id": "Webhook",
    "version": "1.14",
    "config": {
        "category": "monitoring",
        "description": "A webhook integration to allow events to be sent via generic REST.",
        "display_name": "Webhook",
        "type_id": "Webhook",
        "version": "1.14",
        "config": {
            "monitor": {
                "name": "Webhook Lam Monitor",
                "class": "CRestMonitor",
                "port": "$config#port()",
                "authentication_type": "basic_auth_static",
                "basic_auth_static": {
                    "username": "John.Doe",
                    "password": "Password123"
                },
                "use_ssl": false,
                "accept_all_json": true,
                "lists_contain_multiple_events": true,
                "num_threads": 5,
                "rest_response_mode": "on_receipt",
                "rpc_response_timeout": 20
            },
            "constants": {
                "severity": {
                    "CLEAR": 0,
                    "INDETERMINATE": 1,
                    "WARNING": 2,
                    "MINOR": 3,
                    "MAJOR": 4,
                    "CRITICAL": 5,
                    "0": 0,
                    "1": 1,
                    "2": 2,
                    "3": 3,
                    "4": 4,
                    "5": 5,
                    "moog_lookup_default": 1
                }
            },
            "conversions": {
                "sevConverter": {
                    "input": "STRING",
                    "output": "INTEGER",
                    "lookup": "severity"
                },
                "stringToInt": {
                    "input": "STRING",
                    "output": "INTEGER"
                }
            },
            "filter": {
                "presend": "WebhookLam-SolutionPak.js",
                "modules": [],
                "dependencies": {
                    "lambot": [
                        "LamBot.js",
                        "WebhookLam-SolutionPak.js"
                    ],
                    "contrib": []
                }
            },
            "mapping": {
                "lambotOverridden": [],
                "catchAll": "overflow",
                "rules": [
                    {
                        "name": "signature",
                        "rule": "$source::$type"
                    },
                    {
                        "name": "source_id",
                        "rule": "$source_id"
                    },
                    {
                        "name": "external_id",
                        "rule": "$external_id"
                    },
                    {
                        "name": "manager",
                        "rule": "$manager"
                    },
                    {
                        "name": "source",
                        "rule": "$source"
                    },
                    {
                        "name": "class",
                        "rule": "$class"
                    },
                    {
                        "name": "agent",
                        "rule": "$LamInstanceName"
                    },
                    {
                        "name": "agent_location",
                        "rule": "$agent_location"
                    },
                    {
                        "name": "type",
                        "rule": "$type"
                    },
                    {
                        "name": "severity",
                        "rule": "$severity",
                        "conversion": "sevConverter"
                    },
                    {
                        "name": "description",
                        "rule": "$description"
                    },
                    {
                        "name": "agent_time",
                        "rule": "$agent_time",
                        "conversion": "stringToInt"
                    }
                ]
            }
        },
        "ha_profile": "active_active"
    },
    "inputs": [
        {
            "key": "username",
            "value": "password"
        }
    ],
    "readonly": [
        {
            "name": "url",
            "description": "URL:",
            "value": "https://example.com/integrations/api/v1/events/webhook2"
        },
        {
            "name": "userid",
            "description": "User ID:",
            "value": "myusername"
        },
        {
            "name": "readonly_password",
            "description": "Password:",
            "value": "mypassword"
        },
        {
            "name": "auth",
            "description": "Base64 Encoded Auth:",
            "value": "Basic YWRtaW46"
        }
    ]
}