Skip to main content

API v1.5 Migration Guide

This comprehensive guide helps you migrate your integration from API v1.4 to v1.5, which represents a major enterprise transformation with credit-based pricing, advanced features, and significant performance improvements.

Overview of Changes

API v1.5 represents a complete enterprise transformation with advanced features, credit-based pricing, and significant performance improvements. This is the largest API upgrade in CyberSecFeed history.

What's New in v1.5

Feature Categoryv1.4 Capabilityv1.5 Enterprise Enhancement
Pricing ModelMonthly quota (API calls)Credit-based system (0-35 credits per endpoint)
Batch OperationsGET with query parametersPOST enterprise batch (86% cost savings)
SortingBasic published date sorting8 advanced sort options (severity, EPSS, dates)
Severity FilteringNumeric CVSS rangesNamed severity levels (critical/high/medium/low)
Field SelectionFixed response format85% payload reduction with selective fields
Exploit DetectionManual enrichment parameterBuilt-in exploit filtering (no parameter required)
Rate LimitingAll plans rate limitedUnlimited speed on paid plans
API Versionv1.4 with feature flagsv1.5 production default (no flags required)

Major System Improvements

  • 304,050 CVEs: Complete universe coverage (98.17%)
  • 95%+ cache hit rates: Sub-second response times
  • Enterprise batch endpoint: Process 1-50 CVEs in single request
  • Credit transparency: Know exact costs before making calls
  • Advanced sorting: Optimized performance for different use cases
  • Field selection: Bandwidth optimization up to 85%
  • Enhanced intelligence: KEV, EPSS, ACSC, enrichment framework

Why Upgrade to v1.5?

  1. Cost Efficiency: 86% savings with enterprise batch operations
  2. Performance: Advanced sorting and field selection for faster responses
  3. Flexibility: Credit-based pricing scales with your actual usage
  4. Enterprise Ready: No rate limits on paid plans, unlimited throughput
  5. Future-Proof: v1.5 is the foundation for all upcoming features

Breaking Changes

1. Credit System Replaces Quota System

v1.4 (Quota-Based):

# Old behavior - simple API call counting
curl -H "X-API-Key: your-key" \
https://api.cybersecfeed.com/api/v1/cve/CVE-2024-0001

# Response headers (v1.4):
# X-Quota-Limit: 30000
# X-Quota-Used: 1523
# X-Quota-Remaining: 28477

v1.5 (Credit-Based):

# New behavior - value-based credit consumption
curl -H "X-API-Key: your-key" \
https://api.cybersecfeed.com/api/v1/cve/CVE-2024-0001

# Consumes 5 credits (not 1 API call)
# Credit headers only in /usage endpoint for better caching:
curl -H "X-API-Key: your-key" \
https://api.cybersecfeed.com/api/v1/usage

# Response:
{
"data": {
"usage": {
"credits_used": 1523,
"credits_limit": 200000,
"credits_remaining": 198477
}
}
}

2. Enterprise Batch Endpoint (Major Change)

v1.4 (Limited GET Batch):

# Old batch - limited to query parameters
curl -H "X-API-Key: your-key" \
"https://api.cybersecfeed.com/api/v1/cves?ids=CVE-2024-0001,CVE-2024-0002,CVE-2024-0003"

# Cost: 3 API calls = varies by plan
# Limited functionality, query parameter length limits

v1.5 (Enterprise POST Batch):

# New enterprise batch - POST with advanced features
curl -X POST -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{
"cve_ids": ["CVE-2024-0001", "CVE-2024-0002", "CVE-2024-0003"],
"fields": ["cve_id", "severity", "kev", "epss"],
"include": ["enrichment"]
}' \
https://api.cybersecfeed.com/api/v1/cve/batch

# Cost: 35 credits (flat rate for up to 50 CVEs)
# 86% savings vs individual calls (15 credits vs 250 credits for 50 CVEs)

3. Advanced Sorting Parameters

v1.4 (Basic Sorting):

# Limited sorting options
curl -H "X-API-Key: your-key" \
"https://api.cybersecfeed.com/api/v1/cves?sort=published_date&limit=10"

