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 10 properties
content
string
required
Message content.
id
string · format: nonempty · min length: 1
A string that does not contain only whitespace characters.
isError
boolean
Is error message.
metadata
object
Message metadata
+
Show 3 properties
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
user
object
Could be any string, not necessarily a UUID.
+
Show 2 properties
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.
createdBy
object
required
Could be any string, not necessarily a UUID.
−
Hide 2 properties
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
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
Thank you for your feedback.
Base URL
https://{kibana_url}
Examples
Request
curl
1 / 1 language
1
2
3
4
5
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"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
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
27
28
29
30
31
{
"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"
}
]
}
1
2
3
4
5
{
"error": "Bad Request",
"message": "Missing required parameter: title",
"statusCode": 400
}