Create a conversation
Create a new Security AI Assistant conversation. This endpoint allows the user to initiate a conversation with the Security AI Assistant by providing the required parameters.
Body Required
-
LLM API configuration.
-
The conversation category.
Values are
assistant
orinsights
. -
Exclude from last conversation storage.
-
The conversation id.
-
The conversation messages.
AI assistant conversation message.
-
Replacements object used to anonymize/deanonymize messages
-
The conversation title.
POST /api/security_ai_assistant/current_user/conversations
curl \ --request POST 'https://<KIBANA_URL>/api/security_ai_assistant/current_user/conversations' \ --header "Authorization: $API_KEY" \ --header "Content-Type: application/json" \ --data '{"title":"Security Discussion","category":"assistant","messages":[{"role":"system","content":"Hello, how can I assist you today?","timestamp":"2023-10-31T12:00:00Z"}],"apiConfig":{"connectorId":"12345","actionTypeId":"67890"},"replacements":{},"excludeFromLastConversationStorage":false}'
Request example
{ "title": "Security Discussion", "category": "assistant", "messages": [ { "role": "system", "content": "Hello, how can I assist you today?", "timestamp": "2023-10-31T12:00:00Z" } ], "apiConfig": { "connectorId": "12345", "actionTypeId": "67890" }, "replacements": {}, "excludeFromLastConversationStorage": false }
Response examples (200)
{ "id": "abc123", "title": "Security Discussion", "users": [ { "id": "user1", "name": "John Doe" } ], "category": "assistant", "messages": [ { "role": "system", "content": "Hello, how can I assist you today?", "timestamp": "2023-10-31T12:00:00Z" } ], "apiConfig": { "connectorId": "12345", "actionTypeId": "67890" }, "createdAt": "2023-10-31T12:01:00Z", "updatedAt": "2023-10-31T12:01:00Z", "replacements": {}, "excludeFromLastConversationStorage": false }