# Only basic published date sorting available

v1.5 (8 Sort Options):

# Advanced sorting with performance optimization
curl -H "X-API-Key: your-key" \
"https://api.cybersecfeed.com/api/v1/cves?sort=severity_desc&limit=10"

# Available sorts: severity_desc, epss_desc, published_desc, modified_desc, etc.
# Each optimized for specific use cases and performance

4. Named Severity Levels

v1.4 (Numeric CVSS Ranges):

# Old numeric filtering - complex and error-prone
curl -H "X-API-Key: your-key" \
"https://api.cybersecfeed.com/api/v1/cves?severity_min=9.0&severity_max=10.0&limit=10"

# Required knowledge of CVSS scoring ranges

v1.5 (Named Severity Levels):

# New named levels - intuitive and faster
curl -H "X-API-Key: your-key" \
"https://api.cybersecfeed.com/api/v1/cves?severity=critical&limit=10"

# Options: critical, high, medium, low
# Optimized indexes for better performance

5. Rate Limiting Changes

v1.4 (Universal Rate Limits):

Free: 5 requests/minute + 1,000 calls/month
Plus: 60 requests/minute + 30,000 calls/month
Pro: 120 requests/minute + 200,000 calls/month

v1.5 (Credit-Based, No Rate Limits on Paid Plans):

Free: 5 requests/minute + 1,000 credits/month
Plus: UNLIMITED speed + 30,000 credits/month
Pro: UNLIMITED speed + 200,000 credits/month
Business: UNLIMITED speed + 2,000,000 credits/month

Migration Steps

Step 1: Plan Your Credit Requirements

Analyze your current v1.4 usage to estimate v1.5 credit needs:

# Audit your current API usage patterns
grep -r "api.cybersecfeed.com" /your/codebase/

# Count different endpoint types
grep -c "/api/v1/cve/" /your/logs/api.log # Individual CVE calls (5 credits each)
grep -c "/api/v1/cves" /your/logs/api.log # Search calls (1 credit each)
grep -c "ids=" /your/logs/api.log # Batch calls (convert to POST batch)

Credit Estimation Calculator:

v1.4 Usagev1.5 CreditsCalculation
1,000 individual CVE calls5,000 credits1,000 × 5 credits
2,000 search calls2,000 credits2,000 × 1 credit
500 batch calls (10 CVEs each)1,750 credits500 × 35 credits ÷ 10 = 86% savings!

Plan Recommendations:

  • Current Plus (30K calls)Pro Plan (200K credits) for typical enterprise usage
  • Current Pro (200K calls)Business Plan (2M credits) for high-volume operations

Step 2: Update Credit Monitoring

Replace v1.4 quota header monitoring with v1.5 credit tracking:

v1.4 (Quota Headers):

# Old v1.4 monitoring - no longer works
def check_quota_from_headers(response):
quota_limit = int(response.headers.get('X-Quota-Limit', 0))
quota_used = int(response.headers.get('X-Quota-Used', 0))
return quota_limit, quota_used

response = requests.get(url, headers=headers)
limit, used = check_quota_from_headers(response) # ❌ Headers removed

v1.5 (Credit System):

# New v1.5 credit monitoring
def check_credits():
response = requests.get(
"https://api.cybersecfeed.com/api/v1/usage",
headers={"X-API-Key": api_key}
)
usage_data = response.json()["data"]["usage"]
return {
'credits_limit': usage_data["credits_limit"],
'credits_used': usage_data["credits_used"],
'credits_remaining': usage_data["credits_remaining"],
'plan': usage_data["plan"]
}

# Use dedicated endpoint for credit tracking
credits = check_credits()
print(f"Using {credits['credits_used']}/{credits['credits_limit']} credits")

Step 3: Migrate to Enterprise Batch Operations

Convert v1.4 batch queries to v1.5 enterprise batch endpoint for 86% savings:

v1.4 (GET Batch - Limited):

# Old batch method - limited and expensive
def get_cves_batch_old(cve_ids):
ids_param = ','.join(cve_ids)
response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cves?ids={ids_param}",
headers={"X-API-Key": api_key}
)
return response.json()

