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 'http://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":[{"content":"Hello","role":"system","timestamp":"2023-10-31T12:00:00Z"}],"apiConfig":{"connectorId":"12345","actionTypeId":"67890"},"replacements":{},"excludeFromLastConversationStorage":false}'
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",
"createdBy": {
"id": "user1",
"name": "John Doe"
},
"excludeFromLastConversationStorage": false,
"id": "abc123",
"messages": [
{
"content": "Hello, how can I assist you today?",
"role": "system",
"timestamp": "2023-10-31T12:00:00Z"
}
],
"namespace": "default",
"replacements": {},
"title": "Security Discussion",
"updatedAt": "2023-10-31T12:01:00Z",
"users": [
{
"id": "user1",
"name": "John Doe"
}
]
}
Response examples (400)
{
"error": "Bad Request",
"message": "Missing required parameter: title",
"statusCode": 400
}