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 '"{\n \"apiConfig\": {\n \"actionTypeId\": \"67890\",\n \"connectorId\": \"12345\"\n },\n \"category\": \"assistant\",\n \"excludeFromLastConversationStorage\": false,\n \"messages\": [\n {\n \"content\": \"Hello, how can I assist you today?\",\n \"role\": \"system\",\n \"timestamp\": \"2023-10-31T12:00:00Z\"\n }\n ],\n \"replacements\": {},\n \"title\": \"Security Discussion\"\n}"'
Request example
{
"apiConfig": {
"actionTypeId": "67890",
"connectorId": "12345"
},
"category": "assistant",
"excludeFromLastConversationStorage": false,
"messages": [
{
"content": "Hello, how can I assist you today?",
"role": "system",
"timestamp": "2023-10-31T12:00:00Z"
}
],
"replacements": {},
"title": "Security Discussion"
}
Response examples (200)
{
"apiConfig": {
"actionTypeId": "67890",
"connectorId": "12345"
},
"category": "assistant",
"createdAt": "2023-10-31T12:01:00Z",
"excludeFromLastConversationStorage": false,
"id": "abc123",
"messages": [
{
"content": "Hello, how can I assist you today?",
"role": "system",
"timestamp": "2023-10-31T12:00:00Z"
}
],
"replacements": {},
"title": "Security Discussion",
"updatedAt": "2023-10-31T12:01:00Z",
"users": [
{
"id": "user1",
"name": "John Doe"
}
]
}