# Cost: len(cve_ids) × 1 call each = varies by plan

v1.5 (POST Enterprise Batch - 86% Savings!):

# New enterprise batch - massive cost savings
def get_cves_batch_v15(cve_ids, fields=None, include=None):
payload = {
"cve_ids": cve_ids[:50], # Up to 50 CVEs per batch
"fields": fields or ["cve_id", "severity", "kev", "epss"],
"include": include or []
}

response = requests.post(
"https://api.cybersecfeed.com/api/v1/cve/batch",
json=payload,
headers={
"X-API-Key": api_key,
"Content-Type": "application/json"
}
)
return response.json()

# Cost: 35 credits flat rate (up to 50 CVEs)
# 86% savings: 35 credits vs 250 credits for 50 individual calls!

# Process large batches efficiently
def get_all_cves_batch(cve_ids):
results = []
for i in range(0, len(cve_ids), 50):
batch = cve_ids[i:i+50]
batch_result = get_cves_batch_v15(batch)
results.extend(batch_result["data"]["cves"])
return results

Step 4: Update Severity Filtering

Migrate from numeric CVSS ranges to v1.5 named severity levels:

v1.4 (Numeric Ranges - Slower):

# Old numeric approach - complex and slower
def get_critical_cves_old():
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={
"severity_min": 9.0,
"severity_max": 10.0,
"limit": 20
},
headers={"X-API-Key": api_key}
)
return response.json()

v1.5 (Named Levels - Faster & Intuitive):

# New named severity levels - optimized and intuitive
def get_critical_cves_v15():
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={
"severity": "critical", # critical, high, medium, low
"sort": "severity_desc", # Fastest performance
"limit": 20
},
headers={"X-API-Key": api_key}
)
return response.json()

# Multiple severity levels
def get_high_risk_cves():
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={
"severity": "critical,high", # Comma-separated
"sort": "severity_desc",
"limit": 50
},
headers={"X-API-Key": api_key}
)
return response.json()

Step 5: Implement Advanced Sorting

Update to v1.5 advanced sorting for better performance:

v1.4 (Basic Sorting):

# Limited sorting options in v1.4
def get_recent_cves_old():
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={
"sort": "published_date", # Only basic option
"limit": 20
},
headers={"X-API-Key": api_key}
)
return response.json()

v1.5 (8 Advanced Sort Options):

# New advanced sorting with performance optimization
def get_cves_optimized_sorting(use_case="monitoring"):
sort_options = {
"monitoring": "severity_desc", # Fastest - critical vulnerabilities first
"threat_hunting": "epss_desc", # High exploitation probability first
"recent_tracking": "published_desc", # Newest vulnerabilities first
"change_monitoring": "modified_desc" # Recently updated first
}

response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={
"sort": sort_options[use_case],
"limit": 20
},
headers={"X-API-Key": api_key}
)
return response.json()

# Usage examples
critical_monitoring = get_cves_optimized_sorting("monitoring")
threat_intel = get_cves_optimized_sorting("threat_hunting")

Step 6: Add Field Selection for Performance

Implement v1.5 field selection for up to 85% payload reduction:

v1.4 (Fixed Response Format):

# Old v1.4 - always returns full response (large payloads)
def get_cve_for_risk_scoring_old(cve_id):
response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
headers={"X-API-Key": api_key}
)
data = response.json()

# Only need these fields but get entire response
return {
'id': data['data']['cve']['id'],
'severity': data['data']['cve']['cvss']['baseSeverity'],
'kev': data['data']['cve'].get('kev'),
'epss': data['data']['cve'].get('epss')
}

v1.5 (Field Selection - 85% Smaller Payloads):

# New v1.5 - selective field returns for massive bandwidth savings
def get_cve_for_risk_scoring_v15(cve_id):
response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
params={
"fields": "cve_id,severity,kev,epss" # Only what you need
},
headers={"X-API-Key": api_key}
)
return response.json()

