POST /api/security_ai_assistant/knowledge_base/entries

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Create a Knowledge Base Entry

application/json

Body object Required

Any of:

Responses

  • 200 application/json

    Successful request returning Knowledge Base Entries

    Any of:
  • 400 application/json

    Bad Request response.

    Hide response attributes Show response attributes object
    • error string Required

      Error type or category.

    • message string Required

      Detailed error message.

    • statusCode number Required

      HTTP status code of the error.

POST /api/security_ai_assistant/knowledge_base/entries
curl \
 --request POST 'http://localhost:5601/api/security_ai_assistant/knowledge_base/entries' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"How to reset a password","type":"document","kbResource":"user","source":"manual","text":"To reset your password, go to the settings page and click Reset Password."}'
Request example
{
  "kbResource": "user",
  "name": "How to reset a password",
  "source": "manual",
  "text": "To reset your password, go to the settings page and click 'Reset Password'.",
  "type": "document"
}
Response examples (200)
{
  "createdAt": "2024-01-15T10:00:00.000Z",
  "createdBy": "user@example.com",
  "global": false,
  "id": "12345",
  "kbResource": "user",
  "name": "How to reset a password",
  "namespace": "default",
  "source": "manual",
  "text": "To reset your password, go to the settings page and click 'Reset Password'.",
  "type": "document",
  "updatedAt": "2024-01-15T10:00:00.000Z",
  "updatedBy": "user@example.com"
}
Response examples (400)
{
  "error": "Invalid input",
  "message": "The 'name' field is required."
}