

_warnings() #If disabling SSL cert check, also disable the warnings Maxpages = 100 #Assume there are no more than 100 pages of results, to protect against an accidental loopīaseurl=' + host + '/rest/asset?page=' #The base URL for a list of all assets, by page number Verifycert = False #Default to not checking the validity of the SSL cert, since Phantom defaults to self-signed Host = '10.16.0.201' #IP address or hostname of the Phantom server json file for each in the current directory This script will go through the list of Assets in a Phantom server and create a. Replace the host, username, and password with the actual values from your own environment: """ The following script (tested with Python 2.7) exports all of your assets to JSON files in the current directory. TO see the contents of the JSON, you can manually create an example asset, then export the JSON using the API. To create as asset in Splunk Phantom using the REST API, post a JSON object to a specific URL on the Splunk Phantom server.

See Using the REST API reference for Splunk Phantom for more information. This may be useful if you have a large number of similar asset types, such as firewalls, Windows servers, or vSphere servers.
SIEMENS SPLUNK PHANTOM HOW TO
This article provides an example of how to use the Splunk Phantom REST API to create multiple assets.
