Security AI Assistant API
Apply a bulk action to prompts
Spaces method and path for this operation:
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/security_ai_assistant/prompts/_bulk_action</span></div>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
Request body
Example request
{
"create": [
{
"categories": [
"security",
"verification"
],
"color": "blue",
"consumer": "admin",
"content": "Please verify the security settings.",
"isNewConversationDefault": true,
"name": "New Security Prompt"
}
],
"delete": {
"ids": [
"1234",
"5678"
],
"query": "status: 'inactive'"
},
"update": [
{
"categories": [
"security",
"alert"
],
"color": "green",
"consumer": "user123",
"content": "Updated content for security prompt.",
"id": "prompt123",
"isDefault": true
}
]
}Response
Indicates a successful call with the results of the bulk action.
Example response
{
"attributes": {
"results": {
"created": [
{
"id": "I am a string",
"timestamp": "2023-10-31T12:00:00Z",
"users": [
{
"id": "user123",
"name": "John Doe"
}
]
}
],
"updated": [
{
"id": "I am a string",
"timestamp": "2023-10-31T12:00:00Z",
"users": [
{
"id": "user123",
"name": "John Doe"
}
]
}
]
},
"summary": {
"skipped": 1,
"succeeded": 10,
"total": 12
}
},
"message": "Bulk action completed successfully.",
"prompts_count": 6,
"status_code": 200,
"success": true
}