Map Template
In order to define a map widget, set the render type to map
and add a template
key. This will be a single dictionary.
Defining a map widget
If a connector adds items like the following to the CommandResult:
{ "latitude": 37.4487, "longitude": -122.1181, "address": "1.2.3.4", "description": "A nice place to live" }
Then generate a map with map markers describing each location with the following template:
{ "name" : "Connector Name", ... "commands": [ { "provides": "find locations", ... "render": { "type": "map", "width": 4, "height": 5, "title": "IP Geolocation" }, "output": [ { "data_path": "action_result.data.*.longitude", "data_type": "numeric", "map_info": "longitude" }, { "data_path": "action_result.data.*.latitude", "data_type": "numeric", "map_info": "latitude" }, { "data_path": "action_result.data.*.address", "data_type": "string", "contains": [ "ip" ], "map_info": "name" }, { "data_path": "action_result.data.*.description", "data_type": "string", "map_info": "Description" } ] } ] }
The template
dictionary has the following members:
Member | Required? | Description |
---|---|---|
data_path | Required | Specifies the Data Path of this field. Data Paths are a method of indexing into the JSON in an abstract fashion that allows others who want to access that data to do so by specifying the appropriate path. The Data Path specified here must be populated by the connector code that creates and returns this field.
This string value can start with See Use data paths to present data to the Splunk Phantom web interface for more information about data paths. |
data_type | Required | The type of variable. Supported types are: string , password , numeric , boolean .
|
contains | Optional | Specifies what kind of content this field contains. The types listed here tell the UI what kind of context sensitive actions can be run on this value when it is displayed. For example an ip geolocation action is something that can be applied to any IP address that appears in a column which lists ip as a type.
In the previous example, on the first column you can run file based actions such as a |
map_info | Required | The parameters required to render a data point on the map. One map_info value must be provided for each of longitude , latitude , and name .
|
Inputting a Google API Key
To input a Google API Key, complete the following steps in Splunk Phantom:
- From the main menu, select Administration.
- Select Administration Settings > Google Maps.
- From there, insert the API key.
Table Template | Platform installation for Python 2 and Python 3 |
This documentation applies to the following versions of Splunk® Phantom (Legacy): 4.8, 4.9, 4.10, 4.10.1, 4.10.2, 4.10.3, 4.10.4, 4.10.6, 4.10.7
Feedback submitted, thanks!