API Documentation

Comprehensive API reference for integrating with our security platform. Access real-time data, manage agents, and automate security workflows.

REST API JSON OAuth 2.0 Real-time

Authentication

Secure API access with API keys and OAuth 2.0

API Key Generation

POST /api/agent/generate-key-with-links
Authorization: Bearer {your-api-key}
Content-Type: application/json

{
  "agent_id": "unique-agent-identifier",
  "permissions": ["read", "write", "execute"]
}

Agent Management

GET /api/agent/tasks/{id} Active
POST /api/agent/heartbeat Active
POST /api/ingest/alerts Active

Dashboard & Reporting

GET /api/dashboard Active
GET /api/reports/{type}/{id}/status Beta
POST /api/chat/send New

Code Examples

Python Integration

import requests

API_KEY = 'your-api-key'
BASE_URL = 'https://vms.datainsight.id/api'

headers = {
    'Authorization': f'Bearer {API_KEY}',
    'Content-Type': 'application/json'
}

# Get agent tasks
response = requests.get(
    f'{BASE_URL}/agent/tasks/machine-123',
    headers=headers
)

print(response.json())

JavaScript/Node.js

const axios = require('axios');

const API_KEY = 'your-api-key';
const BASE_URL = 'https://vms.datainsight.id/api';

const client = axios.create({
  baseURL: BASE_URL,
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  }
});

// Send heartbeat
client.post('/agent/heartbeat', {
  agent_id: 'agent-123',
  status: 'active',
  timestamp: Date.now()
})
.then(response => console.log(response.data))
.catch(error => console.error(error));

Rate Limiting

Agent Heartbeat 1000/hour
Data Ingestion 5000/hour
Dashboard Queries 100/minute

Best Practices

  • Use HTTPS for all API calls
  • Implement exponential backoff for retries
  • Cache API responses when possible
  • Monitor rate limits and handle 429 responses
  • Keep API keys secure and rotate regularly
  • Use webhooks for real-time notifications

Need Help with Integration?

Our developer support team is here to help you integrate our API successfully. Get personalized assistance and code examples tailored to your use case.