Loading...
Loading...
Integrate DRD with external services through API, OAuth, webhook, and SDK connectors. Connectors enable automated trust signal exchange, event forwarding, and cross-platform agent governance.
DRD supports four connector types, each designed for different integration patterns and authentication models.
Connect to REST or GraphQL APIs with configurable authentication and request mapping.
Integrate with services using OAuth 2.0 flows including PKCE, client credentials, and authorization code.
Receive real-time events from external services via HMAC-signed webhook endpoints.
Deep integration using platform-specific SDKs for Slack, GitHub, Jira, and more.
Create a connector by specifying its type, target service, and configuration. The config field accepts a flexible JSON structure tailored to each connector type.
{
"name": "Slack Notifications",
"type": "sdk",
"service": "slack",
"config": {
"workspace": "acme-corp",
"defaultChannel": "#drd-alerts",
"eventTypes": ["monitoring", "compliance", "security"],
"mentionOnCritical": true
},
"credentials": {
"botToken": "your-bot-token",
"signingSecret": "..."
},
"enabled": true
}
// Response
{
"connectorId": "conn_abc123",
"name": "Slack Notifications",
"type": "sdk",
"service": "slack",
"status": "connected",
"createdAt": "2026-02-12T10:00:00Z",
"lastTestedAt": null
}import { DRD } from '@drd/sdk';
const drd = new DRD({ apiKey: process.env.DRD_API_KEY });
// Create an API connector
const connector = await drd.connectors.create({
name: 'Internal SIEM',
type: 'api',
service: 'custom',
config: {
baseUrl: 'https://siem.acme.com/api/v2',
headers: { 'X-Source': 'drd-platform' },
retryPolicy: { maxRetries: 3, backoff: 'exponential' },
},
credentials: {
apiKey: process.env.SIEM_API_KEY,
},
});
console.log(connector.connectorId); // 'conn_def456'
console.log(connector.status); // 'connected'Each connector type supports specific capabilities for different integration patterns.
Connector credentials are encrypted at rest using AES-256-GCM and never exposed in API responses. You can rotate keys without downtime.
All credentials are encrypted with organization-scoped keys. Secrets are never logged or included in API responses.
Rotate credentials with zero-downtime. DRD validates the new credentials before deactivating the old ones.
// Rotate connector credentials
await drd.connectors.rotateCredentials('conn_abc123', {
credentials: {
botToken: 'your-new-bot-token',
signingSecret: 'new-secret-...',
},
validateBeforeSwap: true,
});
// The old credentials are invalidated after successful validationValidate that a connector is properly configured and can communicate with the target service before enabling it in production.
// Test a connector
const result = await drd.connectors.test('conn_abc123');
console.log(result.success); // true
console.log(result.latency); // 142 (ms)
console.log(result.details); // 'Successfully posted to #drd-alerts'
// Test with a sample payload
const payloadTest = await drd.connectors.test('conn_abc123', {
sampleEvent: {
type: 'security.finding',
severity: 'critical',
message: 'Test alert from DRD',
},
});
console.log(payloadTest.success); // true
console.log(payloadTest.responseCode); // 200// Response
{
"connectorId": "conn_abc123",
"success": true,
"latency": 142,
"details": "Successfully posted to #drd-alerts",
"testedAt": "2026-02-12T10:05:00Z"
}Every connector action is logged with details including the action type, status, duration, and any error information.
successAction completed successfully
failedAction failed with error details
timeoutAction exceeded configured timeout
retryingAction failed and is being retried
// Response
{
"logs": [
{
"logId": "log_001",
"connectorId": "conn_abc123",
"action": "send_alert",
"status": "success",
"duration": 234,
"metadata": {
"channel": "#drd-alerts",
"eventType": "security.finding"
},
"timestamp": "2026-02-12T10:30:00Z"
},
{
"logId": "log_002",
"connectorId": "conn_abc123",
"action": "send_alert",
"status": "failed",
"duration": 5000,
"error": "Connection timeout after 5000ms",
"retryCount": 2,
"timestamp": "2026-02-12T10:31:00Z"
}
],
"total": 156,
"successRate": 0.97
}Connectors progress through defined states. Understanding the lifecycle helps with monitoring and troubleshooting integration issues.
Created but awaiting authorization (OAuth connectors)
Connector is operational and processing events
Manually paused by user; no events processed
Health check failed; automatic retries in progress
Permanently removed; credentials destroyed
// Pause a connector
await drd.connectors.update('conn_abc123', { enabled: false });
// Resume a connector
await drd.connectors.update('conn_abc123', { enabled: true });
// Delete a connector (destroys credentials)
await drd.connectors.delete('conn_abc123');Complete list of connector API endpoints.
/api/connectorsCreate a new connector
/api/connectorsList all connectors
/api/connectors/{id}Get connector details
/api/connectors/{id}Update connector config
/api/connectors/{id}/testTest a connector
/api/connectors/{id}/rotateRotate credentials
/api/connectors/{id}/logsGet activity logs
/api/connectors/{id}Delete a connector