List all knowledge base entries Beta

GET /v1/training

Returns a list of all knowledge base entries belonging to your organization. This endpoint allows you to view all your training data in one place, with optional filtering by status or type. You can use this to monitor the overall state of your knowledge base, check which entries are still processing, and identify any that might have encountered errors. The response includes detailed information about each entry including its content, status, and metadata.

Headers

Query parameters

  • status string

    Filter to show only knowledge base entries with a specific processing status (e.g., READY, PROCESSING, ERR_FILE_PROCESSING)

    Values are AWAITING_UPLOAD, SUPABASE_ONLY, PROCESSING, READY, SYNC_ERROR, ERR_FILE_PROCESSING, ERR_TEXT_PROCESSING, ERR_TEXT_TO_VECTOR, or BLANK.

  • type string

    Filter to show only knowledge base entries of a specific type (e.g., text, file_upload, url, training_history)

    Values are file_upload, url, training_history, or text.

  • page string

    The page number for paginated results (starts at 1). Use this to navigate through large result sets.

    Format should match the following pattern: ^\d+$. Default value is 1.

  • limit string

    The maximum number of knowledge base entries to return per page (up to 100). Use this to control result set size.

    Format should match the following pattern: ^\d+$. Default value is 100.

Responses

  • 200 application/json

    List of knowledge base entries returned successfully.

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates if the list operation was successful

    • items array[object] Required

      Array of knowledge base entries matching your query parameters

      Hide items attributes Show items attributes object
      • id integer Required

        The unique identifier for this knowledge base entry. Use this ID in subsequent API calls to update or delete this entry.

      • replica_uuid string | null Required

        The unique identifier of the replica that owns this knowledge base entry. This links the training data to a specific replica.

      • type string Required

        The category of knowledge base entry, indicating how the content was added and how it should be processed.

        Values are file_upload, url, training_history, or text.

      • filename string | null Required

        For file_upload entries, the original filename that was uploaded. This helps identify the source of the content.

      • status string Required

        The current stage in the processing pipeline. Use this to track progress and identify any issues with processing.

        Values are AWAITING_UPLOAD, SUPABASE_ONLY, PROCESSING, READY, SYNC_ERROR, ERR_FILE_PROCESSING, ERR_TEXT_PROCESSING, ERR_TEXT_TO_VECTOR, or BLANK.

      • raw_text string | null Required

        The original, unmodified text content that was submitted for training. May be truncated for large entries.

      • processed_text string | null Required

        The optimized version of the text after system processing. This is what gets converted to vectors for retrieval.

      • created_at string(date-time) Required

        ISO 8601 timestamp when this knowledge base entry was first created.

      • updated_at string(date-time) Required

        ISO 8601 timestamp when this knowledge base entry was last modified. Use this to track when processing completed.

      • title string | null Required

        Optional title for this knowledge base entry. Helps identify the content in listings.

      • description string | null Required

        Optional description providing more details about this knowledge base entry.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 415 application/json

    Unsupported Media Type

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

    • The inner exception

      Hide inner_exception attributes Show inner_exception attributes object
GET /v1/training
curl \
 --request GET 'https://api.sensay.io/v1/training' \
 --header "X-ORGANIZATION-SECRET: $API_KEY" \
 --header "X-API-Version: 2025-03-25"
Response examples (200)
{
  "success": true,
  "items": [
    {
      "id": 12345,
      "type": "text",
      "title": "Company Information",
      "status": "READY",
      "filename": null,
      "raw_text": "Our company was founded in 2020...",
      "created_at": "2025-04-15T08:11:00.093761+00:00",
      "updated_at": "2025-04-15T08:11:05.299349+00:00",
      "description": "Basic company details and policies",
      "replica_uuid": "03db5651-cb61-4bdf-9ef0-89561f7c9c53",
      "processed_text": "Our company was founded in 2020..."
    }
  ]
}
Response examples (400)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (401)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (404)
{
  "success": true,
  "error": "string",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (415)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (500)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "inner_exception": {
    "name": "Server overheated",
    "cause": "Request too complicated",
    "stack": "Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>...",
    "message": "The server overheated due to an unexpected situation"
  }
}