# Folders

Folder related APIs

## POST /webapi/v2/folders

> 폴더 만들기

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"folders","description":"Folder related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"CreateFolderRequest":{"properties":{"name":{"maxLength":50,"title":"Name","type":"string"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"followParentFolderPermission":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"Followparentfolderpermission"},"permissionGroupEditors":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Permissiongroupeditors"},"permissionGroupViewers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Permissiongroupviewers"},"agentEditors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agenteditors"},"agentViewers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentviewers"},"userViewers":{"anyOf":[{"$ref":"#/components/schemas/UserAccessPermissionRequest"},{"type":"null"}]},"allowOtherAgentsView":{"default":true,"title":"Allowotheragentsview","type":"boolean"},"allowOtherUsersView":{"default":true,"title":"Allowotherusersview","type":"boolean"}},"required":["name"],"title":"CreateFolderRequest","type":"object"},"UserAccessPermissionRequest":{"properties":{"customerIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customerids"},"customerGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroupids"}},"title":"UserAccessPermissionRequest","type":"object"}}},"paths":{"/webapi/v2/folders":{"post":{"operationId":"django_server_knowledge_base_views_rest_folder_api_create_folder","summary":"폴더 만들기","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"}],"responses":{"200":{"description":"알겠습니다","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}}},"tags":["folders"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderRequest"}}},"required":true}}}}}
```

## Get Folder

> Get a single folder by ID with folder size information.

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"folders","description":"Folder related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"}}},"paths":{"/webapi/v2/folders/{folder_id}":{"get":{"operationId":"django_server_knowledge_base_views_rest_folder_api_get_folder","summary":"Get Folder","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}}},"description":"Get a single folder by ID with folder size information.","tags":["folders"]}}}}
```

## PUT /webapi/v2/folders/{folder\_id}

> 폴더 업데이트

```json
{"openapi":"3.1.0","info":{"title":"Alli API Documentation","version":"1.0.0"},"tags":[{"name":"folders","description":"Folder related APIs"}],"servers":[{"url":"https://backend.alli.ai","description":"US"}],"security":[{"ApiKeyAuth":[]},{"TokenAuth":[]},{"ProjectIdHeader":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"API-KEY","description":"Your API key for authentication"},"TokenAuth":{"type":"http","scheme":"bearer","description":"Your token for authentication"}},"parameters":{"AgentEmailHeader":{"name":"AGENT-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email of the agent to use for this request"},"UserEmailHeader":{"name":"USER-EMAIL","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: Email address to associate with the user"},"OwnUserIdHeader":{"name":"OWN-USER-ID","in":"header","required":false,"schema":{"type":"string"},"description":"Optional: User ID to identify or create a user"}},"schemas":{"FolderResponse":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"createdAt":{"title":"Createdat","type":"number"},"updatedAt":{"title":"Updatedat","type":"number"},"parentFolderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfolderid"},"folderSize":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foldersize"}},"required":["id","name","createdAt","updatedAt"],"title":"FolderResponse","type":"object"},"UpdateFolderRequest":{"properties":{"name":{"maxLength":50,"title":"Name","type":"string"},"permissionGroupEditors":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Permissiongroupeditors"},"permissionGroupViewers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Permissiongroupviewers"},"agentEditors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agenteditors"},"agentViewers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Agentviewers"},"userViewers":{"anyOf":[{"$ref":"#/components/schemas/UserAccessPermissionRequest"},{"type":"null"}]},"allowOtherAgentsView":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowotheragentsview"},"allowOtherUsersView":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowotherusersview"}},"required":["name"],"title":"UpdateFolderRequest","type":"object"},"UserAccessPermissionRequest":{"properties":{"customerIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customerids"},"customerGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customergroupids"}},"title":"UserAccessPermissionRequest","type":"object"}}},"paths":{"/webapi/v2/folders/{folder_id}":{"put":{"operationId":"django_server_knowledge_base_views_rest_folder_api_update_folder","summary":"폴더 업데이트","parameters":[{"$ref":"#/components/parameters/AgentEmailHeader"},{"$ref":"#/components/parameters/UserEmailHeader"},{"$ref":"#/components/parameters/OwnUserIdHeader"},{"in":"path","name":"folder_id","schema":{"title":"Folder Id","type":"string"},"required":true}],"responses":{"200":{"description":"좋아요","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}}},"tags":["folders"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFolderRequest"}}},"required":true}}}}}
```
