Publish curated Knowledge Hub source from 2ed833f290b439a7bc91e5fd19b042c269e3bee9

This commit is contained in:
Public Source Publisher committed 2026-10-03 17:07:21 +00:00
1 parent 10f2edcd29
commit 59f15b2d08
218 files changed
+23995 -1849

No files matched your search

+454 -1
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: ItWorx Knowledge Hub API
version: 0.1.0-draft
version: 1.0.0-rc.1
description: |
Versioned API for the ItWorx Knowledge Hub web client and scoped automation.
This is not an MCP transport. The future MCP service will consume this API.
@@ -29,6 +29,9 @@ tags:
- name: Activity
- name: Workspace
- name: Ingestion proposals
- name: Preferences
- name: DataSources
- name: Jobs
security:
- cookieAuth: []
- bearerAuth: []
@@ -777,6 +780,59 @@ paths:
$ref: "#/components/schemas/SearchResponse"
"401":
$ref: "#/components/responses/Unauthorized"
/unified-search:
get:
tags: [Search]
operationId: searchWorkspaceContent
description: >-
Human reader session only. Searches visible knowledge, projects, reviewed
services, runbooks and decisions in the current workspace. Trashed content
and hidden or archived services are excluded. Counts cover all five kinds;
`kind` filters the returned page. A `tag` filters exact, case-insensitive
page tags on knowledge, runbook and decision results and excludes projects
and services. An empty query returns no results unless `tag` is supplied. The
endpoint shares the search rate limit of 60 requests per effective remote IP
per minute. An invalid `kind` returns 422.
parameters:
- name: q
in: query
schema:
type: string
maxLength: 500
- name: kind
in: query
schema:
type: string
enum: [knowledge, projects, services, runbooks, decisions]
- name: tag
in: query
description: Exact, case-insensitive page tag; applies to knowledge, runbooks and decisions.
schema:
type: string
maxLength: 64
- $ref: "#/components/parameters/Cursor"
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 25
responses:
"200":
description: Permission-filtered, ranked results and complete grouped counts
content:
application/json:
schema:
$ref: "#/components/schemas/UnifiedSearchResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"422":
description: Invalid kind
"429":
description: Search request budget exhausted
/rag/publication-manifest:
get:
tags: [Rag]
@@ -3077,6 +3133,180 @@ paths:
application/problem+json:
schema:
$ref: "#/components/schemas/ProblemDetails"
/me/preferences:
get:
tags: [Preferences]
operationId: getMyPreferences
security: [{ cookieAuth: [] }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/UserPreferences" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
put:
tags: [Preferences]
operationId: updateMyPreferences
security: [{ cookieAuth: [] }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/UserPreferencesRequest" } } } }
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/UserPreferences" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"412": { $ref: "#/components/responses/PreconditionFailed" }
"428": { $ref: "#/components/responses/PreconditionRequired" }
/admin/platform-settings:
get:
tags: [Admin]
operationId: getPlatformSettings
security: [{ cookieAuth: [] }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/PlatformSettings" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
put:
tags: [Admin]
operationId: updatePlatformSettings
security: [{ cookieAuth: [] }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/PlatformSettingsRequest" } } } }
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/PlatformSettings" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"412": { $ref: "#/components/responses/PreconditionFailed" }
"428": { $ref: "#/components/responses/PreconditionRequired" }
/admin/data-sources:
get:
tags: [DataSources]
operationId: listDataSources
security: [{ cookieAuth: [] }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/DataSourceList" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
post:
tags: [DataSources]
operationId: registerDataSource
security: [{ cookieAuth: [] }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/DataSourceRegistration" } } } }
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/DataSource" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/admin/data-sources/{id}:
put:
tags: [DataSources]
operationId: configureDataSource
security: [{ cookieAuth: [] }]
parameters: [{ name: id, in: path, required: true, schema: { type: string, format: uuid } }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/DataSourceConfiguration" } } } }
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/DataSource" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"412": { $ref: "#/components/responses/PreconditionFailed" }
"428": { $ref: "#/components/responses/PreconditionRequired" }
/admin/data-sources/{id}/observations:
post:
tags: [DataSources]
operationId: reportDataSourceObservation
security: [{ cookieAuth: [] }]
parameters: [{ name: id, in: path, required: true, schema: { type: string, format: uuid } }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/DataSourceObservation" } } } }
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/DataSource" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/admin/backups/status:
get:
tags: [Backups]
operationId: getBackupStatus
security: [{ cookieAuth: [] }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackupStatus" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/admin/backups/{backupId}/protection:
put:
tags: [Backups]
operationId: setBackupProtection
security: [{ cookieAuth: [] }]
parameters: [{ name: backupId, in: path, required: true, schema: { type: string } }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/BackupProtectionRequest" } } } }
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackupEvidence" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
"412": { $ref: "#/components/responses/PreconditionFailed" }
"428": { $ref: "#/components/responses/PreconditionRequired" }
/admin/audit-log:
get:
tags: [Admin]
operationId: listAdminAuditLog
security: [{ cookieAuth: [] }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/AdminAuditList" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/jobs:
get:
tags: [Jobs]
operationId: listBackgroundJobs
security: [{ cookieAuth: [] }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackgroundJobList" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/jobs/course-tagging:
post:
tags: [Jobs]
operationId: queueCourseTaggingJob
security: [{ cookieAuth: [] }]
parameters: [{ $ref: "#/components/parameters/RequiredIdempotencyKey" }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/QueueCourseTaggingJobRequest" } } } }
responses:
"202": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackgroundJob" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/jobs/backups:
post:
tags: [Jobs]
operationId: queueBackupJob
security: [{ cookieAuth: [] }]
parameters: [{ $ref: "#/components/parameters/RequiredIdempotencyKey" }]
requestBody: { required: true, content: { application/json: { schema: { $ref: "#/components/schemas/QueueBackupJobRequest" } } } }
responses:
"202": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackgroundJob" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/jobs/{jobId}:
get:
tags: [Jobs]
operationId: getBackgroundJob
security: [{ cookieAuth: [] }]
parameters: [{ name: jobId, in: path, required: true, schema: { type: string, format: uuid } }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackgroundJob" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/jobs/{jobId}/cancel:
post:
tags: [Jobs]
operationId: cancelBackgroundJob
security: [{ cookieAuth: [] }]
parameters: [{ name: jobId, in: path, required: true, schema: { type: string, format: uuid } }]
responses:
"200": { description: Persisted result, content: { application/json: { schema: { $ref: "#/components/schemas/BackgroundJob" } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
/jobs/{jobId}/events:
get:
tags: [Jobs]
operationId: streamBackgroundJobEvents
security: [{ cookieAuth: [] }]
parameters: [{ name: jobId, in: path, required: true, schema: { type: string, format: uuid } }]
responses:
"200": { description: Job and progress Server-Sent Events with heartbeat and terminal close, content: { text/event-stream: { schema: { type: string } } } }
"401": { $ref: "#/components/responses/Unauthorized" }
"403": { $ref: "#/components/responses/Forbidden" }
components:
securitySchemes:
cookieAuth:
@@ -3248,6 +3478,194 @@ components:
schema:
$ref: "#/components/schemas/ProblemDetails"
schemas:
UserPreferencesRequest:
type: object
required: [theme, density, primaryNavigationCollapsed, contextPanelOpen, navigationOrder, dashboardWidgetOrder, hiddenDashboardWidgets, defaultLandingPage, catalogView, contextPanelWidth, navigationWidth]
properties:
theme: { type: string, enum: [system, light, dark] }
density: { type: string, enum: [comfortable, compact] }
primaryNavigationCollapsed: { type: boolean }
contextPanelOpen: { type: boolean }
navigationOrder: { type: array, items: { type: string } }
dashboardWidgetOrder: { type: array, items: { type: string } }
hiddenDashboardWidgets: { type: array, items: { type: string } }
defaultLandingPage: { type: string }
catalogView: { type: string, enum: [grid, list] }
contextPanelWidth: { type: integer, minimum: 256, maximum: 440 }
navigationWidth: { type: integer, minimum: 192, maximum: 320 }
UserPreferences:
allOf:
- $ref: "#/components/schemas/UserPreferencesRequest"
- type: object
required: [schemaVersion, eTag, isDefault, updatedAt]
properties:
schemaVersion: { type: integer, enum: [1] }
eTag: { type: string }
isDefault: { type: boolean }
updatedAt: { type: [string, "null"], format: date-time }
PlatformSettingsRequest:
type: object
required: [displayName, primaryLocale, timeZone, ingestionProposals, backupPolicyExpectation, inventoryFreshnessPolicy]
properties:
displayName: { type: string, minLength: 1, maxLength: 200 }
primaryLocale: { type: string }
timeZone: { type: string }
ingestionProposals: { type: object, required: [enabled, maximumSourceCount, maximumSourceBytes, failedRetryLimit], properties: { enabled: { type: boolean }, maximumSourceCount: { type: integer, minimum: 1, maximum: 20 }, maximumSourceBytes: { type: integer, format: int64 }, failedRetryLimit: { type: integer, minimum: 1, maximum: 3 } } }
backupPolicyExpectation: { type: object, required: [expectedIntervalHours, scheduleDescription, dailyRetentionCount, weeklyRetentionCount, monthlyRetentionCount, protectedBackupCount, restoreVerificationMaxAgeDays], properties: { expectedIntervalHours: { type: integer }, scheduleDescription: { type: string }, dailyRetentionCount: { type: integer }, weeklyRetentionCount: { type: integer }, monthlyRetentionCount: { type: integer }, protectedBackupCount: { type: integer }, restoreVerificationMaxAgeDays: { type: integer } } }
inventoryFreshnessPolicy: { type: object, required: [warningAfterHours], properties: { warningAfterHours: { type: integer } } }
PlatformSettings:
allOf:
- $ref: "#/components/schemas/PlatformSettingsRequest"
- type: object
required: [schemaVersion, eTag, isDefault, updatedAt]
properties:
schemaVersion: { type: integer, enum: [1] }
eTag: { type: string }
isDefault: { type: boolean }
updatedAt: { type: [string, "null"], format: date-time }
backupPolicyExpectation: { type: object, description: Includes enforcement External; configured schedule is an expectation, not a scheduler run. }
DataSourceRegistration:
type: object
required: [sourceKey, displayName, kind, expectedIntervalHours]
properties:
sourceKey: { type: string, maxLength: 200 }
displayName: { type: string, maxLength: 120 }
kind: { type: string, enum: [Inventory, Gitea, KnowledgeClient, ManualIntake, LeafWiki, CuratedPackage] }
expectedIntervalHours: { type: integer, minimum: 1, maximum: 8760 }
DataSourceConfiguration:
type: object
required: [displayName, enabled, expectedIntervalHours]
properties:
displayName: { type: string, maxLength: 120 }
enabled: { type: boolean }
expectedIntervalHours: { type: integer, minimum: 1, maximum: 8760 }
DataSourceObservation:
type: object
required: [success]
properties:
success: { type: boolean }
recordCount: { type: [integer, "null"], format: int64 }
errorCode: { type: [string, "null"] }
correlationId: { type: [string, "null"], maxLength: 100 }
DataSource:
type: object
required: [id, sourceKey, displayName, kind, enabled, state, configurationState, syncAuthority, expectedIntervalHours, eTag, actions]
properties:
id: { type: string, format: uuid }
sourceKey: { type: string }
displayName: { type: string }
kind: { type: string }
enabled: { type: boolean }
state: { type: string, enum: [Unknown, Current, Stale, Failed, Disabled] }
configurationState: { type: string }
syncAuthority: { type: string }
expectedIntervalHours: { type: integer }
lastAttemptAt: { type: [string, "null"], format: date-time }
lastSuccessAt: { type: [string, "null"], format: date-time }
lastFailureAt: { type: [string, "null"], format: date-time }
dataObservedAt: { type: [string, "null"], format: date-time }
recordCount: { type: [integer, "null"], format: int64 }
lastErrorCode: { type: [string, "null"] }
lastCorrelationId: { type: [string, "null"] }
eTag: { type: string }
actions: { type: array, items: { type: string } }
DataSourceList:
type: object
required: [items, nextCursor]
properties:
items: { type: array, items: { $ref: "#/components/schemas/DataSource" } }
nextCursor: { type: [string, "null"] }
BackupProtectionRequest:
type: object
required: [protected]
properties:
protected: { type: boolean }
BackupEvidence:
type: object
required: [protected, protectionVersion]
properties:
protected: { type: boolean }
protectionVersion: { type: integer }
integrityVerifiedAt: { type: [string, "null"], format: date-time }
restoreVerifiedAt: { type: [string, "null"], format: date-time }
lastRestoreSucceeded: { type: [boolean, "null"] }
BackupStatus:
type: object
required: [state, scheduleAuthority, scheduleDescription, restoreConfidence, storedBackupBytes, protectedCount, expectedIntervalHours, applicationRetentionCount, dailyRetentionExpectation, weeklyRetentionExpectation, monthlyRetentionExpectation, restoreVerificationMaxAgeDays]
properties:
state: { type: string, enum: [Unknown, Current, Stale] }
scheduleAuthority: { type: string, enum: [External] }
scheduleDescription: { type: string }
nextScheduledRun: { type: [string, "null"], format: date-time }
nextExpectedBy: { type: [string, "null"], format: date-time }
lastSuccessfulBackupAt: { type: [string, "null"], format: date-time }
lastIntegrityVerifiedAt: { type: [string, "null"], format: date-time }
lastVerifiedRestoreAt: { type: [string, "null"], format: date-time }
restoreConfidence: { type: string, enum: [Unknown, Stale, Verified] }
storedBackupBytes: { type: integer, format: int64, description: Sum of stored backup manifest sizes; not filesystem capacity. }
protectedCount: { type: integer }
expectedIntervalHours: { type: integer }
applicationRetentionCount: { type: integer }
dailyRetentionExpectation: { type: integer }
weeklyRetentionExpectation: { type: integer }
monthlyRetentionExpectation: { type: integer }
restoreVerificationMaxAgeDays: { type: integer }
AdminAuditList:
type: object
required: [items, nextCursor]
properties:
items: { type: array, items: { $ref: "#/components/schemas/AdminAuditItem" } }
nextCursor: { type: [integer, "null"], format: int64 }
AdminAuditItem:
type: object
required: [id, actorKind, source, action, summary, occurredAt]
properties:
id: { type: integer, format: int64 }
actorKind: { type: string }
actorId: { type: [string, "null"], format: uuid }
source: { type: string }
action: { type: string }
targetType: { type: [string, "null"] }
targetId: { type: [string, "null"] }
summary: { type: string }
occurredAt: { type: string, format: date-time }
correlationId: { type: [string, "null"] }
QueueCourseTaggingJobRequest:
type: object
required: [rootPageId, tag]
properties:
rootPageId: { type: string, format: uuid }
tag: { type: string }
QueueBackupJobRequest: { type: object, description: Empty object; the job snapshots the current server-side backup policy. }
BackgroundJob:
type: object
required: [id, workspaceId, actorId, type, status, createdAt, cancelRequested, progress, total, processed, succeeded, skipped, failed, errors, version]
properties:
id: { type: string, format: uuid }
workspaceId: { type: string, format: uuid }
actorId: { type: string, format: uuid }
type: { type: string }
status: { type: string, enum: [queued, running, succeeded, partially_succeeded, failed, cancelled] }
createdAt: { type: string, format: date-time }
startedAt: { type: [string, "null"], format: date-time }
completedAt: { type: [string, "null"], format: date-time }
cancelRequestedAt: { type: [string, "null"], format: date-time }
cancelRequested: { type: boolean }
progress: { type: integer, minimum: 0, maximum: 100 }
total: { type: integer }
processed: { type: integer }
succeeded: { type: integer }
skipped: { type: integer }
failed: { type: integer }
errors: { type: array, items: { type: object, properties: { code: { type: string }, message: { type: string }, itemId: { type: [string, "null"], format: uuid } } } }
result: { type: [object, "null"] }
correlationId: { type: [string, "null"] }
version: { type: integer, format: int64 }
BackgroundJobList:
type: object
required: [items]
properties:
items: { type: array, items: { $ref: "#/components/schemas/BackgroundJob" } }
CreateIngestionProposalRequest:
type: object
required: [manifest]
@@ -5243,6 +5661,41 @@ components:
$ref: "#/components/schemas/SearchResultItem"
nextCursor:
type: [string, "null"]
UnifiedSearchResponse:
type: object
required: [items, counts, nextCursor]
properties:
items:
type: array
items:
$ref: "#/components/schemas/UnifiedSearchResultItem"
counts:
$ref: "#/components/schemas/UnifiedSearchCounts"
nextCursor:
type: [string, "null"]
UnifiedSearchCounts:
type: object
required: [knowledge, projects, services, runbooks, decisions, total]
properties:
knowledge: { type: integer, minimum: 0 }
projects: { type: integer, minimum: 0 }
services: { type: integer, minimum: 0 }
runbooks: { type: integer, minimum: 0 }
decisions: { type: integer, minimum: 0 }
total: { type: integer, minimum: 0 }
UnifiedSearchResultItem:
type: object
required: [kind, id, title, summary, snippet, updatedAt, href]
properties:
kind:
type: string
enum: [knowledge, projects, services, runbooks, decisions]
id: { type: string, format: uuid }
title: { type: string }
summary: { type: string }
snippet: { type: string }
updatedAt: { type: string, format: date-time }
href: { type: string, description: Same-origin relative route to the result. }
RagPublicationManifestItem:
type: object
description: >-