# Create a KnowledgeBase for a resource **POST /api/security_ai_assistant/knowledge_base/{resource}** **Spaces method and path for this operation:**
post /s/{space_id}/api/security_ai_assistant/knowledge_base/{resource}
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. Create a knowledge base with a specific resource identifier. ## Servers - https://: https:// () ## Authentication methods - Api key auth ## Parameters ### Path parameters - **resource** (string) The KnowledgeBase `resource` value. ### Query parameters - **modelId** (string) ELSER modelId to use when setting up the Knowledge Base. If not provided, a default model will be used. - **ignoreSecurityLabs** (boolean) Indicates whether we should or should not install Security Labs docs when setting up the Knowledge Base. Defaults to `false`. ## Responses ### 200 Indicates a successful call. #### Body: application/json (object) - **success** (boolean) Identify the success of the method execution. ### 400 Bad Request response. #### Body: application/json (object) - **error** (string) A short description of the error. - **message** (string) A detailed error message. - **statusCode** (number) The HTTP status code of the error. [Powered by Bump.sh](https://bump.sh)