Skip to main content

Get SpiderFuzzer Statistics

GET/api/v1/fuzziq/canonical/stats

Overview

Get statistics about your SpiderFuzzer canonical database, including:

  • Whether SpiderFuzzer is enabled for your account
  • Total number of canonical records
  • Schema information
  • Activity timestamps

Examples

curl -X GET https://spideriq.ai/api/v1/fuzziq/canonical/stats \
-H "Authorization: Bearer <client_id>:<api_key>:<api_secret>"

Response

SpiderFuzzer Enabled

{
"success": true,
"enabled": true,
"schema_exists": true,
"schema_name": "client_abc123xyz",
"record_count": 15420,
"is_active": true,
"created_at": "2025-01-05T10:30:00Z",
"updated_at": "2025-01-06T14:22:00Z"
}

SpiderFuzzer Not Configured

{
"success": true,
"enabled": false,
"schema_exists": false,
"record_count": 0
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
enabledbooleanWhether SpiderFuzzer is enabled for this client
schema_existsbooleanWhether the client's schema exists in SpiderFuzzer database
schema_namestringPostgreSQL schema name (e.g., client_abc123)
record_countintegerTotal canonical records in the database
is_activebooleanWhether the schema is currently active
created_atstringISO 8601 timestamp of schema creation
updated_atstringISO 8601 timestamp of last update

Use Cases

1. Dashboard Integration

Display FuzzIQ stats in your application dashboard:

import requests

def get_dedup_summary():
stats = requests.get(url, headers=headers).json()

return {
"status": "active" if stats["enabled"] else "disabled",
"total_records": f"{stats['record_count']:,}",
"last_updated": stats.get("updated_at", "N/A")
}

# Example output:
# {
# "status": "active",
# "total_records": "15,420",
# "last_updated": "2025-01-06T14:22:00Z"
# }

2. Pre-flight Check Before Campaigns

Verify SpiderFuzzer is ready before starting a campaign:

def start_campaign(campaign_config):
# Check SpiderFuzzer status first
stats = requests.get(f"{base_url}/fuzziq/canonical/stats", headers=headers).json()

if not stats["enabled"]:
print("Warning: SpiderFuzzer is not enabled. Duplicates will not be filtered.")

if stats["record_count"] == 0:
print("Note: Canonical database is empty. Consider importing existing data first.")

# Proceed with campaign...
return submit_campaign(campaign_config)

3. Monitor Database Growth

Track how many records are being added over time:

import time

def monitor_growth(interval_minutes=60):
previous_count = None

while True:
stats = requests.get(url, headers=headers).json()
current_count = stats["record_count"]

if previous_count is not None:
added = current_count - previous_count
print(f"[{time.strftime('%H:%M')}] Total: {current_count:,} (+{added})")

previous_count = current_count
time.sleep(interval_minutes * 60)

# Output:
# [10:00] Total: 15,420 (+0)
# [11:00] Total: 15,847 (+427)
# [12:00] Total: 16,203 (+356)

Data Isolation

Each client gets a completely isolated PostgreSQL schema:

┌─────────────────────────────────────────┐
│ SpiderFuzzer Database │
├─────────────────────────────────────────┤
│ Schema: client_abc123 │
│ ├── canonical_records (15,420 rows) │
│ └── indexes... │
├─────────────────────────────────────────┤
│ Schema: client_def456 │
│ ├── canonical_records (8,750 rows) │
│ └── indexes... │
├─────────────────────────────────────────┤
│ Schema: client_ghi789 │
│ ├── canonical_records (42,100 rows) │
│ └── indexes... │
└─────────────────────────────────────────┘
note

Your data is never mixed with other clients. Each schema has its own tables, indexes, and data.