Create a Topology Tool

post

/api/topology/Tools

Creates a new topology tool.
The minimum required properties in the request body are:
  • ToolName
  • ToolTypeID
  • ToolPath
  • ToolPathTypeID
  • ToolTarget
  • Width
  • Height
You can use the following three properties to specify the context the tool is available in:
  • ContextElement
  • ContextEdgeType
  • ContextVertexType
If you do not specify any, the tool is available in all topology graph contexts. If any of the properties are set, the tool applies only to the specified context.
The most inclusive selection applies. This means that if you set ContextElement to Edge, the tool is available for all edges, regardless of what you set in ContextEdgeType.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
  • The edge type that the tool is available for. When ContextElement, ContextEdgeType, and ContextVertexType are all unset, the tool is available in all topology graph contexts. When any of the context properties are set, the tool is available only in the specified context.
    Example: ConnectsInterface
  • The graph elements that the tool is available for.
    Allowed values are:
    • Edge
    • Vertex
    When ContextElement, ContextEdgeType, and ContextVertexType are all unset, the tool is available in all topology graph contexts. When any of the context properties are set, the tool is available only in the specified context. The setting in ContextElement overrides any more specific settings in the other two context properties. This means that if ContextElement is set to Edge, the tool is available for all edges, regardless of what is set in ContextEdgeType.
    Example: Edge
  • The vertex type that the tool is available for. When ContextElement, ContextEdgeType, and ContextVertexType are all unset, the tool is available in all topology graph contexts. When any of the context properties are set, the tool is available only in the specified context.
    Example: Device
  • Used when toolTarget is set to window. The height of the pop-up window. Any value between 10 and 90 is treated as a percentage of the overall browser height. Any value greater than 100 is treated as an absolute pixel value.
    Example: 80
  • The icon used for the tool in menus.
    Example: fugue/heart--exclamation.png
  • The topology tool name.
    To avoid confusion with numeric IDs, the name value cannot be integers only or integers prefixed with the + or - symbols only. It must contain letters or other characters. For example, 1234, +1234, and -1234 are not valid, but US1234, US+1234 and US_1234 are.
    Example: Device Overview
  • The path to the web page to open, or script or function to run, depending on the value of Path Type.
    If the value starts with a string and ://, such as https://, this is an absolute path. Otherwise, the path is relative to the $A1BASEDIR/www/tools/topology/ directory.
    You can use tokens in the path in the format <Property> to represent object properties. When the tool is run, tokens are replaced with actual values. For example, <DeviceID> is replaced with the value from the object's DeviceID property. Common tokens include:
    • <DeviceID>
    • <ObjectID>
    • <OwnerUserID>
    • <OwnerUserGroupID>
    Example: dashboard/Device%20Overview?DeviceName=<DeviceName>&FilterType=DeviceName&FilterValue=<DeviceName>&DeviceZoneID=<DeviceZoneID>
  • The ID of the tool path type.
    Possible values are:
    • 1: Local
    • 2: Internal
    • 3: Hybrid
    • 4: Remote
    • 5: Function
    Example: 2
  • How the tool opens new pages.
    Possible values are:
    • window: Opens in a pop-up window.
    • currenttab: Opens in the current browser tab.
    • newtab: Opens in a new browser tab.
    Example: window
  • The ID of the tool type. For topology tools, this is always 1 for the View type.
    Example: 1
  • Used when toolTarget is set to window. The width of the pop-up window. Any value between 10 and 90 is treated as a percentage of the overall browser width. Any value greater than 100 is treated as an absolute pixel value.
    Example: 80
Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : SuccessfulAddOperation
Type: object
The response body for a successful add operation.
Show Source
Nested Schema : type
Type: object
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : topologyToolsRead
Type: object
Show Source
  • The edge type that the tool is available for. When ContextElement, ContextEdgeType, and ContextVertexType are all unset, the tool is available in all topology graph contexts. When any of the context properties are set, the tool is available only in the specified context.
    Example: ConnectsInterface
  • The graph elements that the tool is available for.
    Allowed values are:
    • Edge
    • Vertex
    When ContextElement, ContextEdgeType, and ContextVertexType are all unset, the tool is available in all topology graph contexts. When any of the context properties are set, the tool is available only in the specified context. The setting in ContextElement overrides any more specific settings in the other two context properties. This means that if ContextElement is set to Edge, the tool is available for all edges, regardless of what is set in ContextEdgeType.
    Example: Edge
  • The vertex type that the tool is available for. When ContextElement, ContextEdgeType, and ContextVertexType are all unset, the tool is available in all topology graph contexts. When any of the context properties are set, the tool is available only in the specified context.
    Example: Device
  • Used when toolTarget is set to window. The height of the pop-up window. Any value between 10 and 90 is treated as a percentage of the overall browser height. Any value greater than 100 is treated as an absolute pixel value.
    Example: 80
  • The icon used for the tool in menus.
    Example: fugue/heart--exclamation.png
  • The object type ID for the tool.
    Example: 1
  • The tool ID.
    Example: 1
  • The name of the tool.
    Example: Device Overview
  • The path to the web page to open, or script or function to run, depending on the value of Path Type.
    If the value starts with a string and ://, such as https://, this is an absolute path. Otherwise, the path is relative to the $A1BASEDIR/www/tools/topology/ directory.
    You can use tokens in the path in the format <Property> to represent object properties. When the tool is run, tokens are replaced with actual values. For example, <DeviceID> is replaced with the value from the object's DeviceID property. Common tokens include:
    • <DeviceID>
    • <ObjectID>
    • <OwnerUserID>
    • <OwnerUserGroupID>
    Example: dashboard/Device%20Overview?DeviceName=<DeviceName>&FilterType=DeviceName&FilterValue=<DeviceName>&DeviceZoneID=<DeviceZoneID>
  • The ID of the tool path type.
    Possible values are:
    • 1: Local
    • 2: Internal
    • 3: Hybrid
    • 4: Remote
    • 5: Function
    Example: 2
  • The name of the tool path type.
    Example: Internal
  • How the tool opens new pages.
    Possible values are:
    • window: Opens in a pop-up window.
    • currenttab: Opens in the current browser tab.
    • newtab: Opens in a new browser tab.
    Example: window
  • The name of the tool target.
    Example: window
  • The ID of the tool type. For topology tools, this is always 1 for the View type.
    Example: 1
  • The name of the tool type. For topology tools, this is always View.
    Example: View
  • Used when toolTarget is set to window. The width of the pop-up window. Any value between 10 and 90 is treated as a percentage of the overall browser width. Any value greater than 100 is treated as an absolute pixel value.
    Example: 80

Default Response

Failed operation
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : errors
Type: array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
Nested Schema : items
Type: object
An error.
Back to Top