---
type: api
title: Read a KnowledgeBase for a resource
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-readknowledgebase
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-readknowledgebase
products:
  - Kibana
---

# Read a KnowledgeBase for a resource

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

## Paths

- `GET` `/api/security_ai_assistant/knowledge_base/{resource}`
- `GET` `/s/{space_id}/api/security_ai_assistant/knowledge_base/{resource}`

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

#### Path Parameters

- `resource` (string)
  The KnowledgeBase `resource` value.

## Description

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

Read a knowledge base with a specific resource identifier.

## Responses

#### `200`

Indicates a successful call.

`application/json`

- `defend_insights_exists` (boolean)
  Indicates if Defend Insights documentation exists in the KnowledgeBase.
- `elser_exists` (boolean)
  Indicates if the ELSER model exists for the KnowledgeBase.
- `is_setup_available` (boolean)
  Indicates if the setup process is available for the KnowledgeBase.
- `is_setup_in_progress` (boolean)
  Indicates if the setup process is currently in progress.
- `product_documentation_status` (string)
  The status of the product documentation in the KnowledgeBase.
- `security_labs_exists` (boolean)
  Indicates if Security Labs documentation exists in the KnowledgeBase.
- `user_data_exists` (boolean)
  Indicates if user data exists in the KnowledgeBase.
#### `400`

Bad Request response.

`application/json`

- `error` (string)
  A short description of the error.
- `message` (string)
  A detailed error message.
- `statusCode` (number)
  The HTTP status code of the error.
## Code Examples

#### curl

```curl
curl \
 --request GET 'http://localhost:5601/api/security_ai_assistant/knowledge_base/kb12345' \
 --header "Authorization: $API_KEY"
```

## Response Examples

#### A response that returns information about the knowledge base.

```json
{
  "defend_insights_exists": true,
  "elser_exists": false,
  "is_setup_available": true,
  "is_setup_in_progress": true,
  "product_documentation_status": "installed",
  "security_labs_exists": false,
  "user_data_exists": true
}
```

#### Read knowledge base response400

```json
{
  "error": "Bad Request",
  "message": "Invalid resource ID provided.",
  "statusCode": 400
}
```

