Get knowledge base entry by ID Beta

GET /v1/training/{trainingID}

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

  • trainingID number | null Required

    The unique identifier of the knowledge base entry

Responses

  • 200 application/json

    The knowledge base entry returned successfully.

    Hide response attributes Show response 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 type 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.

    • url string

      For url entries, the original url 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

      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

    • 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/training/{trainingID}
curl \
 --request GET 'https://api.sensay.io/v1/training/12345' \
 --header "X-ORGANIZATION-SECRET: $API_KEY" \
 --header "X-API-Version: 2025-03-25"
Response examples (200)
{
  "id": 12345,
  "replica_uuid": "03db5651-cb61-4bdf-9ef0-89561f7c9c53",
  "type": "file_upload",
  "filename": "company_handbook.pdf",
  "url": "http://example.com",
  "status": "READY",
  "raw_text": "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.",
  "processed_text": "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.",
  "created_at": "2025-04-15T08:11:00.093761+00:00",
  "updated_at": "2025-04-15T08:15:05.299349+00:00",
  "title": "Company Information",
  "description": "Basic company details including founding date, business focus, and operating hours."
}
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"
  }
}