Updates
This commit is contained in:
@@ -0,0 +1,586 @@
|
||||
# Collaboration & War Rooms API Documentation
|
||||
|
||||
## Overview
|
||||
|
||||
The Collaboration & War Rooms module provides real-time incident collaboration capabilities including war rooms, conference bridges, incident command roles, and timeline reconstruction for postmortems.
|
||||
|
||||
## Features
|
||||
|
||||
- **Real-time Incident Rooms**: Auto-created Slack/Teams channels per incident
|
||||
- **Conference Bridge Integration**: Zoom, Teams, Webex integration
|
||||
- **Incident Command Roles**: Assign Incident Commander, Scribe, Comms Lead
|
||||
- **Timeline Reconstruction**: Automatically ordered events + human notes for postmortems
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### War Rooms
|
||||
|
||||
#### List War Rooms
|
||||
```
|
||||
GET /api/collaboration-war-rooms/war-rooms/
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `status`: Filter by status (ACTIVE, ARCHIVED, CLOSED)
|
||||
- `privacy_level`: Filter by privacy level (PUBLIC, PRIVATE, RESTRICTED)
|
||||
- `incident__severity`: Filter by incident severity
|
||||
- `search`: Search in name, description, incident title
|
||||
- `ordering`: Order by created_at, last_activity, message_count
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"count": 10,
|
||||
"next": null,
|
||||
"previous": null,
|
||||
"results": [
|
||||
{
|
||||
"id": "uuid",
|
||||
"name": "Incident 123 - Database Outage",
|
||||
"incident_title": "Database Outage",
|
||||
"incident_severity": "CRITICAL",
|
||||
"status": "ACTIVE",
|
||||
"privacy_level": "PRIVATE",
|
||||
"message_count": 45,
|
||||
"last_activity": "2024-01-15T10:30:00Z",
|
||||
"participant_count": 5,
|
||||
"created_at": "2024-01-15T09:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Create War Room
|
||||
```
|
||||
POST /api/collaboration-war-rooms/war-rooms/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"name": "Incident 123 - Database Outage",
|
||||
"description": "War room for database outage incident",
|
||||
"incident_id": "uuid",
|
||||
"privacy_level": "PRIVATE",
|
||||
"allowed_user_ids": ["uuid1", "uuid2"]
|
||||
}
|
||||
```
|
||||
|
||||
#### Get War Room Details
|
||||
```
|
||||
GET /api/collaboration-war-rooms/war-rooms/{id}/
|
||||
```
|
||||
|
||||
#### Update War Room
|
||||
```
|
||||
PUT /api/collaboration-war-rooms/war-rooms/{id}/
|
||||
PATCH /api/collaboration-war-rooms/war-rooms/{id}/
|
||||
```
|
||||
|
||||
#### Add Participant
|
||||
```
|
||||
POST /api/collaboration-war-rooms/war-rooms/{id}/add_participant/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"user_id": "uuid"
|
||||
}
|
||||
```
|
||||
|
||||
#### Remove Participant
|
||||
```
|
||||
POST /api/collaboration-war-rooms/war-rooms/{id}/remove_participant/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"user_id": "uuid"
|
||||
}
|
||||
```
|
||||
|
||||
#### Get War Room Messages
|
||||
```
|
||||
GET /api/collaboration-war-rooms/war-rooms/{id}/messages/
|
||||
```
|
||||
|
||||
### Conference Bridges
|
||||
|
||||
#### List Conference Bridges
|
||||
```
|
||||
GET /api/collaboration-war-rooms/conference-bridges/
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `bridge_type`: Filter by bridge type (ZOOM, TEAMS, WEBEX, etc.)
|
||||
- `status`: Filter by status (SCHEDULED, ACTIVE, ENDED, CANCELLED)
|
||||
- `incident__severity`: Filter by incident severity
|
||||
- `search`: Search in name, description, incident title
|
||||
- `ordering`: Order by scheduled_start, created_at
|
||||
|
||||
#### Create Conference Bridge
|
||||
```
|
||||
POST /api/collaboration-war-rooms/conference-bridges/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"name": "Incident 123 - Database Outage Call",
|
||||
"description": "Emergency conference call for database outage",
|
||||
"incident_id": "uuid",
|
||||
"war_room_id": "uuid",
|
||||
"bridge_type": "ZOOM",
|
||||
"scheduled_start": "2024-01-15T10:00:00Z",
|
||||
"scheduled_end": "2024-01-15T11:00:00Z",
|
||||
"invited_participant_ids": ["uuid1", "uuid2"],
|
||||
"recording_enabled": true,
|
||||
"transcription_enabled": true
|
||||
}
|
||||
```
|
||||
|
||||
#### Join Conference
|
||||
```
|
||||
POST /api/collaboration-war-rooms/conference-bridges/{id}/join_conference/
|
||||
```
|
||||
|
||||
#### Start Conference
|
||||
```
|
||||
POST /api/collaboration-war-rooms/conference-bridges/{id}/start_conference/
|
||||
```
|
||||
|
||||
#### End Conference
|
||||
```
|
||||
POST /api/collaboration-war-rooms/conference-bridges/{id}/end_conference/
|
||||
```
|
||||
|
||||
### Incident Command Roles
|
||||
|
||||
#### List Command Roles
|
||||
```
|
||||
GET /api/collaboration-war-rooms/command-roles/
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `role_type`: Filter by role type (INCIDENT_COMMANDER, SCRIBE, COMMS_LEAD, etc.)
|
||||
- `status`: Filter by status (ACTIVE, INACTIVE, REASSIGNED)
|
||||
- `incident__severity`: Filter by incident severity
|
||||
- `search`: Search in incident title, assigned user username
|
||||
- `ordering`: Order by assigned_at, created_at
|
||||
|
||||
#### Create Command Role
|
||||
```
|
||||
POST /api/collaboration-war-rooms/command-roles/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"incident_id": "uuid",
|
||||
"war_room_id": "uuid",
|
||||
"role_type": "INCIDENT_COMMANDER",
|
||||
"assigned_user_id": "uuid",
|
||||
"responsibilities": [
|
||||
"Overall incident coordination",
|
||||
"Decision making authority",
|
||||
"Communication with stakeholders"
|
||||
],
|
||||
"decision_authority": [
|
||||
"TECHNICAL",
|
||||
"BUSINESS",
|
||||
"ESCALATION"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Reassign Role
|
||||
```
|
||||
POST /api/collaboration-war-rooms/command-roles/{id}/reassign_role/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"new_user_id": "uuid",
|
||||
"notes": "Reassigning due to shift change"
|
||||
}
|
||||
```
|
||||
|
||||
### Timeline Events
|
||||
|
||||
#### List Timeline Events
|
||||
```
|
||||
GET /api/collaboration-war-rooms/timeline-events/
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `event_type`: Filter by event type (INCIDENT_CREATED, STATUS_CHANGED, etc.)
|
||||
- `source_type`: Filter by source type (SYSTEM, USER, INTEGRATION, AUTOMATION)
|
||||
- `is_critical_event`: Filter critical events for postmortems
|
||||
- `incident__severity`: Filter by incident severity
|
||||
- `search`: Search in title, description, incident title
|
||||
- `ordering`: Order by event_time, created_at
|
||||
|
||||
#### Get Critical Events
|
||||
```
|
||||
GET /api/collaboration-war-rooms/timeline-events/critical_events/
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"count": 5,
|
||||
"results": [
|
||||
{
|
||||
"id": "uuid",
|
||||
"incident_title": "Database Outage",
|
||||
"event_type": "SLA_BREACHED",
|
||||
"title": "SLA Breached: Response Time",
|
||||
"description": "SLA 'Response Time' has been breached",
|
||||
"source_type": "SYSTEM",
|
||||
"event_time": "2024-01-15T10:15:00Z",
|
||||
"related_user_name": null,
|
||||
"is_critical_event": true,
|
||||
"created_at": "2024-01-15T10:15:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### War Room Messages
|
||||
|
||||
#### List Messages
|
||||
```
|
||||
GET /api/collaboration-war-rooms/war-room-messages/
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `message_type`: Filter by message type (TEXT, SYSTEM, COMMAND, ALERT, UPDATE)
|
||||
- `war_room`: Filter by war room ID
|
||||
- `sender`: Filter by sender ID
|
||||
- `search`: Search in content, sender name
|
||||
- `ordering`: Order by created_at
|
||||
|
||||
#### Create Message
|
||||
```
|
||||
POST /api/collaboration-war-rooms/war-room-messages/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"war_room_id": "uuid",
|
||||
"message_type": "TEXT",
|
||||
"content": "Database connection restored. Monitoring for stability.",
|
||||
"sender_id": "uuid",
|
||||
"sender_name": "John Doe"
|
||||
}
|
||||
```
|
||||
|
||||
### Incident Decisions
|
||||
|
||||
#### List Decisions
|
||||
```
|
||||
GET /api/collaboration-war-rooms/incident-decisions/
|
||||
```
|
||||
|
||||
**Query Parameters:**
|
||||
- `decision_type`: Filter by decision type (TECHNICAL, BUSINESS, COMMUNICATION, etc.)
|
||||
- `status`: Filter by status (PENDING, APPROVED, REJECTED, IMPLEMENTED)
|
||||
- `incident__severity`: Filter by incident severity
|
||||
- `search`: Search in title, description, incident title
|
||||
- `ordering`: Order by created_at, approved_at, implemented_at
|
||||
|
||||
#### Create Decision
|
||||
```
|
||||
POST /api/collaboration-war-rooms/incident-decisions/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"incident_id": "uuid",
|
||||
"command_role_id": "uuid",
|
||||
"decision_type": "TECHNICAL",
|
||||
"title": "Restart Database Cluster",
|
||||
"description": "Decision to restart the primary database cluster to resolve connection issues",
|
||||
"rationale": "Multiple connection timeouts indicate cluster instability. Restart should resolve the issue.",
|
||||
"requires_approval": true
|
||||
}
|
||||
```
|
||||
|
||||
#### Approve Decision
|
||||
```
|
||||
POST /api/collaboration-war-rooms/incident-decisions/{id}/approve_decision/
|
||||
```
|
||||
|
||||
#### Implement Decision
|
||||
```
|
||||
POST /api/collaboration-war-rooms/incident-decisions/{id}/implement_decision/
|
||||
```
|
||||
|
||||
**Request Body:**
|
||||
```json
|
||||
{
|
||||
"notes": "Database cluster restarted successfully. All connections restored."
|
||||
}
|
||||
```
|
||||
|
||||
## Data Models
|
||||
|
||||
### WarRoom
|
||||
- `id`: UUID primary key
|
||||
- `name`: War room name
|
||||
- `description`: War room description
|
||||
- `incident`: Related incident (ForeignKey)
|
||||
- `status`: ACTIVE, ARCHIVED, CLOSED
|
||||
- `privacy_level`: PUBLIC, PRIVATE, RESTRICTED
|
||||
- `slack_channel_id`: Slack channel ID
|
||||
- `teams_channel_id`: Teams channel ID
|
||||
- `discord_channel_id`: Discord channel ID
|
||||
- `allowed_users`: Users with access (ManyToMany)
|
||||
- `required_clearance_level`: Required security clearance
|
||||
- `message_count`: Number of messages
|
||||
- `last_activity`: Last activity timestamp
|
||||
- `active_participants`: Number of active participants
|
||||
- `created_by`: Creator (ForeignKey to User)
|
||||
- `created_at`: Creation timestamp
|
||||
- `updated_at`: Last update timestamp
|
||||
- `archived_at`: Archive timestamp
|
||||
|
||||
### ConferenceBridge
|
||||
- `id`: UUID primary key
|
||||
- `name`: Conference name
|
||||
- `description`: Conference description
|
||||
- `incident`: Related incident (ForeignKey)
|
||||
- `war_room`: Related war room (ForeignKey)
|
||||
- `bridge_type`: ZOOM, TEAMS, WEBEX, GOTO_MEETING, CUSTOM
|
||||
- `status`: SCHEDULED, ACTIVE, ENDED, CANCELLED
|
||||
- `meeting_id`: External meeting ID
|
||||
- `meeting_url`: Meeting URL
|
||||
- `dial_in_number`: Dial-in phone number
|
||||
- `access_code`: Access code for dial-in
|
||||
- `scheduled_start`: Scheduled start time
|
||||
- `scheduled_end`: Scheduled end time
|
||||
- `actual_start`: Actual start time
|
||||
- `actual_end`: Actual end time
|
||||
- `invited_participants`: Invited users (ManyToMany)
|
||||
- `active_participants`: Active users (ManyToMany)
|
||||
- `max_participants`: Maximum participants
|
||||
- `recording_enabled`: Recording enabled flag
|
||||
- `recording_url`: Recording URL
|
||||
- `transcription_enabled`: Transcription enabled flag
|
||||
- `transcription_url`: Transcription URL
|
||||
- `integration_config`: Integration configuration (JSON)
|
||||
- `created_by`: Creator (ForeignKey to User)
|
||||
- `created_at`: Creation timestamp
|
||||
- `updated_at`: Last update timestamp
|
||||
|
||||
### IncidentCommandRole
|
||||
- `id`: UUID primary key
|
||||
- `incident`: Related incident (ForeignKey)
|
||||
- `war_room`: Related war room (ForeignKey)
|
||||
- `role_type`: INCIDENT_COMMANDER, SCRIBE, COMMS_LEAD, TECHNICAL_LEAD, BUSINESS_LEAD, EXTERNAL_LIAISON, OBSERVER
|
||||
- `assigned_user`: Assigned user (ForeignKey to User)
|
||||
- `status`: ACTIVE, INACTIVE, REASSIGNED
|
||||
- `responsibilities`: List of responsibilities (JSON)
|
||||
- `decision_authority`: Areas of decision authority (JSON)
|
||||
- `assigned_at`: Assignment timestamp
|
||||
- `reassigned_at`: Reassignment timestamp
|
||||
- `reassigned_by`: User who reassigned (ForeignKey to User)
|
||||
- `assignment_notes`: Assignment notes
|
||||
- `decisions_made`: Number of decisions made
|
||||
- `communications_sent`: Number of communications sent
|
||||
- `last_activity`: Last activity timestamp
|
||||
- `created_by`: Creator (ForeignKey to User)
|
||||
- `created_at`: Creation timestamp
|
||||
- `updated_at`: Last update timestamp
|
||||
|
||||
### TimelineEvent
|
||||
- `id`: UUID primary key
|
||||
- `incident`: Related incident (ForeignKey)
|
||||
- `event_type`: Event type (INCIDENT_CREATED, STATUS_CHANGED, etc.)
|
||||
- `title`: Event title
|
||||
- `description`: Event description
|
||||
- `source_type`: SYSTEM, USER, INTEGRATION, AUTOMATION
|
||||
- `event_time`: When the event occurred
|
||||
- `created_at`: Creation timestamp
|
||||
- `related_user`: Related user (ForeignKey to User)
|
||||
- `related_runbook_execution`: Related runbook execution (ForeignKey)
|
||||
- `related_auto_remediation`: Related auto-remediation (ForeignKey)
|
||||
- `related_sla_instance`: Related SLA instance (ForeignKey)
|
||||
- `related_escalation`: Related escalation (ForeignKey)
|
||||
- `related_war_room`: Related war room (ForeignKey)
|
||||
- `related_conference`: Related conference (ForeignKey)
|
||||
- `related_command_role`: Related command role (ForeignKey)
|
||||
- `event_data`: Additional event data (JSON)
|
||||
- `tags`: Event tags (JSON)
|
||||
- `is_critical_event`: Critical for postmortem flag
|
||||
- `postmortem_notes`: Postmortem notes
|
||||
- `created_by`: Creator (ForeignKey to User)
|
||||
|
||||
### WarRoomMessage
|
||||
- `id`: UUID primary key
|
||||
- `war_room`: Related war room (ForeignKey)
|
||||
- `message_type`: TEXT, SYSTEM, COMMAND, ALERT, UPDATE
|
||||
- `content`: Message content
|
||||
- `sender`: Sender user (ForeignKey to User)
|
||||
- `sender_name`: Display name of sender
|
||||
- `is_edited`: Edited flag
|
||||
- `edited_at`: Edit timestamp
|
||||
- `reply_to`: Reply to message (ForeignKey to self)
|
||||
- `external_message_id`: External system message ID
|
||||
- `external_data`: External system data (JSON)
|
||||
- `created_at`: Creation timestamp
|
||||
- `updated_at`: Last update timestamp
|
||||
|
||||
### IncidentDecision
|
||||
- `id`: UUID primary key
|
||||
- `incident`: Related incident (ForeignKey)
|
||||
- `command_role`: Related command role (ForeignKey)
|
||||
- `decision_type`: TECHNICAL, BUSINESS, COMMUNICATION, ESCALATION, RESOURCE, TIMELINE
|
||||
- `title`: Decision title
|
||||
- `description`: Decision description
|
||||
- `rationale`: Decision rationale
|
||||
- `status`: PENDING, APPROVED, REJECTED, IMPLEMENTED
|
||||
- `requires_approval`: Requires approval flag
|
||||
- `approved_by`: Approver (ForeignKey to User)
|
||||
- `approved_at`: Approval timestamp
|
||||
- `implementation_notes`: Implementation notes
|
||||
- `implemented_at`: Implementation timestamp
|
||||
- `implemented_by`: Implementer (ForeignKey to User)
|
||||
- `impact_assessment`: Impact assessment
|
||||
- `success_metrics`: Success metrics (JSON)
|
||||
- `created_at`: Creation timestamp
|
||||
- `updated_at`: Last update timestamp
|
||||
|
||||
## Integration Points
|
||||
|
||||
### Automatic War Room Creation
|
||||
- War rooms are automatically created when new incidents are created
|
||||
- Incident reporter and assignee are automatically added as participants
|
||||
- Timeline events are created for war room creation
|
||||
|
||||
### Timeline Event Integration
|
||||
- Timeline events are automatically created for:
|
||||
- Incident status changes
|
||||
- Severity changes
|
||||
- Assignment changes
|
||||
- Runbook executions
|
||||
- Auto-remediation attempts
|
||||
- SLA breaches
|
||||
- Escalation triggers
|
||||
- Command role assignments
|
||||
|
||||
### Security Integration
|
||||
- War room access is controlled by incident access permissions
|
||||
- Required clearance levels can be set for war rooms
|
||||
- All actions are logged for audit purposes
|
||||
|
||||
### SLA & On-Call Integration
|
||||
- Conference bridges can be linked to SLA instances
|
||||
- Command roles can be assigned to on-call personnel
|
||||
- Timeline events track SLA breaches and escalations
|
||||
|
||||
### Automation Integration
|
||||
- Timeline events are created for runbook executions
|
||||
- Auto-remediation attempts are tracked in timeline
|
||||
- War rooms can be integrated with ChatOps platforms
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Common Error Responses
|
||||
|
||||
#### 400 Bad Request
|
||||
```json
|
||||
{
|
||||
"error": "user_id is required"
|
||||
}
|
||||
```
|
||||
|
||||
#### 403 Forbidden
|
||||
```json
|
||||
{
|
||||
"error": "You do not have permission to join this conference"
|
||||
}
|
||||
```
|
||||
|
||||
#### 404 Not Found
|
||||
```json
|
||||
{
|
||||
"error": "User not found"
|
||||
}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
All endpoints require authentication. Include the authentication token in the request headers:
|
||||
|
||||
```
|
||||
Authorization: Token your-auth-token-here
|
||||
```
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
API requests are rate limited to prevent abuse. Standard rate limits apply:
|
||||
- 1000 requests per hour per user
|
||||
- 100 requests per minute per user
|
||||
|
||||
## Webhooks
|
||||
|
||||
The system supports webhooks for real-time notifications:
|
||||
|
||||
### War Room Events
|
||||
- `war_room.created`: War room created
|
||||
- `war_room.updated`: War room updated
|
||||
- `war_room.archived`: War room archived
|
||||
|
||||
### Conference Events
|
||||
- `conference.scheduled`: Conference scheduled
|
||||
- `conference.started`: Conference started
|
||||
- `conference.ended`: Conference ended
|
||||
|
||||
### Timeline Events
|
||||
- `timeline_event.created`: Timeline event created
|
||||
- `timeline_event.critical`: Critical timeline event created
|
||||
|
||||
### Decision Events
|
||||
- `decision.created`: Decision created
|
||||
- `decision.approved`: Decision approved
|
||||
- `decision.implemented`: Decision implemented
|
||||
|
||||
## Examples
|
||||
|
||||
### Complete Incident Response Flow
|
||||
|
||||
1. **Incident Created** → War room automatically created
|
||||
2. **Assign Command Roles** → Incident Commander, Scribe, Comms Lead
|
||||
3. **Schedule Conference** → Emergency call for critical incidents
|
||||
4. **Make Decisions** → Track all decisions with approval workflow
|
||||
5. **Timeline Reconstruction** → Automatic + manual events for postmortem
|
||||
|
||||
### Integration with External Systems
|
||||
|
||||
```python
|
||||
# Create war room with Slack integration
|
||||
war_room = WarRoom.objects.create(
|
||||
name="Incident 123 - Database Outage",
|
||||
incident=incident,
|
||||
slack_channel_id="C1234567890"
|
||||
)
|
||||
|
||||
# Create conference bridge with Zoom
|
||||
conference = ConferenceBridge.objects.create(
|
||||
name="Emergency Call - Database Outage",
|
||||
incident=incident,
|
||||
war_room=war_room,
|
||||
bridge_type="ZOOM",
|
||||
scheduled_start=timezone.now() + timedelta(minutes=5),
|
||||
scheduled_end=timezone.now() + timedelta(hours=1),
|
||||
recording_enabled=True
|
||||
)
|
||||
```
|
||||
|
||||
This module provides comprehensive collaboration capabilities for incident response, ensuring effective communication, decision tracking, and postmortem analysis.
|
||||
@@ -0,0 +1,425 @@
|
||||
# Incident-Centric Chat API Documentation
|
||||
|
||||
## Overview
|
||||
|
||||
The Incident-Centric Chat system provides real-time collaboration capabilities for incident response teams. Every incident automatically gets its own chat room with advanced features including pinned messages, reactions, file sharing, ChatOps commands, and AI assistant integration.
|
||||
|
||||
## Key Features
|
||||
|
||||
### 1. Incident-Centric Chat Rooms
|
||||
- **Auto-creation**: Chat rooms are automatically created when incidents are created
|
||||
- **Cross-linking**: Direct links between incident timeline and chat logs
|
||||
- **Access Control**: RBAC-based access control with security clearance levels
|
||||
|
||||
### 2. Collaboration Features
|
||||
- **@mentions**: Mention users with notifications
|
||||
- **Threaded Conversations**: Reply to messages for sub-discussions
|
||||
- **Reactions**: Emoji reactions (👍, 🚨, ✅) for lightweight feedback
|
||||
- **Pinned Messages**: Pin important updates for easy reference
|
||||
|
||||
### 3. Media & Files
|
||||
- **File Sharing**: Upload logs, screenshots, evidence files
|
||||
- **Compliance Integration**: Automatic file classification (PUBLIC/CONFIDENTIAL/etc.)
|
||||
- **Chain of Custody**: File hashing and access logging for evidence
|
||||
- **Encryption**: Optional encryption for sensitive files
|
||||
|
||||
### 4. ChatOps Integration
|
||||
- **Commands**: Execute automation commands via chat
|
||||
- **Status Checks**: `/status incident-123` to fetch incident status
|
||||
- **Runbook Execution**: `/run playbook ransomware-incident`
|
||||
- **Escalation**: `/escalate` to trigger escalation procedures
|
||||
|
||||
### 5. Security Features
|
||||
- **Encryption**: Chat logs encrypted at rest and in transit
|
||||
- **Audit Trail**: Immutable audit trail for compliance
|
||||
- **RBAC**: Role-based access control for sensitive incidents
|
||||
- **Data Classification**: Automatic classification of shared content
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### War Rooms
|
||||
|
||||
#### List War Rooms
|
||||
```http
|
||||
GET /api/collaboration_war_rooms/api/war-rooms/
|
||||
```
|
||||
|
||||
#### Get War Room Details
|
||||
```http
|
||||
GET /api/collaboration_war_rooms/api/war-rooms/{id}/
|
||||
```
|
||||
|
||||
#### Create Chat Room for Incident
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-rooms/{incident_id}/create_chat_room/
|
||||
```
|
||||
|
||||
#### Get War Room Messages
|
||||
```http
|
||||
GET /api/collaboration_war_rooms/api/war-rooms/{id}/messages/
|
||||
```
|
||||
|
||||
#### Get Pinned Messages
|
||||
```http
|
||||
GET /api/collaboration_war_rooms/api/war-rooms/{id}/pinned_messages/
|
||||
```
|
||||
|
||||
### Messages
|
||||
|
||||
#### Send Message
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-room-messages/
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"war_room_id": "uuid",
|
||||
"content": "Message content",
|
||||
"message_type": "TEXT",
|
||||
"mentioned_user_ids": ["user-uuid-1", "user-uuid-2"]
|
||||
}
|
||||
```
|
||||
|
||||
#### Pin Message
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-room-messages/{id}/pin_message/
|
||||
```
|
||||
|
||||
#### Unpin Message
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-room-messages/{id}/unpin_message/
|
||||
```
|
||||
|
||||
#### Add Reaction
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-room-messages/{id}/add_reaction/
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"emoji": "👍"
|
||||
}
|
||||
```
|
||||
|
||||
#### Remove Reaction
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-room-messages/{id}/remove_reaction/
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"emoji": "👍"
|
||||
}
|
||||
```
|
||||
|
||||
#### Execute ChatOps Command
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/war-room-messages/{id}/execute_command/
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"command_text": "/status"
|
||||
}
|
||||
```
|
||||
|
||||
### File Management
|
||||
|
||||
#### Upload File
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/chat-files/
|
||||
Content-Type: multipart/form-data
|
||||
|
||||
{
|
||||
"message": "message-uuid",
|
||||
"file": "file-data",
|
||||
"file_type": "SCREENSHOT"
|
||||
}
|
||||
```
|
||||
|
||||
#### Log File Access
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/chat-files/{id}/log_access/
|
||||
```
|
||||
|
||||
### Chat Bots
|
||||
|
||||
#### List Chat Bots
|
||||
```http
|
||||
GET /api/collaboration_war_rooms/api/chat-bots/
|
||||
```
|
||||
|
||||
#### Generate AI Response
|
||||
```http
|
||||
POST /api/collaboration_war_rooms/api/chat-bots/{id}/generate_response/
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"message_id": "message-uuid",
|
||||
"context": {}
|
||||
}
|
||||
```
|
||||
|
||||
## WebSocket API
|
||||
|
||||
### Connection
|
||||
```javascript
|
||||
const ws = new WebSocket('ws://localhost:8000/ws/chat/{room_id}/');
|
||||
```
|
||||
|
||||
### Message Types
|
||||
|
||||
#### Send Chat Message
|
||||
```javascript
|
||||
ws.send(JSON.stringify({
|
||||
type: 'chat_message',
|
||||
content: 'Hello team!',
|
||||
message_type: 'TEXT',
|
||||
reply_to_id: 'optional-message-id'
|
||||
}));
|
||||
```
|
||||
|
||||
#### Add Reaction
|
||||
```javascript
|
||||
ws.send(JSON.stringify({
|
||||
type: 'reaction',
|
||||
message_id: 'message-uuid',
|
||||
emoji: '👍',
|
||||
action: 'add' // or 'remove'
|
||||
}));
|
||||
```
|
||||
|
||||
#### Execute Command
|
||||
```javascript
|
||||
ws.send(JSON.stringify({
|
||||
type: 'command',
|
||||
message_id: 'message-uuid',
|
||||
command_text: '/status'
|
||||
}));
|
||||
```
|
||||
|
||||
#### Typing Indicator
|
||||
```javascript
|
||||
ws.send(JSON.stringify({
|
||||
type: 'typing',
|
||||
is_typing: true
|
||||
}));
|
||||
```
|
||||
|
||||
### Receive Messages
|
||||
|
||||
#### Chat Message
|
||||
```javascript
|
||||
ws.onmessage = function(event) {
|
||||
const data = JSON.parse(event.data);
|
||||
|
||||
if (data.type === 'chat_message') {
|
||||
// Handle new message
|
||||
console.log('New message:', data.data);
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
#### Reaction Update
|
||||
```javascript
|
||||
if (data.type === 'reaction_update') {
|
||||
// Handle reaction update
|
||||
console.log('Reaction update:', data.data);
|
||||
}
|
||||
```
|
||||
|
||||
#### Command Result
|
||||
```javascript
|
||||
if (data.type === 'command_result') {
|
||||
// Handle command execution result
|
||||
console.log('Command result:', data.data);
|
||||
}
|
||||
```
|
||||
|
||||
## ChatOps Commands
|
||||
|
||||
### Available Commands
|
||||
|
||||
#### Status Check
|
||||
```
|
||||
/status
|
||||
```
|
||||
Returns current incident status, severity, assignee, and timestamps.
|
||||
|
||||
#### Runbook Execution
|
||||
```
|
||||
/run playbook <playbook-name>
|
||||
```
|
||||
Executes a runbook for the current incident.
|
||||
|
||||
#### Escalation
|
||||
```
|
||||
/escalate [reason]
|
||||
```
|
||||
Triggers escalation procedures for the incident.
|
||||
|
||||
#### Assignment
|
||||
```
|
||||
/assign <username>
|
||||
```
|
||||
Assigns the incident to a specific user.
|
||||
|
||||
#### Status Update
|
||||
```
|
||||
/update status <new-status>
|
||||
```
|
||||
Updates the incident status.
|
||||
|
||||
### Command Response Format
|
||||
```json
|
||||
{
|
||||
"command_type": "STATUS",
|
||||
"execution_status": "SUCCESS",
|
||||
"execution_result": {
|
||||
"incident_id": "uuid",
|
||||
"title": "Incident Title",
|
||||
"status": "IN_PROGRESS",
|
||||
"severity": "HIGH",
|
||||
"assigned_to": "username",
|
||||
"created_at": "2024-01-01T00:00:00Z",
|
||||
"updated_at": "2024-01-01T00:00:00Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Integration Points
|
||||
|
||||
### Incident Intelligence
|
||||
- Auto-creates chat rooms when incidents are created
|
||||
- Links chat messages to incident timeline
|
||||
- Updates incident status via ChatOps commands
|
||||
|
||||
### SLA & On-Call
|
||||
- Sends notifications when SLA thresholds are hit
|
||||
- Integrates with escalation procedures
|
||||
- Notifies on-call teams of critical updates
|
||||
|
||||
### Automation Orchestration
|
||||
- Executes runbooks via chat commands
|
||||
- Triggers auto-remediation procedures
|
||||
- Provides status updates on automation execution
|
||||
|
||||
### Compliance & Governance
|
||||
- Classifies files automatically
|
||||
- Maintains audit trails for all chat activity
|
||||
- Enforces data retention policies
|
||||
|
||||
### Security
|
||||
- Encrypts sensitive messages and files
|
||||
- Enforces RBAC for incident access
|
||||
- Logs all security-relevant activities
|
||||
|
||||
### Knowledge Learning
|
||||
- AI assistant provides contextual help
|
||||
- Suggests similar past incidents
|
||||
- Learns from chat interactions
|
||||
|
||||
## Security Considerations
|
||||
|
||||
### Access Control
|
||||
- Users must have appropriate clearance level for sensitive incidents
|
||||
- War room access is controlled by incident permissions
|
||||
- File access is logged and audited
|
||||
|
||||
### Encryption
|
||||
- Messages can be encrypted for sensitive incidents
|
||||
- Files are encrypted based on classification level
|
||||
- WebSocket connections use WSS in production
|
||||
|
||||
### Audit Trail
|
||||
- All chat messages are logged with timestamps
|
||||
- File access is tracked with user and timestamp
|
||||
- Command executions are logged with results
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Message Organization
|
||||
- Use pinned messages for important updates
|
||||
- Use reactions for quick feedback
|
||||
- Use threaded replies for focused discussions
|
||||
|
||||
### File Management
|
||||
- Classify files appropriately
|
||||
- Use descriptive filenames
|
||||
- Clean up temporary files regularly
|
||||
|
||||
### Command Usage
|
||||
- Use commands for automation, not manual updates
|
||||
- Verify command results before proceeding
|
||||
- Document custom commands for team use
|
||||
|
||||
### Security
|
||||
- Be mindful of sensitive information in chat
|
||||
- Use appropriate classification levels
|
||||
- Report security incidents immediately
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Common Error Responses
|
||||
|
||||
#### Access Denied
|
||||
```json
|
||||
{
|
||||
"error": "You do not have permission to access this war room"
|
||||
}
|
||||
```
|
||||
|
||||
#### Invalid Command
|
||||
```json
|
||||
{
|
||||
"error": "Unknown command type"
|
||||
}
|
||||
```
|
||||
|
||||
#### File Upload Error
|
||||
```json
|
||||
{
|
||||
"error": "File size exceeds limit"
|
||||
}
|
||||
```
|
||||
|
||||
### WebSocket Errors
|
||||
```json
|
||||
{
|
||||
"type": "error",
|
||||
"message": "Authentication required"
|
||||
}
|
||||
```
|
||||
|
||||
## Rate Limiting
|
||||
|
||||
- Message sending: 60 messages per minute per user
|
||||
- File uploads: 10 files per minute per user
|
||||
- Command execution: 20 commands per minute per user
|
||||
- WebSocket connections: 5 concurrent connections per user
|
||||
|
||||
## Monitoring & Analytics
|
||||
|
||||
### Metrics Tracked
|
||||
- Message volume per incident
|
||||
- Response times for commands
|
||||
- File upload/download statistics
|
||||
- User engagement metrics
|
||||
- Error rates and types
|
||||
|
||||
### Alerts
|
||||
- High message volume incidents
|
||||
- Failed command executions
|
||||
- Security policy violations
|
||||
- System performance issues
|
||||
|
||||
## Future Enhancements
|
||||
|
||||
### Planned Features
|
||||
- Voice messages and video calls
|
||||
- Advanced AI assistant capabilities
|
||||
- Integration with external chat platforms
|
||||
- Mobile app support
|
||||
- Advanced analytics dashboard
|
||||
|
||||
### Integration Roadmap
|
||||
- Slack/Teams integration
|
||||
- PagerDuty integration
|
||||
- Jira integration
|
||||
- Custom webhook support
|
||||
Reference in New Issue
Block a user