Create a conversation
Spaces method and path for this operation:
post /s/{space_id}/api/security_ai_assistant/current_user/conversations
Refer to Spaces for more information.
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.
POST /api/security_ai_assistant/current_user/conversations
curl \ --request POST 'https://localhost:5601/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 }