PUT /api/security_ai_assistant/knowledge_base/entries/{id}

Spaces method and path for this operation:

put /s/{space_id}/api/security_ai_assistant/knowledge_base/entries/{id}

Refer to Spaces for more information.

Update an existing Knowledge Base Entry by its unique id.

Path parameters

  • id string(nonempty) Required

    The unique identifier (id) of the Knowledge Base Entry to update.

    Minimum length is 1.

application/json

Body object Required

Any of:

Responses

  • 200 application/json

    Successful request returning the updated Knowledge Base Entry.

    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.

PUT /api/security_ai_assistant/knowledge_base/entries/{id}
curl \
 --request PUT 'http://localhost:5601/api/security_ai_assistant/knowledge_base/entries/12345' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"How to reset a password (updated)","type":"document","kbResource":"user","source":"manual","text":"Updated: go to settings and click Reset Password, then follow the on-screen instructions."}'
Request example
{
  "kbResource": "user",
  "name": "How to reset a password (updated)",
  "source": "manual",
  "text": "Updated: go to settings and click Reset Password, then follow the on-screen instructions.",
  "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 (updated)",
  "namespace": "default",
  "source": "manual",
  "text": "Updated: go to settings and click Reset Password, then follow the on-screen instructions.",
  "type": "document",
  "updatedAt": "2024-01-15T10:05:00.000Z",
  "updatedBy": "user@example.com"
}
Response examples (400)
{
  "error": "Invalid input",
  "message": "The 'text' field cannot be empty."
}