Apply a bulk action to prompts
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.
POST /api/security_ai_assistant/prompts/_bulk_action
curl \
-X POST https://localhost:5601/api/security_ai_assistant/prompts/_bulk_action \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request examples
{
"create": [
{
"categories": [
"string"
],
"color": "string",
"consumer": "string",
"content": "string",
"isDefault": true,
"isNewConversationDefault": true,
"name": "string",
"promptType": "system"
}
],
"delete": {
"ids": [
"string"
],
"query": "string"
},
"update": [
{
"categories": [
"string"
],
"color": "string",
"consumer": "string",
"content": "string",
"id": "string",
"isDefault": true,
"isNewConversationDefault": true
}
]
}
Response examples (200)
{
"attributes": {
"errors": [
{
"err_code": "string",
"message": "string",
"prompts": [
{
"id": "string",
"name": "string"
}
],
"status_code": 42
}
],
"results": {
"created": [
{
"categories": [
"string"
],
"color": "string",
"consumer": "string",
"content": "string",
"createdAt": "string",
"createdBy": "string",
"id": "string",
"isDefault": true,
"isNewConversationDefault": true,
"name": "string",
"namespace": "string",
"promptType": "system",
"timestamp": "string",
"updatedAt": "string",
"updatedBy": "string",
"users": [
{
"id": "string",
"name": "string"
}
]
}
],
"deleted": [
"string"
],
"skipped": [
{
"id": "string",
"name": "string",
"skip_reason": "PROMPT_FIELD_NOT_MODIFIED"
}
],
"updated": [
{
"categories": [
"string"
],
"color": "string",
"consumer": "string",
"content": "string",
"createdAt": "string",
"createdBy": "string",
"id": "string",
"isDefault": true,
"isNewConversationDefault": true,
"name": "string",
"namespace": "string",
"promptType": "system",
"timestamp": "string",
"updatedAt": "string",
"updatedBy": "string",
"users": [
{
"id": "string",
"name": "string"
}
]
}
]
},
"summary": {
"failed": 42,
"skipped": 42,
"succeeded": 42,
"total": 42
}
},
"message": "string",
"prompts_count": 42,
"status_code": 42,
"success": true
}
Response examples (400)
{
"error": "string",
"message": "string",
"statusCode": 42.0
}