Create a conversation
Base URL
https://{kibana_url}
POST
/api/security_ai_assistant/current_user/conversations
POST
/s/{space_id} /api/security_ai_assistant/current_user/conversations
Auth
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.
Expand all
space_id
string
optional
An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.
{
}
apiConfig
object
+
Show 5 properties
actionTypeId
string
required
Action type ID
connectorId
string
required
Connector ID
defaultSystemPromptId
string
Default system prompt ID
provider
enum
Provider
Values:
OpenAI
Azure OpenAI
Other
category
enum
The conversation category.
Values:
assistant
insights
excludeFromLastConversationStorage
boolean
Exclude from last conversation storage.
id
string
The conversation id.
messages
object []
The conversation messages.
+
Show 8 properties
content
string
required
Message content.
isError
boolean
Is error message.
metadata
object
Message metadata
+
Show 1 property
refusal
string
Refusal reason returned by the model when content is filtered.
role
enum
required
Message role.
Values:
system
user
assistant
timestamp
string · format: nonempty · min length: 1
required
A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
traceData
object
Trace Data
+
Show 2 properties
traceId
string
Could be any string, not necessarily a UUID
transactionId
string
Could be any string, not necessarily a UUID
replacements
map string to string
Replacements object used to anonymize/deanonymize messages
title
string
required
The conversation title.
200
Indicates a successful call. The conversation was created successfully.
application/json
apiConfig
object
+
Show 5 properties
actionTypeId
string
required
Action type ID
connectorId
string
required
Connector ID
defaultSystemPromptId
string
Default system prompt ID
provider
enum
Provider
Values:
OpenAI
Azure OpenAI
Other
category
enum
required
The conversation category.
Values:
assistant
insights
createdAt
string
required
The time conversation was created.
excludeFromLastConversationStorage
boolean
Exclude from last conversation storage.
id
string · format: nonempty · min length: 1
required
A string that does not contain only whitespace characters.
messages
object []
The conversation messages.
Same fields as
messages
namespace
string
required
Kibana space
replacements
map string to string
Replacements object used to anonymize/deanonymize messages
summary
object
+
Show 4 properties
confidence
enum
The conversation confidence.
Values:
low
medium
high
content
string
Summary text of the conversation over time.
public
boolean
Define if summary is marked as publicly available.
timestamp
string · format: nonempty · min length: 1
A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
timestamp
string · format: nonempty · min length: 1
A string that represents a timestamp in ISO 8601 format and does not contain only whitespace characters.
title
string
required
The conversation title.
updatedAt
string
The last time conversation was updated.
users
object []
required
−
Hide 2 properties
400
Generic Error. This response indicates an issue with the request, such as missing required parameters or incorrect data.
application/json
Thank you for your feedback.
Base URL
https://{kibana_url}
Examples
Request
Console
1 / 2 languages
‹
›
1
2
3
4
POST kbn:/api/security_ai_assistant/current_user/conversations
{
"title": "Security AI Assistant Setup"
}
Generated from the API spec
1
2
3
4
5
6
curl -X POST "${KIBANA_URL}/api/security_ai_assistant/current_user/conversations" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"title": "Security AI Assistant Setup"
}'
Generated from the API spec
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"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"
}
]
}
1
2
3
4
5
{
"error": "Bad Request",
"message": "Missing required parameter: title",
"statusCode": 400
}
Generated from the API spec