# Different use cases, different field selections
def get_cves_optimized_fields(use_case="risk_scoring"):
field_templates = {
"risk_scoring": "cve_id,severity,kev,epss",
"basic_monitoring": "cve_id,severity,published",
"compliance_reporting": "cve_id,severity,status,published,modified",
"threat_intel": "cve_id,severity,kev,epss,enrichment_status"
}

response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={
"severity": "critical,high",
"fields": field_templates[use_case],
"sort": "severity_desc",
"limit": 50
},
headers={"X-API-Key": api_key}
)
return response.json()

# 85% smaller payloads = faster responses + lower bandwidth costs

v1.5 Migration Patterns

Pattern 1: Enterprise Client Wrapper

class CyberSecFeedV15Client:
"""Enterprise v1.5 client with automatic optimization and credit management"""

def __init__(self, api_key, default_plan="pro"):
self.api_key = api_key
self.base_url = "https://api.cybersecfeed.com/api/v1"
self.default_plan = default_plan
self.headers = {"X-API-Key": api_key}

def get_cve(self, cve_id, fields=None, include=None):
"""Get single CVE with field selection and enrichment control"""
params = {}
if fields:
params['fields'] = ','.join(fields) if isinstance(fields, list) else fields
if include:
params['include'] = ','.join(include) if isinstance(include, list) else include

response = requests.get(
f"{self.base_url}/cve/{cve_id}",
params=params,
headers=self.headers
)
return response.json()

def get_cves_batch(self, cve_ids, fields=None, include=None):
"""Enterprise batch processing with 86% cost savings"""
if len(cve_ids) > 50:
# Process in chunks of 50
results = []
for i in range(0, len(cve_ids), 50):
chunk = cve_ids[i:i+50]
batch_result = self._process_batch(chunk, fields, include)
results.extend(batch_result['data']['cves'])
return {'data': {'cves': results}}
else:
return self._process_batch(cve_ids, fields, include)

def _process_batch(self, cve_ids, fields=None, include=None):
"""Internal batch processing"""
payload = {"cve_ids": cve_ids}
if fields:
payload['fields'] = fields if isinstance(fields, list) else fields.split(',')
if include:
payload['include'] = include if isinstance(include, list) else include.split(',')

response = requests.post(
f"{self.base_url}/cve/batch",
json=payload,
headers={**self.headers, "Content-Type": "application/json"}
)
return response.json()

def search_cves(self, severity=None, sort="severity_desc", fields=None, **kwargs):
"""Optimized CVE search with v1.5 features"""
params = kwargs.copy()
if severity:
params['severity'] = severity
if sort:
params['sort'] = sort
if fields:
params['fields'] = ','.join(fields) if isinstance(fields, list) else fields

response = requests.get(
f"{self.base_url}/cves",
params=params,
headers=self.headers
)
return response.json()

def check_credits(self):
"""Monitor credit usage and limits"""
response = requests.get(
f"{self.base_url}/usage",
headers=self.headers
)
return response.json()['data']['usage']

# Usage examples
client = CyberSecFeedV15Client(api_key="your-key")

# Single CVE with field selection
cve = client.get_cve("CVE-2024-0001", fields=["cve_id", "severity", "kev"])

# Enterprise batch processing (86% savings)
batch_cves = client.get_cves_batch(
["CVE-2024-0001", "CVE-2024-0002", "CVE-2021-44228"],
fields=["cve_id", "severity", "kev", "epss"]
)

# Optimized search with v1.5 features
critical_cves = client.search_cves(
severity="critical",
sort="severity_desc",
fields=["cve_id", "severity", "kev"],
limit=20
)

Pattern 2: Credit-Aware Operations

class CreditAwareClient:
"""Client with automatic credit optimization and monitoring"""

def __init__(self, api_key, credit_threshold=0.8):
self.api_key = api_key
self.credit_threshold = credit_threshold # Alert when 80% used
self.headers = {"X-API-Key": api_key}

def _check_credit_usage(self):
"""Check if approaching credit limit"""
response = requests.get(
"https://api.cybersecfeed.com/api/v1/usage",
headers=self.headers
)
usage = response.json()['data']['usage']
usage_percent = usage['credits_used'] / usage['credits_limit']

