Manage incidents and dataset versions in the knowledge base. The system supports versioning, rollbacks, and soft deletion of inactive versions.
List Incidents
Retrieve all incidents from the active knowledge base version. Attempts to read from Qdrant first, falls back to local JSON file if unavailable.
Response
Whether the request was successful
Array of incident objects Unique incident identifier
Incident title or summary
Full incident description
Resolution or mitigation steps taken
ISO 8601 timestamp when incident was opened
ISO 8601 timestamp when incident was last updated
Source system (e.g., “servicenow”)
Example Request
curl https://api.example.com/api/knowledge-base/incidents \
-H "Authorization: Bearer $TOKEN "
Example Response
{
"success" : true ,
"incidents" : [
{
"incident_id" : "INC001" ,
"title" : "Database connection timeout" ,
"description" : "Production database experiencing intermittent connection timeouts" ,
"action_taken" : "Increased connection pool size and optimized query performance" ,
"opened_at" : "2024-01-15T10:30:00Z" ,
"updated_at" : "2024-01-15T14:20:00Z" ,
"source" : "servicenow"
},
{
"incident_id" : "INC002" ,
"title" : "API rate limit exceeded" ,
"description" : "Payment API returning 429 errors during peak traffic" ,
"action_taken" : "Scaled API instances and implemented request throttling" ,
"opened_at" : "2024-01-16T09:15:00Z" ,
"updated_at" : "2024-01-16T11:45:00Z" ,
"source" : "servicenow"
}
]
}
Delete Incident
Delete a specific incident from both the JSON file and Qdrant vector database.
Path Parameters
Unique incident identifier to delete
Response
Whether the deletion was successful
Human-readable status message
Example Request
curl -X DELETE https://api.example.com/api/knowledge-base/incidents/INC001 \
-H "Authorization: Bearer $TOKEN "
Example Response
{
"success" : true ,
"message" : "Incident deleted successfully"
}
Get Incident Logs
Retrieve recent incident ingestion logs showing which incidents were added to the knowledge base.
Query Parameters
Maximum number of log entries to return
Response
Whether the request was successful
Array of log entries, ordered by creation time (newest first) Unique log entry identifier (UUID)
Incident identifier that was ingested
Source system (e.g., “servicenow”)
ISO 8601 timestamp when the incident was ingested
Example Request
curl https://api.example.com/api/knowledge-base/logs?limit= 5 \
-H "Authorization: Bearer $TOKEN "
Example Response
{
"success" : true ,
"logs" : [
{
"id" : "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d" ,
"incident_id" : "INC150" ,
"title" : "CDN cache invalidation failed" ,
"source" : "servicenow" ,
"created_at" : "2024-03-01T16:30:00Z"
},
{
"id" : "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e" ,
"incident_id" : "INC149" ,
"title" : "SSL certificate expiration warning" ,
"source" : "servicenow" ,
"created_at" : "2024-03-01T15:45:00Z"
}
]
}
List Dataset Versions
List all dataset versions with pagination. Versions represent snapshots of the knowledge base at different points in time.
Query Parameters
Maximum number of versions to return
Number of versions to skip (for pagination)
Response
Whether the request was successful
Array of dataset version objects Show DatasetVersionResponse
Unique version identifier (UUID)
Incremental version number
Qdrant collection name for this version
Version status: “active”, “inactive”, “pending”
Whether this version is currently active
Number of incidents in this version
Metadata about source files used to create this version
Data source: “upload”, “servicenow”, etc.
Qdrant snapshot name (if snapshot was created)
Upload session ID (for uploaded versions)
Email of user who created this version
User-provided notes about this version
ISO 8601 timestamp when version was activated
ISO 8601 timestamp when version was created
ISO 8601 timestamp when version was last updated
Total number of versions available
UUID of the currently active version
Example Request
curl https://api.example.com/api/knowledge-base/versions?limit= 10 & offset = 0 \
-H "Authorization: Bearer $TOKEN "
Example Response
{
"success" : true ,
"versions" : [
{
"id" : "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d" ,
"version_number" : 5 ,
"collection_name" : "past_issues_v2" ,
"status" : "active" ,
"is_active" : true ,
"incident_count" : 150 ,
"source" : "upload" ,
"notes" : "Q4 2024 incident data" ,
"activated_at" : "2024-03-01T10:00:00Z" ,
"created_at" : "2024-03-01T09:30:00Z" ,
"updated_at" : "2024-03-01T10:00:00Z"
},
{
"id" : "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e" ,
"version_number" : 4 ,
"collection_name" : "past_issues_v2_snapshot_4" ,
"status" : "inactive" ,
"is_active" : false ,
"incident_count" : 120 ,
"source" : "servicenow" ,
"activated_at" : "2024-02-15T14:00:00Z" ,
"created_at" : "2024-02-15T13:45:00Z" ,
"updated_at" : "2024-03-01T10:00:00Z"
}
],
"total" : 5 ,
"active_version_id" : "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
}
Get Active Version
Retrieve the currently active dataset version.
Response
Whether the request was successful
Active version object (null if no version is active) Structure matches DatasetVersionResponse from List Versions endpoint.
Example Request
curl https://api.example.com/api/knowledge-base/versions/active \
-H "Authorization: Bearer $TOKEN "
Example Response
{
"success" : true ,
"version" : {
"id" : "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d" ,
"version_number" : 5 ,
"collection_name" : "past_issues_v2" ,
"status" : "active" ,
"is_active" : true ,
"incident_count" : 150 ,
"source" : "upload" ,
"activated_at" : "2024-03-01T10:00:00Z" ,
"created_at" : "2024-03-01T09:30:00Z"
}
}
Get Version Details
Retrieve detailed information about a specific version.
Path Parameters
Response
Returns a single version object with full details (same structure as List Versions response).
Example Request
curl https://api.example.com/api/knowledge-base/versions/a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d \
-H "Authorization: Bearer $TOKEN "
Rollback to Previous Version
Activate a previous version, making it the current active dataset. Deactivates the currently active version.
Path Parameters
Request Body
Optional notes explaining the reason for rollback
Response
Whether the rollback was successful
UUID of the activated version
Example Request
curl -X POST https://api.example.com/api/knowledge-base/versions/b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e/rollback \
-H "Authorization: Bearer $TOKEN " \
-H "Content-Type: application/json" \
-d '{
"notes": "Rollback due to data quality issues in version 5"
}'
Example Response
{
"success" : true ,
"message" : "Rolled back to version 4" ,
"version_id" : "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
}
Delete Version
Permanently delete an inactive version and its associated Qdrant collection.
This operation is irreversible. Active versions cannot be deleted.
Path Parameters
Response
Whether the deletion was successful
Example Request
curl -X DELETE https://api.example.com/api/knowledge-base/versions/c3d4e5f6-a7b8-6c7d-0e1f-2a3b4c5d6e7f \
-H "Authorization: Bearer $TOKEN "
Example Response
{
"success" : true ,
"message" : "Version deleted"
}
Error Response (Active Version)
{
"success" : false ,
"message" : "Cannot delete active version"
}