API Documentation

Comprehensive API reference untuk mengintegrasikan Bitvisor dengan sistem Anda

API Version: v1.0 Base URL: https://vms.datainsight.id/api/v1

Authentication

API Key Authentication

Semua API calls memerlukan autentikasi menggunakan API key. Dapatkan API key dari dashboard pengguna Anda.

# Include API key in request headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Rate Limiting

API dibatasi untuk mencegah penyalahgunaan:

  • Starter Plan: 100 requests per hour
  • Professional Plan: 1,000 requests per hour
  • Enterprise Plan: 10,000 requests per hour

Vulnerability Scans

GET /scans

Retrieve all vulnerability scans for your account

Parameters:

page (optional) - Page number for pagination
limit (optional) - Items per page (max 100)
status (optional) - Filter by status: pending, running, completed, failed

Example Response:

{
  "data": [
    {
      "id": 1,
      "target": "example.com",
      "status": "completed",
      "created_at": "2025-09-24T10:00:00Z",
      "completed_at": "2025-09-24T10:15:00Z",
      "vulnerabilities_found": 5,
      "severity_counts": {
        "critical": 1,
        "high": 2,
        "medium": 2,
        "low": 0
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 5,
    "total_items": 42
  }
}
POST /scans

Start a new vulnerability scan

Request Body:

{
  "target": "example.com",
  "scan_type": "full", // full, quick, custom
  "options": {
    "include_subdomain": true,
    "port_scan": true,
    "web_scan": true,
    "ssl_scan": true
  }
}

Response:

{
  "scan_id": 123,
  "status": "pending",
  "target": "example.com",
  "estimated_duration": "10-15 minutes",
  "message": "Scan has been queued successfully"
}
GET /scans/{id}

Get detailed scan results

Response:

{
  "id": 123,
  "target": "example.com",
  "status": "completed",
  "scan_type": "full",
  "started_at": "2025-09-24T10:00:00Z",
  "completed_at": "2025-09-24T10:15:00Z",
  "vulnerabilities": [
    {
      "id": "CVE-2023-1234",
      "title": "SQL Injection Vulnerability",
      "severity": "high",
      "cvss_score": 8.5,
      "description": "SQL injection vulnerability in login form",
      "affected_url": "https://example.com/login",
      "recommendation": "Use parameterized queries"
    }
  ]
}

Reports

POST /reports

Generate a security report

Request Body:

{
  "scan_ids": [123, 124, 125],
  "format": "pdf", // pdf, html, json
  "include_executive_summary": true,
  "include_technical_details": true,
  "custom_branding": {
    "company_name": "Your Company",
    "logo_url": "https://yoursite.com/logo.png"
  }
}
GET /reports/{id}/download

Download generated report

Returns the report file in the requested format

Webhooks

Event Notifications

Receive real-time notifications when events occur in your account.

Supported Events:

  • scan.started - When a scan begins
  • scan.completed - When a scan finishes
  • scan.failed - When a scan fails
  • vulnerability.found - When new vulnerability is detected

Webhook Payload Example:

{
  "event": "scan.completed",
  "timestamp": "2025-09-24T10:15:00Z",
  "data": {
    "scan_id": 123,
    "target": "example.com",
    "status": "completed",
    "vulnerabilities_found": 5,
    "scan_duration": "15 minutes"
  }
}

Error Codes

400 Bad Request

Invalid request parameters or malformed JSON

401 Unauthorized

Invalid or missing API key

403 Forbidden

Insufficient permissions for the requested resource

404 Not Found

Requested resource does not exist

429 Rate Limited

Too many requests - rate limit exceeded

500 Server Error

Internal server error - please try again later

SDK & Libraries

JavaScript SDK

Official SDK untuk Node.js dan browser

npm install bitvisor-sdk

Python SDK

Library Python untuk integrasi mudah

pip install bitvisor-python

PHP SDK

Composer package untuk PHP

composer require bitvisor/sdk

Butuh Bantuan dengan API?

Tim developer kami siap membantu integrasi API Anda