Get knowledge base entry by ID Beta

GET /v1/replicas/{replicaUUID}/knowledge-base/{knowledgeBaseID}

Retrieves detailed information about a specific knowledge base entry using its ID. This endpoint returns the complete entry data including its type, status, content, and metadata. You can use this to check the processing status of your training content, view the raw and processed text, and see when it was created and last updated. This is useful for monitoring the progress of your training data as it moves through the processing pipeline.

Headers

  • X-API-Version string

    Default value is 2025-03-25.

Path parameters

  • knowledgeBaseID number Required

    The unique identifier of the knowledge base entry

  • replicaUUID string(uuid) Required

    The replica unique identifier (UUID)

Responses

  • 200 application/json

    The requested knowledge base entry.

    Hide response attributes Show response attributes object
    • id integer Required

      The unique identifier for this knowledge base entry.

    • replicaUUID string(uuid)

      The unique identifier of the replica associated to this knowledge base entry.

    • type string Required

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

      Values are file, text, website, or youtube.

    • url string

      The URL provided during entry creation, if applicable.

    • status string Required

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

      Values are NEW, FILE_UPLOADED, RAW_TEXT, PROCESSED_TEXT, VECTOR_CREATED, READY, or UNPROCESSABLE.

    • createdAt string(date-time) Required

      The ISO 8601 timestamp indicating when this knowledge base entry was created.

    • updatedAt string(date-time) Required

      The ISO 8601 timestamp indicating when this knowledge base entry was last updated. Useful for tracking the completion time of processing.

    • title string

      Title for the knowledge base entry, to help identify the knowledge base entry in listings. This field is not used in processing or internal logic.

    • generatedTitle string

      Auto-generated title for the knowledge base entry based on the content.

    • summary string

      A concise 1-2 sentence summary of rawText, generated by the system.

    • website object

      Website content related to the knowledge base entry

      Additional properties are NOT allowed.

      Hide website attributes Show website attributes object
      • url string(uri) Required

        URL of the website related to the knowledge base entry.

      • title string

        Title of the website.

      • text string

        Text content of the website.

      • description string

        A brief description of the website content based on extracted html.

      • autoRefresh boolean

        Whether to allow automatic content updates from the URL, handled by the system.

        Default value is false.

      • screenshotURL string

        Screenshot URL of the knowledge base entry.

    • youtube object

      YouTube content related to the knowledge base entry

      Additional properties are NOT allowed.

      Hide youtube attributes Show youtube attributes object
      • url string(uri) Required

        URL of the YouTube video related to the knowledge base entry

      • title string

        Title of the YouTube video

      • description string

        Description of the YouTube video

      • thumbnailURL string(uri)

        URL of the YouTube video thumbnail

      • summary string

        A concise 1-2 sentence summary of rawText.

      • transcription string

        Full transcript of the YouTube video.

      • visualTranscription string

        Visual transcription of the YouTube video

      • playlistID string

        ID of the YouTube playlist associated with this knowledge base entry

    • file object

      File content related to the knowledge base entry

      Additional properties are NOT allowed.

      Hide file attributes Show file attributes object
      • name string Required

        Name of the file associated with the knowledge base entry

      • size number | null

        Size of the file in bytes

      • mimeType string | null

        MIME type of the file

        Values are application/epub+zip, application/json, application/msword, application/pdf, application/rtf, application/vnd.ms-excel, application/vnd.ms-excel.sheet.binary.macroenabled.12, application/vnd.ms-excel.sheet.macroEnabled.12, application/vnd.ms-powerpoint, application/vnd.oasis.opendocument.spreadsheet, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/x-sas-data, application/x-sas-xport, application/x-stata, application/x-stata-dta, application/yaml, audio/aac, audio/flac, audio/mp3, audio/mpeg, audio/ogg, audio/wav, image/bmp, image/heic, image/heif, image/jpeg, image/png, image/tif, image/tiff, image/webp, text/css, text/csv, text/html, text/javascript, text/markdown, text/plain, text/tab-separated-values, text/xml, video/avi, video/mov, video/mp4, video/mpeg, video/mpg, video/webm, or video/x-matroska.

      • screenshotURL string

        Screenshot URL of the knowledge base entry.

      • downloadURL string(uri)

        Temporary signed URL for downloading the file

    • error object

      Error information related to the knowledge base entry

      Additional properties are NOT allowed.

      Hide error attributes Show error attributes object
      • fingerprint string

        A unique identifier of the error, useful for reporting

      • message string

        Error message associated with this knowledge base entry

    • rawText string

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

    • generatedFacts array[string]

      Generated facts related to the knowledge base entry.

    • rawTextChunks array[object]

      Segments of textual content that have been extracted from the original sources and split into smaller, manageable pieces.

      Hide rawTextChunks attributes Show rawTextChunks attributes object
      • content string
      • chunkIndex integer
      • chunkTokens integer
      • chunkChars integer
    • success boolean Required

      Indicates if the request was successful

  • 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

    • fingerprint string

      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

    • fingerprint string

      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

    • fingerprint string

      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

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

    • inner_exception object

      The inner exception

      Hide inner_exception attributes Show inner_exception attributes object
      • name string Required
      • message string Required
      • cause string
      • stack string
