Apply a bulk action to prompts

Base URL
https://{kibana_url}
  • POST /api/security_ai_assistant/prompts/_bulk_action
  • POST /s/{space_id}/api/security_ai_assistant/prompts/_bulk_action
Auth

Apply a bulk action to multiple prompts. The bulk action is applied to all prompts that match the filter or to the list of prompts by their IDs. This action allows for bulk create, update, or delete operations.

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Request body

create object[]

List of prompts to be created.

categories string[]

List of categories for the prompt.

color string

The color associated with the prompt.

consumer string

The consumer associated with the prompt.

content string required

The content of the prompt.

isDefault boolean

Whether this prompt should be the default.

isNewConversationDefault boolean

Whether this prompt should be the default for new conversations.

name string required

The name of the prompt.

promptType enum required

Type of the prompt (either system or quick).

Values: system quick
delete object

Criteria for deleting prompts in bulk.

ids string[] · min items: 1

Array of IDs to apply the action to.

query string

Query to filter the bulk action.

update object[]

List of prompts to be updated.

categories string[]

The updated categories for the prompt.

color string

The updated color associated with the prompt.

consumer string

The updated consumer for the prompt.

content string

The updated content for the prompt.

id string required

The ID of the prompt to update.

isDefault boolean

Whether this prompt should be the default.

isNewConversationDefault boolean

Whether the prompt should be the default for new conversations.

Responses

Indicates a successful call with the results of the bulk action.

application/json
attributes object required
errors object[]
err_code string

A code representing the error type.

message string required

A message describing the error encountered.

prompts object[] required

List of prompts that encountered errors.

id string required

The ID of the prompt that encountered an error.

name string

The name of the prompt that encountered an error.

status_code integer required

The HTTP status code associated with the error.

results object required
created object[] required

List of prompts that were created.

categories string[]

Categories associated with the prompt.

color string

The color associated with the prompt.

consumer string

The consumer that the prompt is associated with.

content string required

The content of the prompt.

createdAt string

The timestamp of when the prompt was created.

createdBy string

The user who created the prompt.

id string · format: nonempty · min length: 1 required

A string that does not contain only whitespace characters.

isDefault boolean

Whether this prompt is the default.

isNewConversationDefault boolean

Whether this prompt is the default for new conversations.

name string required

The name of the prompt.

namespace string

Kibana space where the prompt is located.

promptType enum required

Type of the prompt (either system or quick).

Values: system quick
timestamp string · format: nonempty · min length: 1

A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.

updatedAt string

The timestamp of when the prompt was last updated.

updatedBy string

The user who last updated the prompt.

users object[]

List of users associated with the prompt.

id string

User id.

name string

User name.

deleted string[] required

List of IDs of prompts that were deleted.

skipped object[] required

List of prompts that were skipped.

id string required

The ID of the prompt that was skipped.

name string

The name of the prompt that was skipped.

skip_reason enum required

Reason why a prompt was skipped during the bulk action.

Values: PROMPT_FIELD_NOT_MODIFIED
updated object[] required

List of prompts that were updated.

Same fields as created in results
summary object required
failed integer required

The number of failed actions.

skipped integer required

The number of skipped actions.

succeeded integer required

The number of successfully performed actions.

total integer required

The total number of actions attempted.

message string

A message describing the result of the bulk action.

prompts_count integer

The number of prompts processed in the bulk action.

status_code integer

The HTTP status code of the response.

success boolean

Indicates if the bulk action was successful.

Indicates a generic error due to a bad request.

application/json
error string

A short error message.

message string

A detailed error message.

statusCode number

The HTTP status code for the error.

Base URL
https://{kibana_url}