Knowledge API
API endpoints for managing knowledge entries in the Kubiya platform
Knowledge API
The Knowledge API allows you to create, retrieve, update, and delete knowledge entries in the Kubiya platform. Knowledge entries provide contextual information that can be used by teammates and tools to improve their performance.
Endpoints
Method | Path | Description |
---|---|---|
GET | /api/v1/knowledge | List all knowledge entries |
GET | /api/v1/knowledge/{knowledgeId} | Get knowledge entry details |
POST | /api/v1/knowledge | Create a new knowledge entry |
PUT | /api/v1/knowledge/{knowledgeId} | Update a knowledge entry |
DELETE | /api/v1/knowledge/{knowledgeId} | Delete a knowledge entry |
GET | /api/v1/knowledge/search | Search knowledge entries |
GET | /api/v1/knowledge/{knowledgeId}/versions | Get knowledge entry version history |
Common Response Status Codes
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid parameters or request body |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn't exist |
500 | Internal Server Error |
Error Response Format
List Knowledge Entries
Retrieve a list of all knowledge entries in your organization.
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
tag | string | No | Filter by tag |
limit | integer | No | Maximum number of entries to return (default: 50) |
page | integer | No | Page number for pagination |
sort | string | No | Sort field (e.g., "created_at", "updated_at") |
order | string | No | Sort order ("asc" or "desc") |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
Create Knowledge Entry
Create a new knowledge entry in your organization.
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Required Fields
title
: Title of the knowledge entrycontent
: Content of the knowledge entryvisibility
: Visibility level ("private", "organization", "public")
Response
Get Knowledge Entry
Retrieve a specific knowledge entry by ID.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
knowledgeId | string | Yes | ID of the knowledge entry to retrieve |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
Update Knowledge Entry
Update an existing knowledge entry.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
knowledgeId | string | Yes | ID of the knowledge entry to update |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Response
Delete Knowledge Entry
Delete a knowledge entry.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
knowledgeId | string | Yes | ID of the knowledge entry to delete |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
A successful delete operation returns an HTTP 200 status with no response body.
Search Knowledge
Search for knowledge entries based on keywords or tags.
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
query | string | Yes | Search query |
tags | array | No | Filter by tags |
visibility | string | No | Filter by visibility |
limit | integer | No | Maximum number of entries to return (default: 50) |
page | integer | No | Page number for pagination |
sort | string | No | Sort field (e.g., "relevance", "created_at") |
order | string | No | Sort order ("asc" or "desc") |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
Get Knowledge Entry Version History
Retrieve the version history of a knowledge entry.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
knowledgeId | string | Yes | ID of the knowledge entry |
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
limit | integer | No | Maximum number of versions to return (default: 50) |
page | integer | No | Page number for pagination |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
Knowledge entries can be used by teammates to provide context-aware responses and by tools to access relevant information during execution.
Example Usage
Knowledge entries are a powerful way to provide context and guidance to your teammates. Make sure to keep them up to date and well-organized with appropriate tags.
Common Errors
HTTP Status | Description |
---|---|
400 | Bad Request - Invalid request body or missing required fields |
401 | Unauthorized - API key is missing or invalid |
403 | Forbidden - The API key doesn't have permission to perform this action |
404 | Not Found - The specified knowledge entry was not found |
500 | Internal Server Error - An unexpected error occurred on the server |
Next Steps
After setting up knowledge entries, you can: