Spaces method and path for this operation:
put /s/{space_id}/api/security_ai_assistant/current_user/conversations/{id}
Refer to Spaces for more information.
Update an existing conversation using the conversation ID. This endpoint allows users to modify the details of an existing conversation.
Body
Required
-
The conversation category.
Values are
assistantorinsights. -
Exclude from last conversation storage.
-
A string that does not contain only whitespace characters.
Minimum length is
1. -
The conversation messages.
-
Replacements object used to anonymize/deanonymize messages
-
The conversation title.
PUT
/api/security_ai_assistant/current_user/conversations/{id}
curl \
--request PUT 'https://localhost:5601/api/security_ai_assistant/current_user/conversations/abc123' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"apiConfig":{"actionTypeId":"09876","connectorId":"54321"},"category":"insights","excludeFromLastConversationStorage":true,"messages":[{"content":"The issue was resolved.","role":"assistant","timestamp":"2023-10-31T12:30:00Z"}],"replacements":{},"title":"Updated Security Discussion"}'
Request example
{
"apiConfig": {
"actionTypeId": "09876",
"connectorId": "54321"
},
"category": "insights",
"excludeFromLastConversationStorage": true,
"messages": [
{
"content": "The issue was resolved.",
"role": "assistant",
"timestamp": "2023-10-31T12:30:00Z"
}
],
"replacements": {},
"title": "Updated Security Discussion"
}
Response examples (200)
{
"apiConfig": {
"actionTypeId": "09876",
"connectorId": "54321"
},
"category": "insights",
"createdAt": "2023-10-31T12:01:00Z",
"excludeFromLastConversationStorage": true,
"id": "abc123",
"messages": [
{
"content": "The issue was resolved.",
"role": "assistant",
"timestamp": "2023-10-31T12:30:00Z"
}
],
"replacements": {},
"title": "Updated Security Discussion",
"updatedAt": "2023-10-31T12:31:00Z",
"users": [
{
"id": "user1",
"name": "John Doe"
}
]
}