Security AI Assistant API
Create a Knowledge Base Entry
Spaces method and path for this operation:
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/security_ai_assistant/knowledge_base/entries</span></div>Refer to Spaces for more information.
Create a Knowledge Base Entry
post/api/security_ai_assistant/knowledge_base/entries
Request body
Example request
{
"name": "Example Entry",
"namespace": "default",
"users": [
{
"id": "user123",
"name": "John Doe"
}
],
"kbResource": "security_labs",
"source": "/documents/example.txt",
"text": "This is the content of the document.",
"type": "document",
"vector": {
"modelId": "bert-base-uncased",
"tokens": {
"token1": 0.123,
"token2": 0.456
}
}
}Response
Successful request returning Knowledge Base Entries
Example response
{
"name": "Example Entry",
"namespace": "default",
"users": [
{
"id": "user123",
"name": "John Doe"
}
],
"createdAt": "2023-01-01T12:00:00Z",
"createdBy": "admin",
"id": "I am a string",
"updatedAt": "2023-01-02T12:00:00Z",
"updatedBy": "editor",
"kbResource": "security_labs",
"source": "/documents/example.txt",
"text": "This is the content of the document.",
"type": "document",
"vector": {
"modelId": "bert-base-uncased",
"tokens": {
"token1": 0.123,
"token2": 0.456
}
}
}