openapi: 3.2.0 info: title: B2B-OldKAIExtract Test Sets API description: 'Extract structured information from documents. ## Using the API ### Optional Parameters When using the ''Try it out'' feature in Swagger UI, optional parameters with empty values can be left as-is. The API handles empty strings and will treat them as if the parameter was omitted. You don''t need to remove empty optional fields from requests. **Tip:** In generated curl commands, you may see flags like `-F ''tag=''` or `-F ''tools=''`. These empty optional fields are safe to include or remove - the API treats them identically.' version: 0.1.0 servers: - url: https://gateway.api.kuehne-nagel.com/oldkaiextractapi/0.1.0 - url: http://gateway.api.kuehne-nagel.com:8280/oldkaiextractapi/0.1.0 security: - default: [] tags: - name: test-sets paths: /v3/workspaces/{workspace_id}/test-sets: get: tags: - test-sets summary: List Test Sets description: List all test sets available for a workspace identified by UUID. operationId: list_test_sets_v3_workspaces__workspace_id__test_sets_get parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited post: tags: - test-sets summary: Create Test Set description: Create a new test set in a workspace. operationId: create_test_set_v3_workspaces__workspace_id__test_sets_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_create_test_set_v3_workspaces__workspace_id__test_sets_post' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/test-sets/{test_set_id}: get: tags: - test-sets summary: Get Test Set description: Get detailed information about a specific test set. operationId: get_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__get parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited put: tags: - test-sets summary: Update Test Set description: Update an existing test set. operationId: update_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__put parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_update_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__put' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited delete: tags: - test-sets summary: Delete Test Set description: 'Delete a test set. By default, performs soft delete, set hard_delete=True for permanent deletion.' operationId: delete_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__delete parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_delete_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__delete' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DeleteTestSetResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/test-sets/{test_set_id}/test-cases/{test_case_id}: post: tags: - test-sets summary: Add Test Case To Test Set description: Add a test case to a test set. operationId: add_test_case_to_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__test_cases__test_case_id__post parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: test_case_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Case Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited delete: tags: - test-sets summary: Remove Test Case From Test Set description: Remove a test case from a test set. operationId: remove_test_case_from_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__test_cases__test_case_id__delete parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: test_case_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Case Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/workspaces/{workspace_id}/test-sets/{test_set_id}/evaluate/{prompt_version_id}: post: tags: - test-sets summary: Evaluate Test Set description: Evaluate all test cases in a test set against a specific prompt version. operationId: evaluate_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: prompt_version_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Prompt Version Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-auth-request-email in: header required: true style: simple explode: false schema: type: string title: X-Auth-Request-Email requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_evaluate_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetEvaluationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/test-sets: get: tags: - test-sets summary: List Test Sets Api Key description: List all test sets available for a workspace using API key authentication. operationId: list_test_sets_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets_get parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited post: tags: - test-sets summary: Create Test Set Api Key description: Create a new test set in a workspace using API key authentication. operationId: create_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets_post parameters: - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_create_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets_post' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/test-sets/{test_set_id}: get: tags: - test-sets summary: Get Test Set Api Key description: Get detailed information about a specific test set using API key authentication. operationId: get_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__get parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited put: tags: - test-sets summary: Update Test Set Api Key description: Update an existing test set using API key authentication. operationId: update_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__put parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_update_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__put' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited delete: tags: - test-sets summary: Delete Test Set Api Key description: Delete a test set using API key authentication. By default, performs soft delete, set hard_delete=True for permanent deletion. operationId: delete_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__delete parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_delete_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__delete' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DeleteTestSetResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/test-sets/{test_set_id}/test-cases/{test_case_id}: post: tags: - test-sets summary: Add Test Case To Test Set Api Key description: Add a test case to a test set using API key authentication. operationId: add_test_case_to_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__test_cases__test_case_id__post parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: test_case_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Case Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited delete: tags: - test-sets summary: Remove Test Case From Test Set Api Key description: Remove a test case from a test set using API key authentication. operationId: remove_test_case_from_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__test_cases__test_case_id__delete parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: test_case_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Case Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetDetailResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited /v3/api-key-auth/workspaces/{workspace_id}/test-sets/{test_set_id}/evaluate/{prompt_version_id}: post: tags: - test-sets summary: Evaluate Test Set Api Key description: Evaluate all test cases in a test set against a specific prompt version using API key authentication. operationId: evaluate_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post parameters: - name: test_set_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Test Set Id - name: prompt_version_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Prompt Version Id - name: workspace_id in: path required: true style: simple explode: false schema: type: string format: uuid title: Workspace Id - name: x-api-key in: header required: true style: simple explode: false schema: type: string title: X-Api-Key requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_evaluate_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestSetEvaluationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - default: [] x-auth-type: Application & Application User x-throttling-tier: Unlimited components: schemas: HTTPValidationError: type: object properties: detail: type: array items: $ref: '#/components/schemas/ValidationError' title: Detail title: HTTPValidationError TestSetDetailResponse: type: object description: Response model for detailed test set information. properties: name: type: string title: Name test_set_id: type: string format: uuid title: Test Set Id workspace_id: type: string format: uuid title: Workspace Id description: anyOf: - type: string - type: 'null' title: Description test_case_ids: type: array items: type: string format: uuid title: Test Case Ids created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At required: - created_at - name - test_case_ids - test_set_id - updated_at - workspace_id title: TestSetDetailResponse Body_update_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__put: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description title: Body_update_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__put Body_update_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__put: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description title: Body_update_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__put ? Body_evaluate_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post : type: object properties: model_type: $ref: '#/components/schemas/ModelType' default: flash_25 title: Body_evaluate_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post DeleteTestSetResponse: type: object description: Response model for test set deletion. properties: success: type: boolean title: Success test_set_id: type: string format: uuid title: Test Set Id required: - success - test_set_id title: DeleteTestSetResponse TestCaseEvaluationResult: type: object description: Response model for individual test case evaluation within a test set. properties: test_case_id: type: string format: uuid title: Test Case Id test_case_name: type: string title: Test Case Name overall_status: type: string title: Overall Status status_message: type: string title: Status Message schema_validation: anyOf: - $ref: '#/components/schemas/ValidationResult' - type: 'null' value_comparison: anyOf: - $ref: '#/components/schemas/ComparisonResult' - type: 'null' required: - overall_status - status_message - test_case_id - test_case_name title: TestCaseEvaluationResult Body_create_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets_post: type: object properties: name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description required: - name title: Body_create_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets_post ComparisonResult: type: object description: Response model for value comparison results. properties: status: type: string title: Status message: type: string title: Message formatted_diff: anyOf: - type: object additionalProperties: true - type: string - type: 'null' title: Formatted Diff required: - message - status title: ComparisonResult Body_delete_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__delete: type: object properties: hard_delete: type: boolean default: false title: Hard Delete title: Body_delete_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__delete ModelType: type: string enum: - flash_25_lite - flash_25_low - flash_25 - flash_3 - flash_35 - pro_25 - pro_31 - claude_haiku_45 - claude_sonnet_46 - claude_sonnet_46_low - claude_opus_46 - claude_opus_46_low - nova_2_lite - nova_2_pro_preview - nova_2_pro_preview_low title: ModelType TestSetListItem: type: object description: Response model for test set list items. properties: name: type: string title: Name test_set_id: type: string format: uuid title: Test Set Id description: anyOf: - type: string - type: 'null' title: Description required: - name - test_set_id title: TestSetListItem TestSetListResponse: type: object description: Response model for listing test sets. properties: test_sets: type: array items: $ref: '#/components/schemas/TestSetListItem' title: Test Sets required: - test_sets title: TestSetListResponse Body_create_test_set_v3_workspaces__workspace_id__test_sets_post: type: object properties: name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description required: - name title: Body_create_test_set_v3_workspaces__workspace_id__test_sets_post ValidationResult: type: object description: Response model for schema validation results. properties: status: type: string title: Status message: type: string title: Message formatted_errors: anyOf: - type: array items: type: object additionalProperties: true - type: string - type: 'null' title: Formatted Errors required: - message - status title: ValidationResult TestSetEvaluationResponse: type: object description: Response model for test set evaluation. properties: test_set_id: type: string format: uuid title: Test Set Id test_set_name: type: string title: Test Set Name prompt_id: type: string format: uuid title: Prompt Id prompt_name: type: string title: Prompt Name prompt_version_id: type: string format: uuid title: Prompt Version Id workspace_id: type: string format: uuid title: Workspace Id total_test_cases: type: integer title: Total Test Cases passed_count: type: integer title: Passed Count failed_count: type: integer title: Failed Count error_count: type: integer title: Error Count evaluation_results: type: array items: $ref: '#/components/schemas/TestCaseEvaluationResult' title: Evaluation Results started_at: type: string format: date-time title: Started At completed_at: type: string format: date-time title: Completed At required: - completed_at - error_count - evaluation_results - failed_count - passed_count - prompt_id - prompt_name - prompt_version_id - started_at - test_set_id - test_set_name - total_test_cases - workspace_id title: TestSetEvaluationResponse Body_delete_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__delete: type: object properties: hard_delete: type: boolean default: false title: Hard Delete title: Body_delete_test_set_api_key_v3_api_key_auth_workspaces__workspace_id__test_sets__test_set_id__delete Body_evaluate_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post: type: object properties: model_type: $ref: '#/components/schemas/ModelType' default: flash_25 title: Body_evaluate_test_set_v3_workspaces__workspace_id__test_sets__test_set_id__evaluate__prompt_version_id__post ValidationError: type: object properties: loc: type: array items: anyOf: - type: string - type: integer title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context required: - loc - msg - type title: ValidationError securitySchemes: default: type: oauth2 flows: implicit: authorizationUrl: https://gateway.api.kuehne-nagel.com/authorize scopes: {} x-wso2-api-key-header: ApiKey