GET /v1/replicas/{replicaUUID}/knowledge-base/{knowledgeBaseID}
curl \
 --request GET 'https://api.sensay.io/v1/replicas/03db5651-cb61-4bdf-9ef0-89561f7c9c53/knowledge-base/12345' \
 --header "X-ORGANIZATION-SECRET: $API_KEY" \
 --header "X-API-Version: 2025-03-25"
Response examples (200)
{
  "id": 12345,
  "replicaUUID": "03db5651-cb61-4bdf-9ef0-89561f7c9c53",
  "type": "file",
  "url": "http://example.com",
  "status": "NEW",
  "createdAt": "2025-04-15T08:11:00.093761+00:00",
  "updatedAt": "2025-04-15T08:15:05.299349+00:00",
  "title": "Company information",
  "generatedTitle": "Company information and business hours",
  "summary": "Basic company details including founding date, business focus, and operating hours.",
  "website": {
    "url": "https://example.com",
    "html": "<html>...</html>",
    "text": "This is the main text content extracted from the website.",
    "links": [
      "https://example.com",
      "https://another-example.com"
    ],
    "title": "Example Website Title",
    "description": "Example Website Description",
    "screenshotURL": "https://example.com/screenshot.webp"
  },
  "youtube": {
    "url": "https://www.youtube.com/watch?v=VIDEO_ID",
    "title": "Example YouTube Video Title",
    "summary": "A concise summary of the key points covered in the video.",
    "description": "This is a description of the YouTube video content.",
    "thumbnailURL": "https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg",
    "transcription": "This is the complete transcript of the video content...",
    "visualTranscription": "Visual elements and scenes described in text format"
  },
  "file": {
    "name": "company_handbook.pdf",
    "size": 204800,
    "mimeType": "application/epub+zip",
    "downloadURL": "https://example.com/download/company_handbook.pdf?signed=...",
    "screenshotURL": "https://example.com/screenshot.webp"
  },
  "error": {
    "message": "Failed to process the entry due to invalid format.",
    "fingerprint": "12345"
  },
  "rawText": "Our company was founded in 2020. We specialize in AI-powered customer service solutions. Our business hours are Monday to Friday, 9 AM to 5 PM Eastern Time.",
  "generatedFacts": [
    "The company was founded in 2020.",
    "We specialize in AI-powered customer service solutions."
  ],
  "rawTextChunks": [
    {
      "content": "First part of the document content.",
      "chunkChars": 35,
      "chunkIndex": 0,
      "chunkTokens": 7
    },
    {
      "content": "Second part of the document content.",
      "chunkChars": 36,
      "chunkIndex": 1,
      "chunkTokens": 7
    }
  ],
  "success": true
}
Response examples (400)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (401)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (404)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (415)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (500)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "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"
  }
}