Skip to main content

createTopology

A Workflow Engine function that creates a named topology if it does not already exist. Takes no action if the topology exists.

This function is available for alert workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function createTopology takes the following arguments:

Name

Required

Type

Description

topologyName

yes

string

The name or substited value for the topology. To substitute a value, use $(<attribute_name>). For example $(custom_info.myTopology)

description

no

string

Optional topology description. When not supplied, defaults to the time, date, and the triggering alert id

active

no

string

True or false depending on whether you want the topology to be active. Defaults to 'true'.

Example

The following example demonstrates typical use of Workflow Engine function createTopology.

If you want to create an active topology named "my network", set the following:

  • topologyName: my network

  • description: my network nodes

The UI translates your settings to the following JSON:

{"topologyName":"my network","description":"my network nodes"}

If you run the topologies API, you can see your new topology:

curl -X GET 'https://example.com/api/v1/topologies'

Returns the following:

 {  
    "name": "my nework",
    "active": true,
    "description": "my network nodes"
 }