if usage_percent > self.credit_threshold:
print(f"⚠️ Credit usage at {usage_percent:.1%} - consider optimizing queries")

return usage

def smart_batch_request(self, cve_ids, fields=None):
"""Automatically optimize batch size for cost efficiency"""
usage = self._check_credit_usage()

# If high usage, optimize with field selection
if usage['credits_used'] / usage['credits_limit'] > 0.7:
fields = fields or ["cve_id", "severity", "kev"] # Minimal fields
print(f"💡 Using field selection to optimize credit usage")

# Always use batch for 2+ CVEs (much cheaper)
if len(cve_ids) >= 2:
return self._enterprise_batch(cve_ids, fields)
else:
return self._single_request(cve_ids[0], fields)

def _enterprise_batch(self, cve_ids, fields):
"""Enterprise batch with automatic chunking"""
payload = {"cve_ids": cve_ids[:50]} # Max 50 per batch
if fields:
payload['fields'] = fields

response = requests.post(
"https://api.cybersecfeed.com/api/v1/cve/batch",
json=payload,
headers={**self.headers, "Content-Type": "application/json"}
)

print(f"💰 Batch processing {len(cve_ids)} CVEs for 35 credits (vs {len(cve_ids) * 5} individual)")
return response.json()

def _single_request(self, cve_id, fields):
"""Single CVE request with field optimization"""
params = {}
if fields:
params['fields'] = ','.join(fields)

response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
params=params,
headers=self.headers
)
return response.json()

# Usage with automatic optimization
client = CreditAwareClient("your-key", credit_threshold=0.8)

# Automatically optimizes based on credit usage and batch size
results = client.smart_batch_request(
["CVE-2024-0001", "CVE-2024-0002", "CVE-2021-44228"]
)

Pattern 3: Progressive Migration Strategy

def progressive_v15_migration():
"""Gradual migration from v1.4 to v1.5 with feature validation"""

# Phase 1: Update credit monitoring (backward compatible)
def phase1_credit_monitoring():
try:
response = requests.get(
"https://api.cybersecfeed.com/api/v1/usage",
headers={"X-API-Key": api_key}
)
usage = response.json()['data']['usage']
print(f"✅ Phase 1: Credit monitoring active - {usage['credits_used']}/{usage['credits_limit']}")
return True
except Exception as e:
print(f"❌ Phase 1 failed: {e}")
return False

# Phase 2: Implement named severity levels (optional - fallback available)
def phase2_named_severity():
try:
# Try v1.5 named severity
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={"severity": "critical", "limit": 5},
headers={"X-API-Key": api_key}
)
print("✅ Phase 2: Named severity levels working")
return response.json()
except Exception as e:
print(f"⚠️ Phase 2 fallback: Using numeric severity - {e}")
# Fallback to v1.4 style
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cves",
params={"severity_min": 9.0, "limit": 5},
headers={"X-API-Key": api_key}
)
return response.json()

# Phase 3: Implement enterprise batch (biggest savings)
def phase3_enterprise_batch(cve_ids):
try:
# Try v1.5 enterprise batch
payload = {
"cve_ids": cve_ids,
"fields": ["cve_id", "severity", "kev", "epss"]
}
response = requests.post(
"https://api.cybersecfeed.com/api/v1/cve/batch",
json=payload,
headers={"X-API-Key": api_key, "Content-Type": "application/json"}
)
print(f"✅ Phase 3: Enterprise batch - 35 credits for {len(cve_ids)} CVEs (86% savings!)")
return response.json()
except Exception as e:
print(f"⚠️ Phase 3 fallback: Using individual requests - {e}")
# Fallback to individual requests
results = []
for cve_id in cve_ids:
response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
headers={"X-API-Key": api_key}
)
results.append(response.json())
return {"data": {"cves": results}}

# Execute migration phases
print("🚀 Starting Progressive v1.5 Migration")

if phase1_credit_monitoring():
print("✅ Credit system migration successful")

severity_results = phase2_named_severity()
print("✅ Severity filtering migration successful")

