Skip to main content

/integrations/{integrationId}

The /integrations/{integrationId} endpoint allows you to retrieve and update existing integrations.

To create a new integration see /integrations.

Back to Integrations API Endpoint Reference.

GET

Retrieves a specific integration's configuration.

Path parameters

The GET request takes the following path parameter:

Name

Type

Required

Description

integrationId

Integer

Yes

ID of the integration to retrieve. You can obtain an integration's ID by executing a GET request to /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 authorization details.

type_id

String

Type of integration.

inputs

String

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

name

String

Name of the integration.

id

Integer

ID of the integration.

version

String

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

config

Object

Integration's configuration.

Examples

The following examples demonstrate making a GET request to the integrations/{integrationId} endpoint:

Request example

Example cURL request for details of the integration with the ID "3":

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

Response example

Example response returning the integration's details:

{
    "id": 3,
    "name": "DynatraceAPMPolling1",
    "type_id": "dynatrace_apm_lam",
    "version": "2.3",
    "config": {
        "config": {
            "filter": {
                "modules": [],
                "presend": "DynatraceApmLam.js",
                "dependencies": {
                    "lambot": [
                        "LamBot.js",
                        "DynatraceApmLam.js"
                    ],
                    "contrib": []
                }
            },
            "mapping": {
                "rules": [
                    {
                        "name": "signature",
                        "rule": "$systemprofile :: $rule"
                    },
                    {
                        "name": "source_id",
                        "rule": "Dynatrace APM"
                    },
                    {
                        "name": "external_id",
                        "rule": "$id"
                    },
                    {
                        "name": "manager",
                        "rule": "Dynatrace Apm"
                    },
                    {
                        "name": "source",
                        "rule": "$source"
                    },
                    {
                        "name": "class",
                        "rule": "$rule"
                    },
                    {
                        "name": "agent",
                        "rule": "$LamInstanceName"
                    },
                    {
                        "name": "agent_location",
                        "rule": "$LamInstanceName"
                    },
                    {
                        "name": "type",
                        "rule": "$state"
                    },
                    {
                        "name": "severity",
                        "rule": "$severity",
                        "conversion": "sevConverter"
                    },
                    {
                        "name": "description",
                        "rule": "$message"
                    },
                    {
                        "name": "agent_time",
                        "rule": "$start",
                        "conversion": "timeConverter"
                    }
                ],
                "catchAll": "overflow",
                "lambotOverridden": [
                    "custom_info.overflow",
                    "source"
                ]
            },
            "monitor": {
                "name": "DynatraceApm Lam Monitor",
                "class": "CDynatraceApmMonitor",
                "targets": {
                    "target1": {
                        "url": "https://localhost:8021",
                        "filter": {
                            "state": "InProgress",
                            "profileName": "nam",
                            "incidentRule": "rul"
                        },
                        "timeout": 120,
                        "password": "def",
                        "username": "abc",
                        "disable_certificate_validation": true
                    }
                },
                "max_retries": -1,
                "retry_interval": 60,
                "request_interval": 60
            },
            "constants": {
                "severity": {
                    "severe": 5,
                    "warning": 2,
                    "informational": 1
                }
            },
            "conversions": {
                "stringToInt": {
                    "input": "STRING",
                    "output": "INTEGER"
                },
                "sevConverter": {
                    "input": "STRING",
                    "lookup": "severity",
                    "output": "INTEGER"
                },
                "timeConverter": {
                    "input": "STRING",
                    "output": "INTEGER",
                    "timeFormat": "yyyy-MM-dd'T'HH:mm:ss.SSS"
                }
            }
        },
        "moolets": [],
        "type_id": "dynatrace_apm_lam",
        "version": "2.3",
        "category": "monitoring",
        "ha_profile": "active_passive",
        "description": "An integration which enables Moogsoft AIOps to ingest events from Dynatrace APM.",
        "display_name": "Dynatrace APM (Polling)"
    },
    "inputs": [
        {
            "key": "targets",
            "value": [
                {
                    "url": "https://localhost:8021",
                    "filter": {
                        "state": "InProgress",
                        "profile_name": "nam",
                        "incident_rule": "rul"
                    },
                    "password": "def",
                    "username": "abc"
                }
            ]
        },
        {
            "key": "timing",
            "value": {
                "timeout": 120,
                "retry_interval": 60,
                "request_interval": 60
            }
        }
    ],
    "readonly": null
}

PUT

Updates an integration's configuration. Integrations with the ID you specify are unavailable during the update. When the update completes, they automatically resume.

Request arguments

The PUT request takes the following request arguments:

Name

Type

Required

Description

integrationId

Integer

Yes

ID of the integration to update.

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 PUT 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 updated.

inputs

String

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

name

String

Name of the integration you have updated.

id

Integer

ID of the integration you have updated.

version

String

Version of the integration you have updated.

config

Object

The integration's configuration.

Examples

The following examples demonstrate making a PUT request to the integrations/{integrationId} endpoint:

Request example

Example cURL PUT request to update the value and password parameters for a Webhook integration. In this example, the Webhook's ID is 2:

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

Response example

Example response returning the updated integration's details:

{
    "id": 2,
    "name": "Webhook2",
    "type_id": "Webhook",
    "version": "1.14",
    "config": {
        "category": "monitoring",
        "description": "A webhook integration to allow events to be sent via generic REST and processed by Moogsoft AIOps.",
        "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": "<username>",
                    "password": "<password>"
                },
                "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": "Jane.Doe",
            "value": "MyPassword"
        }
    ],
    "readonly": [
        {
            "name": "url",
            "description": "URL:",
            "value": "https://example.com/integrations/api/v1/events/webhook2"
        },
        {
            "name": "userid",
            "description": "User ID:",
            "value": "Username"
        },
        {
            "name": "readonly_password",
            "description": "Password:",
            "value": "Password123"
        },
        {
            "name": "auth",
            "description": "Base64 Encoded Auth:",
            "value": "Basic YWRtaW46"
        }
    ]
}