SDK to download the Netskope Events
Project description
Netskope SDK
Neskope SDK is Python library for dealing with API's to download the Netskope events.
Installation
Use the package manager pip to install NetskopeSDK.
pip install netskopesdk
Rest sdk Usage to pull the Alert & Events
from netskope.api.iterator.netskope_iterator import NetskopeIterator
from netskope.api.iterator.const import Const
from requests.exceptions import RequestException
import time
# Construct the params dict to pass the authentication details
params = {
Const.NSKP_TOKEN : "<REST-API-TOKEN>",
Const.NSKP_TENANT_HOSTNAME : "<HOSTNAME>",
Const.NSKP_EVENT_TYPE : "<EVENT-TYPE>",
Const.NSKP_ITERATOR_NAME : "<ITERATOR-NAME>"
}
# Create an Iterator
iterator = NetskopeIterator(params)
# Use the next() iterator to download the logs.
# Consume the message indefinitely in a loop and ingest the data to SIEM
while True:
response = (iterator.next())
try:
if response:
data = response.json()
if "result" in data and len(data["result"]) != 0:
print(data)
time.sleep(10)
else:
print("No response received from the iterator")
print(data)
time.sleep(10)
except Exception as e:
raise RequestException(e)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
netskopesdk-0.0.13.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file netskopesdk-0.0.13.tar.gz
.
File metadata
- Download URL: netskopesdk-0.0.13.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8e89ca5eb8e9fad6b64a9ab90d7a4487c8cf606d05961558d9e2336cc9936db |
|
MD5 | 56fb51d5ad58d82f4794a34eb86bb3cd |
|
BLAKE2b-256 | b884c4e984e4dd64425e3cbc214eb92d3b689dc8fd0125ef9276b7dca580597d |
Provenance
File details
Details for the file netskopesdk-0.0.13-py3-none-any.whl
.
File metadata
- Download URL: netskopesdk-0.0.13-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16057ff5ac8f5f6124d8e48fa7f3b856a6a6f8a2bb8ae21c4354ce79203787b4 |
|
MD5 | 95ea82a55fc82549f5b28bfd6453a2d1 |
|
BLAKE2b-256 | 4877b315d4928fa0655b35cf82af09cc442a5af680c9abfb4f8cb225092c764a |