test_cves = ["CVE-2024-0001", "CVE-2024-0002", "CVE-2021-44228"]
batch_results = phase3_enterprise_batch(test_cves)
print("✅ Enterprise batch migration successful")

print("🎉 All v1.5 migration phases completed successfully!")
return True
else:
print("❌ Migration failed at Phase 1 - check API key and connectivity")
return False

# Run progressive migration
success = progressive_v15_migration()

Testing Your v1.5 Migration

1. Credit System Validation

def test_credit_system():
"""Validate v1.5 credit system is working properly"""

# Test credit monitoring endpoint
response = requests.get(
"https://api.cybersecfeed.com/api/v1/usage",
headers={"X-API-Key": api_key}
)

assert response.status_code == 200
usage = response.json()['data']['usage']

# Validate credit fields
required_fields = ['credits_used', 'credits_limit', 'credits_remaining', 'plan']
for field in required_fields:
assert field in usage, f"Missing credit field: {field}"

print(f"✅ Credit system: {usage['credits_used']}/{usage['credits_limit']} credits used")
print(f"✅ Plan: {usage['plan']}")
return usage

def test_credit_consumption():
"""Test that endpoints consume expected credits"""

# Get initial credit usage
initial_usage = test_credit_system()
initial_credits = initial_usage['credits_used']

# Make a single CVE request (should cost 5 credits)
response = requests.get(
"https://api.cybersecfeed.com/api/v1/cve/CVE-2024-0001",
headers={"X-API-Key": api_key}
)
assert response.status_code == 200

# Check credit consumption
final_usage = test_credit_system()
credits_consumed = final_usage['credits_used'] - initial_credits

print(f"✅ CVE detail request consumed {credits_consumed} credits (expected: 5)")
return credits_consumed == 5

2. Enterprise Batch Performance Testing

import time

def test_batch_performance():
"""Compare v1.4 vs v1.5 batch performance and cost"""

test_cves = ["CVE-2024-0001", "CVE-2024-0002", "CVE-2021-44228", "CVE-2023-12345", "CVE-2022-56789"]

# Test v1.5 enterprise batch (single request)
start_time = time.time()
batch_response = requests.post(
"https://api.cybersecfeed.com/api/v1/cve/batch",
json={
"cve_ids": test_cves,
"fields": ["cve_id", "severity", "kev", "epss"]
},
headers={"X-API-Key": api_key, "Content-Type": "application/json"}
)
batch_time = time.time() - start_time

print(f"✅ v1.5 Enterprise Batch:")
print(f" Time: {batch_time:.3f}s")
print(f" Cost: 35 credits (flat rate)")
print(f" CVEs: {len(test_cves)}")

# Simulate v1.4 individual requests (for comparison)
start_time = time.time()
individual_responses = []
for cve_id in test_cves:
response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
headers={"X-API-Key": api_key}
)
individual_responses.append(response)
individual_time = time.time() - start_time

print(f"⚠️ v1.4 Individual Requests (for comparison):")
print(f" Time: {individual_time:.3f}s")
print(f" Cost: {len(test_cves) * 5} credits (5 each)")
print(f" Requests: {len(test_cves)}")

# Calculate improvements
time_improvement = ((individual_time - batch_time) / individual_time) * 100
cost_improvement = ((len(test_cves) * 5 - 35) / (len(test_cves) * 5)) * 100

print(f"\n🎉 v1.5 Improvements:")
print(f" Time savings: {time_improvement:.1f}%")
print(f" Cost savings: {cost_improvement:.1f}%")

return batch_response.json()

def test_field_selection_performance():
"""Test field selection payload reduction"""

cve_id = "CVE-2024-0001"

# Full response
full_response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
headers={"X-API-Key": api_key}
)
full_size = len(full_response.content)

# Optimized response with field selection
optimized_response = requests.get(
f"https://api.cybersecfeed.com/api/v1/cve/{cve_id}",
params={"fields": "cve_id,severity,kev,epss"},
headers={"X-API-Key": api_key}
)
optimized_size = len(optimized_response.content)

reduction = ((full_size - optimized_size) / full_size) * 100

