Skip to content

Instantly share code, notes, and snippets.

@Hitokun
Hitokun / sevone_rest_metric_export.py
Last active September 20, 2018 11:05
Use the SevOne REST API (available for SevOne NMS 5.6+) to gather all the metrics (Indicators) from all devices. This is a starting point to develop more robust SevOne export solutions via REST
import requests
import json
import time
# Log into SevOne API.
address = 'http://sevone.com/api/v1/'
creds = {'name': 'user', 'password':'pass'}
r = requests.post( address + "authentication/signin",
data=json.dumps( creds ),
headers = { 'content-type': 'application/json' })