Comprehensive Documentation

Documentation & Developer Guides

Complete guides, API references, and tutorials to help you get the most out of DefenSys security platform.

Getting Started

API Reference

Core Features

Code Examples

Get started quickly with these practical examples from our codebase

JavaScript - Login
// Login User
const response = await fetch('/api/auth/login', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: 'user@example.com',
    password: 'SecurePass123!'
  })
});

const data = await response.json();
if (data.success) {
  console.log('Logged in:', data.user);
  // JWT token stored in httpOnly cookie
}
JavaScript - Create Scan
// Create New Scan
const response = await fetch('/api/scans/create', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Production Website Scan',
    targetUrl: 'https://example.com',
    scanType: 'comprehensive'
  })
});

const data = await response.json();
console.log('Scan ID:', data.scanId);
JavaScript - Get Results
// Get Scan Results
const scanId = 'your-scan-id';
const response = await fetch(`/api/scans/${scanId}`);
const data = await response.json();

console.log('Security Score:', data.scan.securityScore);
console.log('Total Vulnerabilities:', 
  data.scan.totalVulnerabilities);
console.log('Status:', data.scan.status);
JavaScript - Contact Admin
// Send Message to Admin
const response = await fetch('/api/messages', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    subject: 'Need Help',
    message: 'I have a question about scan results...'
  })
});

const data = await response.json();
console.log(data.message); // Message sent!

Popular Guides

Most accessed documentation by our community

Need Help?

Can't find what you're looking for? Our support team is here to help.