print(f"✅ Field Selection Performance:")
print(f" Full response: {full_size:,} bytes")
print(f" Optimized response: {optimized_size:,} bytes")
print(f" Payload reduction: {reduction:.1f}%")

return reduction

v1.5 Migration Checklist

Pre-Migration Assessment

  • Audit current API usage patterns - Count individual calls, batches, search queries
  • Estimate credit requirements - Calculate expected v1.5 credit consumption
  • Plan subscription upgrade - Choose appropriate credit allocation for usage
  • Review batch operations - Identify opportunities for enterprise batch savings
  • Test with development API key - Validate migration with non-production key

Migration Implementation

  • Update credit monitoring - Replace quota headers with /usage endpoint calls
  • Implement enterprise batch operations - Convert bulk requests to POST /api/v1/cve/batch
  • Migrate severity filtering - Update from numeric ranges to named levels (critical, high, etc.)
  • Add advanced sorting - Implement optimized sort options (severity_desc, epss_desc, etc.)
  • Implement field selection - Add selective field returns for bandwidth optimization
  • Update exploit filtering - Remove required include=enrichment parameter (now built-in)
  • Test rate limit removal - Verify unlimited speed on paid plans

Post-Migration Validation

  • Verify credit consumption - Confirm endpoints consume expected credits
  • Test batch performance - Validate 86% cost savings and response time improvements
  • Measure payload reduction - Confirm field selection provides expected bandwidth savings
  • Monitor application performance - Check for overall response time improvements
  • Validate all features - Ensure existing functionality works with v1.5 parameters
  • Update documentation - Revise internal documentation with v1.5 patterns
  • Train team members - Share v1.5 best practices and optimization strategies

Optimization Opportunities

  • Implement credit-aware logic - Add automatic credit usage monitoring and alerts
  • Optimize batch sizes - Use enterprise batch for 2+ CVEs (always cheaper than individual)
  • Leverage field selection - Apply targeted field selection for different use cases
  • Use performance-optimized sorting - Choose severity_desc for fastest critical vulnerability monitoring
  • Take advantage of unlimited speed - Remove artificial rate limiting from your application code

Support During v1.5 Migration

Getting Help

If you encounter issues during your v1.5 migration:

  1. Review the troubleshooting guide for common v1.5 migration issues
  2. Use the /usage endpoint to monitor credit consumption and validate credit system migration
  3. Test enterprise batch operations with small batches (2-5 CVEs) before scaling up
  4. Contact support at [email protected] with specific migration details

Support Request Template

When contacting support, include:

Subject: v1.5 Migration Support - [Brief Description]

Migration Context:
- Current API version: v1.4
- Target API version: v1.5
- Current subscription plan: [Free/Plus/Pro/Business]
- Estimated monthly usage: [X individual calls, Y batch operations]

Issue Description:
- What you're trying to migrate: [credit system/batch operations/severity filtering/etc.]
- Expected behavior: [describe what should happen]
- Actual behavior: [describe what's actually happening]
- Error messages: [paste any error responses]

Code Examples:
- v1.4 code that worked: [paste your current working code]
- v1.5 code that's failing: [paste your new code]

Migration Timeline:
- Target completion date: [when you need this working]
- Urgency level: [low/medium/high/critical]

Common Migration Issues

Credit System Issues

  • Problem: Credit consumption higher than expected
  • Solution: Review endpoint costs table, implement batch operations for bulk processing

Enterprise Batch Issues

  • Problem: Batch endpoint returning errors
  • Solution: Check Content-Type header, validate JSON payload format, ensure CVE ID format

Performance Issues

  • Problem: Responses slower than expected
  • Solution: Implement field selection, use optimized sort options, check for proper caching

v1.5 Resources

Success Stories

The v1.5 migration delivers significant benefits:

  • 86% cost savings with enterprise batch operations
  • 85% payload reduction with field selection
  • Unlimited speed on paid plans (no rate limits)
  • Sub-second response times with optimized sorting
  • Enterprise-grade reliability with 99.99% uptime

Most customers complete their v1.5 migration within 1-2 weeks and see immediate performance and cost improvements.