Create a KnowledgeBase

View as Markdown
POST /api/security_ai_assistant/knowledge_base

Spaces method and path for this operation:

post /s/{space_id}/api/security_ai_assistant/knowledge_base

Refer to Spaces for more information.

Query parameters

  • modelId string

    ELSER modelId to use when setting up the Knowledge Base. If not provided, a default model will be used.

  • ignoreSecurityLabs boolean

    Indicates whether we should or should not install Security Labs docs when setting up the Knowledge Base. Defaults to false.

    Default value is false.

Responses

  • 200 application/json

    Indicates a successful call.

    Hide response attribute Show response attribute object
    • success boolean

      Identify the success of the method execution.

  • 400 application/json

    Generic Error

    Hide response attributes Show response attributes object
    • error string

      A short description of the error.

    • message string

      A detailed error message.

    • statusCode number

      The HTTP status code of the error.

POST /api/security_ai_assistant/knowledge_base
curl \
 --request POST 'https://localhost:5601/api/security_ai_assistant/knowledge_base' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "success": true
}
Response examples (400)
statusCode: 400 error: Bad Request message: "[request query]: ignoreSecurityLabs: Invalid enum value. Expected 'true' | 'false', received 'yes', ignoreSecurityLabs: Expected boolean, received string"