Welcome to pyfsr#
A Python client for the FortiSOAR REST API.
Quick Start#
Installation:
pip install pyfsr
Basic Usage:
from pyfsr import FortiSOAR
# Initialize the client
client = FortiSOAR('your-server', 'your-token')
# or with username and password
client = FortiSOAR('your-server', ('your-username', 'your-password'))
# Generic get call to Alerts endpoint
response = client.get('/api/v3/alerts')
# Create an alert
alert_data = {
"name": "Test Alert",
"description": "This is a test alert",
"severity": "High"
}
alert_record = client.alerts.create(**alert_data)
# List all alerts
alerts = client.alerts.list()
# Get a specific alert
alert = client.alerts.get("alert-id")
API Reference#
Contents:
AutoAPI Contents#
API Modules:
Module Overview#
Client - Main FortiSOAR client (
pyfsr.FortiSOAR)Alerts - Manage FortiSOAR alerts (
pyfsr.api.alerts.AlertsAPI)Export Config - Handle configuration exports (
pyfsr.api.export_config.ExportConfigAPI)Solution Packs - Work with solution packs (
pyfsr.api.solution_packs.SolutionPackAPI)Authentication - API key and user authentication handlers (
pyfsr.auth)File Operations - File handling utilities (
pyfsr.utils.file_operations.FileOperations)