openapi: 3.2.0 info: title: B2B-OldKAIExtract Test Cases 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-cases description: Manage test cases for prompt evaluation. paths: /v3/workspaces/{workspace_id}/test-cases: get: tags: - test-cases summary: List Test Cases description: List all test cases available for a workspace identified by UUID. operationId: list_test_cases_v3_workspaces__workspace_id__test_cases_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/TestCaseListResponse' '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-cases summary: Create Test Case description: Create a new test case in a workspace. operationId: create_test_case_v3_workspaces__workspace_id__test_cases_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_case_v3_workspaces__workspace_id__test_cases_post' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestCaseDetailResponse' '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-cases/{test_case_id}: get: tags: - test-cases summary: Get Test Case description: Get detailed information about a specific test case. operationId: get_test_case_v3_workspaces__workspace_id__test_cases__test_case_id__get parameters: - 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/TestCaseDetailResponse' '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-cases summary: Update Test Case V3 description: Update an existing test case. operationId: update_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__put parameters: - 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 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_update_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__put' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestCaseDetailResponse' '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-cases summary: Delete Test Case V3 description: 'Delete a test case. By default, performs soft delete, set hard_delete=True for permanent deletion.' operationId: delete_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__delete parameters: - 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 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_delete_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__delete' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DeleteTestCaseResponse' '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-cases: get: tags: - test-cases summary: List Test Cases Api Key description: List all test cases available for a workspace using API key authentication. operationId: list_test_cases_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases_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/TestCaseListResponse' '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-cases summary: Create Test Case Api Key description: Create a new test case in a workspace using API key authentication. operationId: create_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases_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_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases_post' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestCaseDetailResponse' '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-cases/{test_case_id}: get: tags: - test-cases summary: Get Test Case Api Key description: Get detailed information about a specific test case using API key authentication. operationId: get_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__get parameters: - 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/TestCaseDetailResponse' '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-cases summary: Update Test Case Api Key description: Update an existing test case using API key authentication. operationId: update_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__put parameters: - 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 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_update_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__put' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TestCaseDetailResponse' '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-cases summary: Delete Test Case Api Key description: Delete a test case using API key authentication. By default, performs soft delete, set hard_delete=True for permanent deletion. operationId: delete_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__delete parameters: - 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 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_delete_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__delete' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DeleteTestCaseResponse' '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: Body_delete_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__delete: type: object properties: hard_delete: type: boolean default: false title: Hard Delete title: Body_delete_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__delete HTTPValidationError: type: object properties: detail: type: array items: $ref: '#/components/schemas/ValidationError' title: Detail title: HTTPValidationError Body_create_test_case_v3_workspaces__workspace_id__test_cases_post: type: object properties: name: type: string title: Name document_id: type: string format: uuid title: Document Id expected_output: type: string title: Expected Output description: anyOf: - type: string - type: 'null' title: Description required: - document_id - expected_output - name title: Body_create_test_case_v3_workspaces__workspace_id__test_cases_post TestCaseListResponse: type: object properties: test_cases: type: array items: $ref: '#/components/schemas/TestCaseListItem' title: Test Cases required: - test_cases title: TestCaseListResponse TestCaseDetailResponse: type: object properties: name: type: string title: Name test_case_id: type: string format: uuid title: Test Case Id document_id: type: string format: uuid title: Document Id document_name: type: string title: Document Name workspace_id: type: string format: uuid title: Workspace Id description: anyOf: - type: string - type: 'null' title: Description expected_output: anyOf: - type: object additionalProperties: true - type: 'null' title: Expected Output test_set_ids: type: array items: type: string format: uuid title: Test Set Ids created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At required: - created_at - description - document_id - document_name - expected_output - name - test_case_id - test_set_ids - updated_at - workspace_id title: TestCaseDetailResponse Body_create_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases_post: type: object properties: name: type: string title: Name document_id: type: string format: uuid title: Document Id expected_output: type: string title: Expected Output description: anyOf: - type: string - type: 'null' title: Description required: - document_id - expected_output - name title: Body_create_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases_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 Body_update_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__put: type: object properties: name: anyOf: - type: string - type: 'null' title: Name document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id expected_output: anyOf: - type: string - type: 'null' title: Expected Output description: anyOf: - type: string - type: 'null' title: Description title: Body_update_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__put TestCaseListItem: type: object properties: name: type: string title: Name test_case_id: type: string format: uuid title: Test Case Id document_id: type: string format: uuid title: Document Id required: - document_id - name - test_case_id title: TestCaseListItem DeleteTestCaseResponse: type: object description: Response model for test case deletion. properties: success: type: boolean title: Success test_case_id: type: string format: uuid title: Test Case Id required: - success - test_case_id title: DeleteTestCaseResponse Body_update_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__put: type: object properties: name: anyOf: - type: string - type: 'null' title: Name document_id: anyOf: - type: string format: uuid - type: 'null' title: Document Id expected_output: anyOf: - type: string - type: 'null' title: Expected Output description: anyOf: - type: string - type: 'null' title: Description title: Body_update_test_case_v3_v3_workspaces__workspace_id__test_cases__test_case_id__put Body_delete_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__delete: type: object properties: hard_delete: type: boolean default: false title: Hard Delete title: Body_delete_test_case_api_key_v3_api_key_auth_workspaces__workspace_id__test_cases__test_case_id__delete securitySchemes: default: type: oauth2 flows: implicit: authorizationUrl: https://gateway.api.kuehne-nagel.com/authorize scopes: {} x-wso2-api-key-header: ApiKey