Applies a bulk action to multiple Knowledge Base Entries

POST /api/security_ai_assistant/knowledge_base/entries/_bulk_action

Spaces method and path for this operation:

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

Refer to Spaces for more information.

The bulk action is applied to all Knowledge Base Entries that match the filter or to the list of Knowledge Base Entries by their IDs.

application/json

Body

  • create array[object]

    List of Knowledge Base Entries to create.

    Any of:
  • delete object
    Hide delete attributes Show delete attributes object
    • ids array[string]

      Array of Knowledge Base Entry IDs.

      At least 1 element.

    • query string

      Query to filter Knowledge Base Entries.

  • update array[object]

    List of Knowledge Base Entries to update.

    Any of:

Responses

  • 200 application/json

    Successful bulk operation request

    Hide response attributes Show response attributes object
    • attributes object Required
      Hide attributes attributes Show attributes attributes object
      • errors array[object]

        List of errors encountered during the bulk action.

        Hide errors attributes Show errors attributes object
        • err_code string

          Specific error code for the issue.

        • knowledgeBaseEntries array[object] Required

          List of Knowledge Base Entries that encountered the error.

          Hide knowledgeBaseEntries attributes Show knowledgeBaseEntries attributes object
          • id string Required

            ID of the Knowledge Base Entry that encountered an error.

          • name string

            Name of the Knowledge Base Entry that encountered an error.

        • message string Required

          Error message describing the issue.

        • statusCode integer Required

          HTTP status code associated with the error.

      • results object Required
        Hide results attributes Show results attributes object
        • created array[object] Required

          List of Knowledge Base Entries that were successfully created.

          Any of:
        • deleted array[string] Required

          List of IDs of Knowledge Base Entries that were successfully deleted.

        • skipped array[object] Required

          List of Knowledge Base Entries that were skipped during the bulk action.

          Hide skipped attributes Show skipped attributes object
          • id string Required

            ID of the skipped Knowledge Base Entry.

          • name string

            Name of the skipped Knowledge Base Entry.

          • skip_reason string Required

            Reason why a Knowledge Base Entry was skipped during the bulk action.

            Value is KNOWLEDGE_BASE_ENTRY_NOT_MODIFIED.

        • updated array[object] Required

          List of Knowledge Base Entries that were successfully updated.

          Any of:
      • summary object Required
        Hide summary attributes Show summary attributes object
        • failed integer Required

          Number of Knowledge Base Entries that failed during the bulk action.

        • skipped integer Required

          Number of Knowledge Base Entries that were skipped during the bulk action.

        • succeeded integer Required

          Number of Knowledge Base Entries that were successfully processed during the bulk action.

        • total integer Required

          Total number of Knowledge Base Entries involved in the bulk action.

    • knowledgeBaseEntriesCount integer

      Total number of Knowledge Base Entries processed.

    • message string

      Message describing the result of the bulk action.

    • statusCode integer

      HTTP status code of the response.

    • success boolean

      Indicates whether the bulk action was successful.

  • 400 application/json

    Generic Error

    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/_bulk_action
curl \
 --request POST 'https://localhost:5601/api/security_ai_assistant/knowledge_base/entries/_bulk_action' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"create":[{"title":"New Entry","content":"This is the content of the new entry."}],"delete":{"ids":["123","456","789"],"query":"status:active AND category:technology"},"update":[{"id":"123","title":"Updated Entry","content":"Updated content."}]}'