Stealthwatch Cloud API Sample Scripts
This repository contains sample Python scripts related to Cisco Stealthwatch Cloud APIs. Stealthwatch Cloud is part of Cisco's App-First Security solution offering. It is available for use by the Cisco DevNet community through Code Exchange. For more information on the Stealthwatch Cloud REST API, please see the following link: https://developer.cisco.com/docs/stealthwatch/cloud
Installation
- Ensure Python 3 is installed.
- Ensure the Python
requests
module is installed.
- Download the
.py
files located in the python directory.
Alternatively, advanced users can also use git to checkout / clone this project.
Configuration
Open the file env.conf
and enter the following values where specified:
PORTAL_URL
API_USER
API_KEY
(Note: additional fields may also be required)
Obtaining API Credentials
To obtain API credentials for Stealthwatch Cloud, please do the following:
- Login to your Stealthwatch Cloud portal
- Click the User icon in the top-right corner, and select
Your Settings
- Click the button to
Generate New Key
- An API
key
will be created and associated for the user
listed
Usage
- Identify the path to your Python 3 executible.
- Depending how Python 3 was installed, this might be as simple as just calling the command
python
or python3
.
- Run the Python script with the following command:
$ <PYTHON-PATH> <PYTHON-SCRIPT-PATH>
- Example:
$ /usr/bin/python ./get_alerts.py
Known issues
No known issues.
Getting help
Use this project at your own risk (support not provided). If you need technical support with Cisco Stealthwatch APIs, do one of the following:
Browse the Forum
Check out our forum to pose a question or to see if any questions have already been answered by our community. We monitor these forums on a best effort basis and will periodically post answers.
Open A Case
Getting involved
Contributions to this code are welcome and appreciated. See CONTRIBUTING for details. Please adhere to our Code of Conduct at all times.
Licensing info
This code is licensed under the BSD 3-Clause License. See LICENSE for details.