---
type: api
title: Read a Knowledge Base Entry
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-readknowledgebaseentry
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-readknowledgebaseentry
products:
  - Kibana
---

# Read a Knowledge Base Entry

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/security_ai_assistant/knowledge_base/entries/{id}`
- `GET` `/s/{space_id}/api/security_ai_assistant/knowledge_base/entries/{id}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

#### Path Parameters

- `id` (string · min: 1)
  The unique identifier (`id`) of the Knowledge Base Entry to retrieve.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Retrieve a Knowledge Base Entry by its unique `id`.

## Responses

#### `200`

Successful request returning the requested Knowledge Base Entry.

`application/json`

Any of:
- **DocumentEntry** (`type: document`)
  - `global` (boolean)
    Whether this Knowledge Base Entry is global, defaults to false.
  - `name` (string)
    Name of the Knowledge Base Entry.
  - `namespace` (string)
    Kibana Space, defaults to 'default' space.
  - `users` ([] object)
    Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.
    - `id` (string)
      User id.
    - `name` (string)
      User name.
  - `createdAt` (string)
    Time the Knowledge Base Entry was created.
  - `createdBy` (string)
    User who created the Knowledge Base Entry.
  - `id` (string · min: 1)
    A string that does not contain only whitespace characters.
  - `updatedAt` (string)
    Time the Knowledge Base Entry was last updated.
  - `updatedBy` (string)
    User who last updated the Knowledge Base Entry.
  - `kbResource` (enum)
    Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc.
    Values: `security_labs`, `user`
  - `source` (string)
    Source document name or filepath.
  - `text` (string)
    Knowledge Base Entry content.
  - `type` (enum)
    Entry type.
    Values: `document`
  - `required` (boolean)
    Whether this resource should always be included, defaults to false.
  - `vector` ({})
    Object containing Knowledge Base Entry text embeddings and modelId used to create the embeddings.
    - `modelId` (string)
      ID of the model used to create the embeddings.
    - `tokens` (map string to number)
      Tokens with their corresponding values.
- **IndexEntry** (`type: index`)
  - `global` (boolean)
    Whether this Knowledge Base Entry is global, defaults to false.
  - `name` (string)
    Name of the Knowledge Base Entry.
  - `namespace` (string)
    Kibana Space, defaults to 'default' space.
  - `users` ([] object)
    Users who have access to the Knowledge Base Entry, defaults to current user. Empty array provides access to all users.
    - `id` (string)
      User id.
    - `name` (string)
      User name.
  - `createdAt` (string)
    Time the Knowledge Base Entry was created.
  - `createdBy` (string)
    User who created the Knowledge Base Entry.
  - `id` (string · min: 1)
    A string that does not contain only whitespace characters.
  - `updatedAt` (string)
    Time the Knowledge Base Entry was last updated.
  - `updatedBy` (string)
    User who last updated the Knowledge Base Entry.
  - `description` (string)
    Description for when this index or data stream should be queried for Knowledge Base content. Passed to the LLM as a tool description.
  - `field` (string)
    Field to query for Knowledge Base content.
  - `index` (string)
    Index or Data Stream to query for Knowledge Base content.
  - `queryDescription` (string)
    Description of query field used to fetch Knowledge Base content. Passed to the LLM as part of the tool input schema.
  - `type` (enum)
    Entry type.
    Values: `index`
  - `inputSchema` ([] object)
    Array of objects defining the input schema, allowing the LLM to extract structured data to be used in retrieval.
    - `description` (string)
      Description of the field.
    - `fieldName` (string)
      Name of the field.
    - `fieldType` (string)
      Type of the field.
  - `outputFields` ([] string)
    Fields to extract from the query result, defaults to all fields if not provided or empty.
#### `400`

A generic error occurred, such as an invalid `id` or the entry not being found.

`application/json`

- `error` (string)
  Error type or category.
- `message` (string)
  Detailed error message.
- `statusCode` (number)
  HTTP status code of the error.
## Code Examples

#### Console

```console
GET /api/security_ai_assistant/knowledge_base/entries/{id}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/security_ai_assistant/knowledge_base/entries/{id}"
```

## Response Examples

#### 200

```json
{
  "content": "To reset your password, go to the settings page and click \u0027Reset Password\u0027.",
  "id": "12345",
  "tags": [
    "password",
    "reset",
    "help"
  ],
  "title": "How to reset a password"
}
```

#### 400

```json
{
  "error": "Not Found",
  "message": "No Knowledge Base Entry found with the provided \u0060id\u0060."
}
```

