---
title: "Create a KnowledgeBase for a resource"
method: POST
path: "/api/security_ai_assistant/knowledge_base/{resource}"
tags: ["Security AI Assistant API"]
---

# Create a KnowledgeBase for a resource

`POST /api/security_ai_assistant/knowledge_base/{resource}`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/security_ai_assistant/knowledge_base/{resource}</span></div>

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

Create a knowledge base with a specific resource identifier.

## Path parameters

- `resource` string, required

## Query parameters

- `modelId` string
- `ignoreSecurityLabs` boolean

## Response `200`

Indicates a successful call.

- SecurityAIAssistantAPIKnowledgeBaseResponse — AI assistant KnowledgeBase.
  - `success` boolean — Identify the success of the method execution.

## Other responses

- `400` — Bad Request response.

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
