Spaces method and path for this operation:
post /s/{space_id}/api/security_ai_assistant/prompts/_bulk_action
Refer to Spaces for more information.
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.
POST
/api/security_ai_assistant/prompts/_bulk_action
curl \
--request POST 'https://localhost:5601/api/security_ai_assistant/prompts/_bulk_action' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"create":[{"content":"Please verify the security settings.","name":"New Security Prompt","promptType":"system"}],"delete":{"ids":["prompt1","prompt2"]},"update":[{"content":"Updated content for security prompt.","id":"prompt123"}]}'
Request example
{
"create": [
{
"content": "Please verify the security settings.",
"name": "New Security Prompt",
"promptType": "system"
}
],
"delete": {
"ids": [
"prompt1",
"prompt2"
]
},
"update": [
{
"content": "Updated content for security prompt.",
"id": "prompt123"
}
]
}
Response examples (200)
{
"attributes": {
"errors": [],
"results": {
"created": [
{
"content": "Please verify the security settings.",
"id": "prompt6",
"name": "New Security Prompt",
"promptType": "system"
}
],
"deleted": [
"prompt2",
"prompt3"
],
"skipped": [
{
"id": "prompt4",
"name": "Security Prompt",
"skip_reason": "PROMPT_FIELD_NOT_MODIFIED"
}
],
"updated": [
{
"content": "Updated security settings prompt",
"id": "prompt1",
"name": "Security Prompt",
"promptType": "system"
}
]
},
"summary": {
"failed": 0,
"skipped": 1,
"succeeded": 4,
"total": 5
}
},
"message": "Bulk action completed successfully.",
"prompts_count": 5,
"status_code": 200,
"success": true
}