IngestIQ

Knowledge Bases

Knowledge Base management endpoints

List Knowledge Bases#

Get all knowledge bases for the current organization.

curl http://localhost:3000/api/v2/knowledgebases \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response#

{
  "knowledgebases": [
    {
      "id": "kb-uuid",
      "name": "Product Documentation",
      "description": "Technical docs for our product",
      "status": "active",
      "createdAt": "2024-01-28T12:00:00.000Z",
      "updatedAt": "2024-01-28T12:00:00.000Z"
    }
  ]
}

Create Knowledge Base#

Create a new knowledge base.

namestringrequired

Knowledge base name (max 100 characters)

descriptionstring

Optional description (max 500 characters)

metadataobject

Optional custom metadata

curl -X POST http://localhost:3000/api/v2/knowledgebases \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Engineering Runbooks",
    "description": "Operational runbooks and procedures",
    "metadata": {
      "department": "Engineering",
      "owners": ["team-lead@example.com"]
    }
  }'

Response#

{
  "id": "kb-uuid",
  "name": "Engineering Runbooks",
  "description": "Operational runbooks and procedures",
  "status": "active",
  "metadata": {
    "department": "Engineering",
    "owners": ["team-lead@example.com"]
  },
  "createdAt": "2024-01-28T12:00:00.000Z",
  "updatedAt": "2024-01-28T12:00:00.000Z"
}

Get Knowledge Base#

Get a specific knowledge base by ID.

curl http://localhost:3000/api/v2/knowledgebases/{kbId} \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response#

{
  "id": "kb-uuid",
  "name": "Engineering Runbooks",
  "description": "Operational runbooks and procedures",
  "status": "active",
  "metadata": {},
  "documentCount": 45,
  "pipelineCount": 2,
  "createdAt": "2024-01-28T12:00:00.000Z",
  "updatedAt": "2024-01-28T12:00:00.000Z"
}

Update Knowledge Base#

Update knowledge base properties.

namestring

New name

descriptionstring

New description

metadataobject

New metadata (replaces existing)

curl -X PUT http://localhost:3000/api/v2/knowledgebases/{kbId} \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Engineering Runbooks v2",
    "description": "Updated runbooks"
  }'

Response#

{
  "id": "kb-uuid",
  "name": "Engineering Runbooks v2",
  "description": "Updated runbooks",
  "status": "active",
  "updatedAt": "2024-01-28T14:00:00.000Z"
}

Update Status#

Activate or deactivate a knowledge base.

statusstringrequired

active or inactive

curl -X PUT http://localhost:3000/api/v2/knowledgebases/{kbId}/status \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "inactive"
  }'

Response#

{
  "id": "kb-uuid",
  "status": "inactive",
  "message": "Knowledge base deactivated"
}

Delete Knowledge Base#

Delete a knowledge base and all its contents.

This permanently deletes all documents, pipelines, and embeddings in the knowledge base.

curl -X DELETE http://localhost:3000/api/v2/knowledgebases/{kbId} \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response#

{
  "message": "Knowledge base deleted successfully"
}

Error Responses#

ErrorStatusDescription
KB_NOT_FOUND404Knowledge base not found
KB_NAME_EXISTS409Name already in use
INVALID_STATUS400Invalid status value
Documentation