|
502 | 502 | } |
503 | 503 | } |
504 | 504 | }, |
| 505 | + "/api/v2/knowledge/{knowledgeBaseId}/export": { |
| 506 | + "get": { |
| 507 | + "operationId": "exportKnowledgeBase", |
| 508 | + "summary": "Export Knowledge Base", |
| 509 | + "description": "Stream a knowledge base as a bundle archive: its configuration, tag definitions, each workspace-visible document's file and chunk text, and optionally chunk vectors. Access-control lists, connector links, and credentials never leave. More than 2000 documents returns `413`. Exports record an audit event. `HEAD` checks access with the same authorization as `GET` but skips side effects, returning an empty `200` without payload headers on success. `HEAD` omits `Content-Length`; use file metadata to size downloads.\n\nOAuth scope: `api:read`.", |
| 510 | + "x-sim-operation": "knowledge.export", |
| 511 | + "x-oauth-scope": "api:read", |
| 512 | + "tags": ["Knowledge Bases"], |
| 513 | + "parameters": [ |
| 514 | + { |
| 515 | + "name": "knowledgeBaseId", |
| 516 | + "in": "path", |
| 517 | + "required": true, |
| 518 | + "description": "Unique knowledge base identifier.", |
| 519 | + "schema": { |
| 520 | + "type": "string", |
| 521 | + "minLength": 1, |
| 522 | + "description": "Unique knowledge base identifier." |
| 523 | + } |
| 524 | + }, |
| 525 | + { |
| 526 | + "name": "workspaceId", |
| 527 | + "in": "query", |
| 528 | + "required": true, |
| 529 | + "description": "Workspace that owns the knowledge base.", |
| 530 | + "schema": { |
| 531 | + "type": "string", |
| 532 | + "minLength": 1, |
| 533 | + "maxLength": 128, |
| 534 | + "description": "Workspace that owns the knowledge base." |
| 535 | + } |
| 536 | + }, |
| 537 | + { |
| 538 | + "name": "vectors", |
| 539 | + "in": "query", |
| 540 | + "required": false, |
| 541 | + "description": "Include chunk vectors so an import into a deployment with the same embedding model reuses them instead of re-embedding.", |
| 542 | + "schema": { |
| 543 | + "description": "Include chunk vectors so an import into a deployment with the same embedding model reuses them instead of re-embedding.", |
| 544 | + "type": "boolean" |
| 545 | + } |
| 546 | + } |
| 547 | + ], |
| 548 | + "responses": { |
| 549 | + "200": { |
| 550 | + "description": "The knowledge base as a zip archive.", |
| 551 | + "headers": { |
| 552 | + "Content-Type": { |
| 553 | + "$ref": "#/components/headers/Content-Type" |
| 554 | + }, |
| 555 | + "Content-Disposition": { |
| 556 | + "$ref": "#/components/headers/Content-Disposition" |
| 557 | + }, |
| 558 | + "X-RateLimit-Limit": { |
| 559 | + "$ref": "#/components/headers/X-RateLimit-Limit" |
| 560 | + }, |
| 561 | + "X-RateLimit-Remaining": { |
| 562 | + "$ref": "#/components/headers/X-RateLimit-Remaining" |
| 563 | + }, |
| 564 | + "X-RateLimit-Reset": { |
| 565 | + "$ref": "#/components/headers/X-RateLimit-Reset" |
| 566 | + } |
| 567 | + }, |
| 568 | + "content": { |
| 569 | + "application/zip": { |
| 570 | + "schema": { |
| 571 | + "type": "string", |
| 572 | + "format": "binary" |
| 573 | + } |
| 574 | + } |
| 575 | + } |
| 576 | + }, |
| 577 | + "400": { |
| 578 | + "$ref": "#/components/responses/BadRequest" |
| 579 | + }, |
| 580 | + "401": { |
| 581 | + "$ref": "#/components/responses/Unauthorized" |
| 582 | + }, |
| 583 | + "403": { |
| 584 | + "$ref": "#/components/responses/Forbidden" |
| 585 | + }, |
| 586 | + "404": { |
| 587 | + "$ref": "#/components/responses/NotFound" |
| 588 | + }, |
| 589 | + "413": { |
| 590 | + "$ref": "#/components/responses/PayloadTooLarge" |
| 591 | + }, |
| 592 | + "429": { |
| 593 | + "$ref": "#/components/responses/RateLimited" |
| 594 | + }, |
| 595 | + "500": { |
| 596 | + "$ref": "#/components/responses/InternalError" |
| 597 | + }, |
| 598 | + "503": { |
| 599 | + "$ref": "#/components/responses/ServiceUnavailable" |
| 600 | + } |
| 601 | + } |
| 602 | + } |
| 603 | + }, |
505 | 604 | "/api/v2/knowledge/{knowledgeBaseId}/connectors": { |
506 | 605 | "get": { |
507 | 606 | "operationId": "listKnowledgeConnectors", |
|
4339 | 4438 | } |
4340 | 4439 | }, |
4341 | 4440 | "headers": { |
| 4441 | + "Content-Type": { |
| 4442 | + "description": "MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable.", |
| 4443 | + "schema": { |
| 4444 | + "type": "string", |
| 4445 | + "title": "Content type", |
| 4446 | + "description": "MIME type of the file, defaulting to application/octet-stream when the stored type is unavailable." |
| 4447 | + } |
| 4448 | + }, |
| 4449 | + "Content-Disposition": { |
| 4450 | + "description": "Attachment disposition containing sanitized and RFC 5987 encoded filenames.", |
| 4451 | + "schema": { |
| 4452 | + "type": "string", |
| 4453 | + "title": "Content disposition", |
| 4454 | + "description": "Attachment disposition containing sanitized and RFC 5987 encoded filenames." |
| 4455 | + } |
| 4456 | + }, |
| 4457 | + "Content-Length": { |
| 4458 | + "description": "File size in bytes.", |
| 4459 | + "schema": { |
| 4460 | + "type": "string", |
| 4461 | + "pattern": "^(0|[1-9]\\d*)$", |
| 4462 | + "title": "Content length", |
| 4463 | + "description": "File size in bytes." |
| 4464 | + } |
| 4465 | + }, |
4342 | 4466 | "X-RateLimit-Limit": { |
4343 | 4467 | "description": "Maximum requests allowed in the current window.", |
4344 | 4468 | "schema": { |
|
0 commit comments