openapi: 3.0.1 info: title: Testkube API description: "Testkube provides a Kubernetes-native framework for test definition, execution and results" contact: email: testkube@kubeshop.io license: name: MIT url: https://opensource.org/licenses/MIT version: 1.0.0 externalDocs: description: "Find out more about Testkube" url: https://testkube.kubeshop.io/ tags: - name: api description: "Testkube API operations" - name: tests description: "Tests operations" - name: executions description: "Test suites and tests execution operations" - name: test-suites description: "Test suites orchestration operations" - name: labels description: "Listing all available labels" - name: artifacts description: "Artifact operations" - name: logs description: "Log operations" - name: executor description: "Executor operations" - name: webhook description: "Webhook operations" - name: test-triggers description: "Test Triggers CRUD operations" - name: keymap description: "Keymap for fields in a form" paths: /keymap/triggers: get: tags: - keymap - api summary: Test triggers keymap description: Returns a keymap (supported/allowed fields) for the test trigger UI screen operationId: getKeyMap responses: 200: description: successful get operation content: application/json: schema: $ref: "#/components/schemas/TestTriggerKeyMap" /triggers: get: tags: - test-triggers - api parameters: - $ref: "#/components/parameters/Namespace" - $ref: "#/components/parameters/Selector" summary: List test triggers description: List test triggers from the kubernetes cluster operationId: listTestTriggers responses: 200: description: successful list operation content: application/json: schema: type: array items: $ref: "#/components/schemas/TestTrigger" text/yaml: schema: type: string 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" post: tags: - test-triggers - api summary: "Create new test trigger" description: "Create new test trigger CRD inside a Kubernetes cluster" operationId: createTestTrigger requestBody: description: test trigger body required: true content: application/json: schema: $ref: "#/components/schemas/TestTriggerUpsertRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestTrigger" text/yaml: schema: type: string 400: description: "problem with test trigger definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: tags: - test-triggers - api summary: "Bulk update test triggers" description: "Updates test triggers provided as an array in the request body" operationId: bulkUpdateTestTriggers requestBody: description: array of test trigger upsert requests required: true content: application/json: schema: type: array items: $ref: "#/components/schemas/TestTriggerUpsertRequest" responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/TestTrigger" text/yaml: schema: type: string 400: description: "problem with test trigger definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - test-triggers - api summary: "Delete test triggers" description: "Deletes all or labeled test triggers" operationId: deleteTestTriggers parameters: - $ref: "#/components/parameters/Namespace" - $ref: "#/components/parameters/Selector" responses: 204: description: "no content" 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /triggers/{id}: get: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/Namespace" tags: - test-triggers - api summary: Get test trigger by ID description: Get test trigger by ID from CRD in kubernetes cluster operationId: getTestTriggerByID responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestTrigger" text/yaml: schema: type: string 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/Namespace" tags: - test-triggers - api summary: "Update test trigger" description: "Update test trigger" operationId: updateTestTrigger requestBody: description: test trigger upsert request required: true content: application/json: schema: $ref: "#/components/schemas/TestTriggerUpsertRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestTrigger" text/yaml: schema: type: string 400: description: "problem with test trigger definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - test-triggers - api parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/Namespace" summary: Delete test trigger description: Deletes a test trigger operationId: deleteTestTrigger responses: 204: description: "no content" 502: description: problem communicating with kubernetes cluster content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suites: post: tags: - test-suites - api summary: "Create new test suite" description: "Create new test suite action" operationId: createTestSuite requestBody: description: test details body required: true content: application/json: schema: $ref: "#/components/schemas/TestSuiteUpsertRequest" responses: 200: description: "successful operation" content: text/yaml: schema: type: string 201: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuite" 500: description: "problem with creating test suite" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: tags: - test-suites - api summary: "Get all test suites" description: "Returns array of test suites" operationId: listTestSuites parameters: - $ref: "#/components/parameters/Selector" - $ref: "#/components/parameters/TextSearch" responses: 200: description: successful operation content: application/json: schema: type: array items: $ref: "#/components/schemas/TestSuite" text/yaml: schema: type: string 500: description: "problem with getting test suites from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - test-suites - api summary: "Delete test suites" description: "Deletes all or labeled test suites" operationId: deleteTestSuites parameters: - $ref: "#/components/parameters/Selector" responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suites/{id}: get: parameters: - $ref: "#/components/parameters/ID" tags: - test-suites - api summary: "Get test suite by ID" description: "Returns test suite with given name" operationId: getTestSuiteByID responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuite" text/yaml: schema: type: string 500: description: "problem with getting test suite from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: parameters: - $ref: "#/components/parameters/ID" tags: - test-suites - api summary: "Update test suite" description: "Update test based on test suite content or git based data" operationId: updateTestSuite requestBody: description: test suite details body required: true content: application/json: schema: $ref: "#/components/schemas/TestSuiteUpdateRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestSuite" 400: description: "problem with test suite definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - test-suites - api parameters: - $ref: "#/components/parameters/ID" summary: "Delete test suite" description: "Deletes a test suite" operationId: deleteTestSuite responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suites/{id}/metrics: get: tags: - tests - api parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/LastNDays" - $ref: "#/components/parameters/Limit" summary: "Get test suite metrics" description: "Gets test suite metrics for given tests executions, with particular execution status and timings" operationId: getTestSuiteMetrics responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/ExecutionsMetrics" text/yaml: schema: type: string 502: description: "problem with read information from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suites/{id}/tests: get: parameters: - $ref: "#/components/parameters/ID" tags: - test-suites - api summary: "List tests for test suite" description: "List available tests for test suite" operationId: listTestSuiteTests responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/Test" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suite-with-executions: get: tags: - test-suites - api summary: "Get all test suite with executions" description: "Returns array of test suite with executions" operationId: listTestSuiteWithExecutions parameters: - $ref: "#/components/parameters/Selector" - $ref: "#/components/parameters/TextSearch" - $ref: "#/components/parameters/TestExecutionsStatusFilter" - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageIndex" responses: 200: description: successful operation content: application/json: schema: type: array items: $ref: "#/components/schemas/TestSuiteWithExecutionSummary" text/yaml: schema: type: string 500: description: "problem with getting test suite with executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suite-with-executions/{id}: get: parameters: - $ref: "#/components/parameters/ID" tags: - test-suites - api summary: "Get test suite by ID with execution" description: "Returns test suite with given name with execution" operationId: getTestSuiteByIDWithExecution responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuiteWithExecution" text/yaml: schema: type: string 500: description: "problem with getting test suite with execution from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suites/{id}/executions: post: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/Namespace" - $ref: "#/components/parameters/LastNDays" tags: - api - test-suites - executions summary: "Starts new test suite execution" description: "New test suite execution returns new execution details on successful execution start" operationId: executeTestSuite requestBody: description: body passed to configure execution required: true content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecutionRequest" responses: 201: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecutionsResult" 400: description: "problem with request body" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with test suite execution" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageIndex" - $ref: "#/components/parameters/TestExecutionsStatusFilter" - $ref: "#/components/parameters/StartDateFilter" - $ref: "#/components/parameters/EndDateFilter" tags: - api - test-suites - executions summary: "Get all test suite executions" description: "Returns array of all available test suite executions" operationId: listTestSuiteExecutions responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecutionsResult" 500: description: "problem with getting test suite executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suites/{id}/executions/{executionID}: get: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/executionID" tags: - api - test-suites - executions summary: "Get test suite execution" description: "Returns test suite execution with given executionID" operationId: getTestSuiteExecution responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecution" 500: description: "problem with getting test suite executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/executionID" tags: - api - testssuite - executions summary: "Aborts testsuite execution" description: "Aborts testsuite execution with given executionID" operationId: abortTestSuiteExecution responses: 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 204: description: "no content" /test-suite-executions: post: parameters: - $ref: "#/components/parameters/Namespace" - $ref: "#/components/parameters/Selector" - $ref: "#/components/parameters/ConcurrencyLevel" tags: - api - test-suites - executions summary: "Starts new test suite executions" description: "New test suite executions returns new executions details on successful executions start" operationId: executeTestSuites requestBody: description: body passed to configure executions required: true content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecutionRequest" responses: 201: description: successful operation content: application/json: schema: type: array items: $ref: "#/components/schemas/TestSuiteExecutionsResult" 400: description: "problem with request body" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with test suites executions" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: tags: - executions - api summary: "Get all test suite executions" description: "Returns array of test suite executions" operationId: listAllTestSuiteExecutions parameters: - $ref: "#/components/parameters/LastNDays" - $ref: "#/components/parameters/TestName" - $ref: "#/components/parameters/TextSearch" - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageIndex" - $ref: "#/components/parameters/TestExecutionsStatusFilter" - $ref: "#/components/parameters/StartDateFilter" - $ref: "#/components/parameters/EndDateFilter" - $ref: "#/components/parameters/Selector" responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecutionsResult" 500: description: "problem with getting test suite executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-suite-executions/{executionID}: get: parameters: - $ref: "#/components/parameters/executionID" - $ref: "#/components/parameters/LastNDays" tags: - executions - api summary: "Get test suite execution by ID" description: "Returns test suite execution with given executionID" operationId: getTestSuiteExecutionByID responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSuiteExecution" 500: description: "problem with getting test suite execution from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: parameters: - $ref: "#/components/parameters/executionID" tags: - api - testssuite - executions summary: "Aborts testsuite execution" description: "Aborts testsuite execution with given executionID" operationId: abortTestSuiteExecutionByID responses: 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 204: description: "no content" /executions: post: parameters: - $ref: "#/components/parameters/Namespace" - $ref: "#/components/parameters/Selector" - $ref: "#/components/parameters/ExecutionSelector" - $ref: "#/components/parameters/ConcurrencyLevel" tags: - api - tests - executions summary: "Starts new test executions" description: "New test executions returns new executions details on successful executions start" operationId: executeTests requestBody: description: body passed to configure executions required: true content: application/json: schema: $ref: "#/components/schemas/ExecutionRequest" responses: 201: description: successful operation content: application/json: schema: type: array items: $ref: "#/components/schemas/ExecutionResult" 400: description: "problem with request body" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with test executions" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: tags: - executions - api summary: "Get all test executions" description: "Returns array of test executions" operationId: listExecutions parameters: - $ref: "#/components/parameters/TestName" - $ref: "#/components/parameters/Type" - $ref: "#/components/parameters/TextSearch" - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageIndex" - $ref: "#/components/parameters/ExecutionsStatusFilter" - $ref: "#/components/parameters/StartDateFilter" - $ref: "#/components/parameters/EndDateFilter" - $ref: "#/components/parameters/Selector" responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ExecutionsResult" 500: description: "problem with getting test executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /executions/{executionID}: get: parameters: - $ref: "#/components/parameters/executionID" tags: - executions - api summary: "Get test execution by ID" description: "Returns execution with given executionID" operationId: getExecutionByID responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/Execution" 500: description: "problem with getting test executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /executions/{id}/artifacts: get: parameters: - $ref: "#/components/parameters/ID" tags: - artifacts - executions - api summary: "Get execution's artifacts by ID" description: "Returns artifacts of the given executionID" operationId: getExecutionArtifacts responses: 200: description: successful operation content: application/json: schema: type: array items: $ref: "#/components/schemas/Artifact" 500: description: "problem with getting execution's artifacts from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /executions/{id}/logs: get: parameters: - $ref: "#/components/parameters/ID" tags: - logs - executions - api summary: "Get execution's logs by ID" description: "Returns logs of the given executionID" operationId: getExecutionLogs responses: 200: description: successful operation content: application/json: schema: type: array items: $ref: "#/components/schemas/ExecutorOutput" 500: description: "problem with getting execution's logs" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /executions/{id}/artifacts/{filename}: get: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/Filename" tags: - artifacts - executions - api summary: "Download artifact" description: "Download the artifact file from the given execution" operationId: downloadFile responses: 200: description: "successful operation" content: application/octet-stream: schema: type: string format: binary 500: description: "problem with getting artifacts from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /tests: get: tags: - tests - api summary: "List tests" description: "List available tests" operationId: listTests parameters: - $ref: "#/components/parameters/Selector" - $ref: "#/components/parameters/TextSearch" responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/Test" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" post: tags: - tests - api summary: "Create new test" description: "Create new test based on file content, uri or git based data" operationId: createTest requestBody: description: test details body required: true content: application/json: schema: $ref: "#/components/schemas/TestUpsertRequest" responses: 200: description: "successful operation" content: text/yaml: schema: type: string 201: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Test" 400: description: "problem with test definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - tests - api summary: "Delete tests" description: "Deletes all or labeled tests" operationId: deleteTests parameters: - $ref: "#/components/parameters/Selector" responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /tests/{id}: patch: parameters: - $ref: "#/components/parameters/ID" tags: - tests - api summary: "Update test" description: "Update test based on test content or git based data" operationId: updateTest requestBody: description: test details body required: true content: application/json: schema: $ref: "#/components/schemas/TestUpdateRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Test" 400: description: "problem with test definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: tags: - tests - api parameters: - $ref: "#/components/parameters/ID" summary: "Get test" description: "Gets the specified test" operationId: getTest responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Test" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - tests - api parameters: - $ref: "#/components/parameters/ID" summary: "Delete test" description: "Deletes a test" operationId: deleteTest responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /tests/{id}/metrics: get: tags: - tests - api parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/LastNDays" - $ref: "#/components/parameters/Limit" summary: "Get test metrics" description: "Gets test metrics for given tests executions, with particular execution status and timings" operationId: getTestMetrics responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/ExecutionsMetrics" text/yaml: schema: type: string 502: description: "problem with read information from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-with-executions: get: tags: - tests - api summary: "List test with executions" description: "List available test with executions" operationId: listTestWithExecutions parameters: - $ref: "#/components/parameters/Selector" - $ref: "#/components/parameters/TextSearch" - $ref: "#/components/parameters/ExecutionsStatusFilter" - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageIndex" responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/TestWithExecutionSummary" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-with-executions/{id}: get: tags: - tests - api parameters: - $ref: "#/components/parameters/ID" summary: "Get test with execution" description: "Gets the specified test with execution" operationId: getTestWithExecution responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestWithExecution" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /tests/{id}/executions: post: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/Namespace" tags: - api - tests - executions summary: "Starts new test execution" description: "New test execution returns new execution details on successful execution start" operationId: executeTest requestBody: description: body passed to configure execution required: true content: application/json: schema: $ref: "#/components/schemas/ExecutionRequest" responses: 201: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ExecutionResult" 400: description: "problem with request body" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with test execution" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/LastNDays" - $ref: "#/components/parameters/PageSize" - $ref: "#/components/parameters/PageIndex" - $ref: "#/components/parameters/ExecutionsStatusFilter" - $ref: "#/components/parameters/StartDateFilter" - $ref: "#/components/parameters/EndDateFilter" tags: - api - tests - executions summary: "Get all test executions" description: "Returns array of all available test executions" operationId: listTestExecutions responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ExecutionsResult" 500: description: "problem with getting test executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /tests/{id}/executions/{executionID}: get: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/executionID" tags: - api - tests - executions summary: "Get test execution" description: "Returns execution with given executionID" operationId: getTestExecution responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/Execution" 500: description: "problem with getting test executions from storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: parameters: - $ref: "#/components/parameters/ID" - $ref: "#/components/parameters/executionID" tags: - api - tests - executions summary: "Aborts execution" description: "Aborts execution with given executionID" operationId: abortExecution responses: 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 204: description: "no content" /executors: get: tags: - executor - api summary: "List executors" description: "List executors available in cluster" operationId: listExecutors parameters: - $ref: "#/components/parameters/Selector" responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/Executor" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" post: tags: - executor - api summary: "Create new executor" description: "Create new executor based on variables passed in request" operationId: createExecutor requestBody: description: executor request body data required: true content: application/json: schema: $ref: "#/components/schemas/ExecutorUpsertRequest" responses: 200: description: "successful operation" content: text/yaml: schema: type: string 201: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/ExecutorDetails" 400: description: "problem with executor definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - executor - api summary: "Delete executors" description: "Deletes labeled executors" operationId: deleteExecutors parameters: - $ref: "#/components/parameters/Selector" responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /executors/{id}: delete: parameters: - $ref: "#/components/parameters/ID" tags: - api - executor summary: "Delete executor" description: "Deletes executor by its name" operationId: deleteExecutor responses: 204: description: executor deleted successfuly 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: parameters: - $ref: "#/components/parameters/ID" tags: - api - executor summary: "Get executor details" description: "Returns executors data with executions passed to executor" operationId: getExecutor responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/ExecutorDetails" text/yaml: schema: type: string 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with getting executor data" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: parameters: - $ref: "#/components/parameters/ID" tags: - executor - api summary: "Update executor" description: "Update new executor based on variables passed in request" operationId: updateExecutor requestBody: description: executor request body data required: true content: application/json: schema: $ref: "#/components/schemas/ExecutorUpdateRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/ExecutorDetails" 400: description: "problem with executor definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /labels: get: tags: - labels summary: "List labels" description: "list all available labels" operationId: listLabels responses: 200: description: "successful operation" content: application/json: schema: type: object additionalProperties: type: array items: type: string example: app: - backend env: - prod toDelete: - "yes" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /webhooks: get: tags: - webhook - api summary: "List webhooks" description: "List webhooks available in cluster" operationId: listWebhooks parameters: - $ref: "#/components/parameters/Selector" responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/Webhook" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" post: tags: - webhook - api summary: "Create new webhook" description: "Create new webhook based on variables passed in request" operationId: createWebhook requestBody: description: executor request body data required: true content: application/json: schema: $ref: "#/components/schemas/WebhookCreateRequest" responses: 200: description: "successful operation" content: text/yaml: schema: type: string 201: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/Webhook" 400: description: "problem with executor definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - webhook - api summary: "Delete webhooks" description: "Deletes labeled webhooks" operationId: deleteWebhooks parameters: - $ref: "#/components/parameters/Selector" responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /webhooks/{id}: delete: parameters: - $ref: "#/components/parameters/ID" tags: - api - webhook summary: "Delete webhook" description: "Deletes webhook by its name" operationId: deleteWebhook responses: 204: description: webhook deleted successfuly 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: parameters: - $ref: "#/components/parameters/ID" tags: - api - webhook summary: "Get webhook details" description: "Returns webhook" operationId: getWebhook responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/Webhook" text/yaml: schema: type: string 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with getting webhook data" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /config: patch: tags: - api summary: "Update config" description: "Updates config in cluster storage state" operationId: updateConfigKey requestBody: description: config request body data required: true content: application/json: schema: $ref: "#/components/schemas/Config" responses: 200: description: update successful content: application/json: schema: $ref: "#/components/schemas/Config" 502: description: "problem with updating key in cluster storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: tags: - api summary: "Get config" description: "Get config from cluster storage state" operationId: getConfig responses: 200: description: get successful content: application/json: schema: $ref: "#/components/schemas/Config" 502: description: "problem with getting config from cluster storage" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /debug: get: tags: - api summary: "Get debug information" description: "Gets information that is needed for debugging and opening Testkube bug reports" operationId: getDebugInfo responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/DebugInfo" 500: description: "problem with getting debug information" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-sources: get: tags: - test-sources - api summary: "List test sources" description: "List test sources available in cluster" operationId: listTestSources parameters: - $ref: "#/components/parameters/Selector" responses: 200: description: "successful operation" content: application/json: schema: type: array items: $ref: "#/components/schemas/TestSource" text/yaml: schema: type: string 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" post: tags: - test-sources - api summary: "Create new test source" description: "Create new test source based on variables passed in request" operationId: createTestSource requestBody: description: test source request body data required: true content: application/json: schema: $ref: "#/components/schemas/TestSourceUpsertRequest" responses: 200: description: "successful operation" content: text/yaml: schema: type: string 201: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestSource" 400: description: "problem with test source definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" patch: tags: - test-sources - api summary: "Process test source batch (create, update, delete)" description: "Process test source batch based on variables passed in request" operationId: processTestSourceBatch requestBody: description: test source batch request body data required: true content: application/json: schema: $ref: "#/components/schemas/TestSourceBatchRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestSourceBatchResult" 400: description: "problem with test source definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: tags: - test-sources - api summary: "Delete test sources" description: "Deletes labeled test sources" operationId: deleteTestSources parameters: - $ref: "#/components/parameters/Selector" responses: 204: description: "no content" 502: description: "problem with read information from kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /test-sources/{id}: patch: parameters: - $ref: "#/components/parameters/ID" tags: - test-sources - api summary: "Update test source" description: "Update test source based on test content or git based data" operationId: updateTestSource requestBody: description: test source body required: true content: application/json: schema: $ref: "#/components/schemas/TestSourceUpdateRequest" responses: 200: description: "successful operation" content: application/json: schema: $ref: "#/components/schemas/TestSource" 400: description: "problem with test source definition - probably some bad input occurs (invalid JSON body or similar)" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" delete: parameters: - $ref: "#/components/parameters/ID" tags: - api - test-sources summary: "Delete test source" description: "Deletes test source by its name" operationId: deleteTestSource responses: 204: description: test source deleted successfuly 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" get: parameters: - $ref: "#/components/parameters/ID" tags: - api - test-sources summary: "Get test source data" description: "Returns test sources data" operationId: getTestSource responses: 200: description: successful operation content: application/json: schema: $ref: "#/components/schemas/TestSource" text/yaml: schema: type: string 502: description: "problem with communicating with kubernetes cluster" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" 500: description: "problem with getting test source data" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" /uploads: post: tags: - api - tests - executions summary: "Upload file" description: "Upload file to be used in executions and tests" operationId: uploads requestBody: $ref: "#/components/requestBodies/UploadsBody" responses: 200: description: "successful operation" content: application/json: schema: type: string text/yaml: schema: type: string 500: description: "could not upload file" content: application/problem+json: schema: type: array items: $ref: "#/components/schemas/Problem" components: schemas: ExecutionsMetrics: type: object properties: passFailRatio: type: number description: Percentage pass to fail ratio example: 50 executionDurationP50: type: string description: 50th percentile of all durations example: "7m2.71s" executionDurationP50ms: type: integer description: 50th percentile of all durations in milliseconds example: 422 executionDurationP90: type: string description: 90th percentile of all durations example: "7m2.71s" executionDurationP90ms: type: integer description: 90th percentile of all durations in milliseconds example: 422 executionDurationP95: type: string description: 95th percentile of all durations example: "7m2.71s" executionDurationP95ms: type: integer description: 95th percentile of all durations in milliseconds example: 422 executionDurationP99: type: string description: 99th percentile of all durations example: "7m2.71s" executionDurationP99ms: type: integer description: 99th percentile of all durations in milliseconds example: 422 totalExecutions: type: integer description: total executions number example: 2 failedExecutions: type: integer description: failed executions number example: 1 executions: type: array description: List of test/testsuite executions items: $ref: "#/components/schemas/ExecutionsMetricsExecutions" ExecutionsMetricsExecutions: type: object properties: executionId: type: string duration: type: string durationMs: type: integer status: type: string name: type: string startTime: type: string format: date-time Variables: type: object description: "execution variables passed to executor converted to vars for usage in tests" additionalProperties: $ref: "#/components/schemas/Variable" example: var1: name: "var1" type: "basic" value: "value1" secret1: name: "secret1" type: "secret" value: "secretvalue1" Variable: type: object properties: name: type: string value: type: string type: $ref: "#/components/schemas/VariableType" secretRef: $ref: "#/components/schemas/SecretRef" VariableType: type: string enum: - basic - secret ObjectRef: required: - name type: object properties: namespace: type: string description: object kubernetes namespace example: "testkube" name: type: string description: object name example: "name" SecretRef: required: - name - key type: object description: Testkube internal reference for secret storage in Kubernetes secrets properties: namespace: type: string description: object kubernetes namespace name: type: string description: object name key: type: string description: object key TestSuite: type: object required: - name - status - steps properties: name: type: string example: "test-suite1" namespace: type: string example: "testkube" description: type: string example: "collection of tests" before: type: array items: $ref: "#/components/schemas/TestSuiteStep" description: Run this step before whole suite example: - stopTestOnFailure: true execute: namespace: "testkube" name: "example-test" steps: type: array items: $ref: "#/components/schemas/TestSuiteStep" description: Steps to run example: - stopTestOnFailure: true execute: namespace: "testkube" name: "example-test" after: type: array items: $ref: "#/components/schemas/TestSuiteStep" description: Run this step after whole suite example: - stopTestOnFailure: true execute: namespace: "testkube" name: "example-test" labels: type: object description: "test suite labels" additionalProperties: type: string example: env: "prod" app: "backend" schedule: type: string description: schedule to run test suite example: "* * * * *" repeats: type: integer default: 1 example: 1 created: type: string format: date-time executionRequest: $ref: "#/components/schemas/TestSuiteExecutionRequest" status: $ref: "#/components/schemas/TestSuiteStatus" TestSuiteStepType: type: string enum: - executeTest - delay TestSuiteStep: type: object required: - name - type - stopTestOnFailure properties: stopTestOnFailure: type: boolean default: true execute: $ref: "#/components/schemas/TestSuiteStepExecuteTest" delay: $ref: "#/components/schemas/TestSuiteStepDelay" TestSuiteStepExecuteTest: allOf: - $ref: "#/components/schemas/ObjectRef" TestSuiteStepDelay: type: object required: - duration - name properties: duration: type: integer default: 0 description: delay duration in milliseconds TestSuiteExecution: type: object description: Test suite executions data required: - id - name - test properties: id: type: string description: execution id format: bson objectId example: "62f395e004109209b50edfc1" name: type: string description: "execution name" example: "test-suite1.needlessly-sweet-imp" testSuite: $ref: "#/components/schemas/ObjectRef" description: object name and namespace status: $ref: "#/components/schemas/TestSuiteExecutionStatus" envs: type: object description: "environment variables passed to executor" additionalProperties: type: string example: record: "true" prefix: "some-" variables: $ref: "#/components/schemas/Variables" secretUUID: type: string description: secret uuid readOnly: true example: "7934600f-b367-48dd-b981-4353304362fb" startTime: type: string description: "test start time" format: date-time endTime: type: string description: "test end time" format: date-time duration: type: string description: "test duration" example: "2m" durationMs: type: integer description: "test duration in ms" example: 6000 stepResults: type: array description: "steps execution results" items: $ref: "#/components/schemas/TestSuiteStepExecutionResult" description: test execution results labels: type: object description: "test suite labels" additionalProperties: type: string example: env: "prod" app: "backend" TestSuiteExecutionStatus: type: string enum: - queued - running - passed - failed - aborting - aborted - timeout TestSuiteStepExecutionResult: description: execution result returned from executor type: object required: - status properties: step: $ref: "#/components/schemas/TestSuiteStep" test: $ref: "#/components/schemas/ObjectRef" description: object name and namespace execution: $ref: "#/components/schemas/Execution" description: test step execution TestSuiteExecutionsResult: description: the result for a page of executions type: object required: - totals - results properties: totals: $ref: "#/components/schemas/ExecutionsTotals" filtered: $ref: "#/components/schemas/ExecutionsTotals" results: type: array items: $ref: "#/components/schemas/TestSuiteExecutionSummary" TestSuiteExecutionSummary: description: "Test execution summary" type: object required: - id - name - testSuiteName - status properties: id: type: string description: execution id format: bson objectId example: "62f395e004109209b50edfc1" name: type: string description: execution name example: "test-suite1.needlessly-sweet-imp" testSuiteName: type: string description: name of the test suite example: "test-suite1" status: $ref: "#/components/schemas/TestSuiteExecutionStatus" startTime: type: string description: "test suite execution start time" format: date-time endTime: type: string description: "test suite execution end time" format: date-time duration: type: string description: "test suite execution duration" example: "00:00:09" durationMs: type: integer description: "test suite execution duration in ms" example: 9009 execution: type: array items: $ref: "#/components/schemas/TestSuiteStepExecutionSummary" labels: type: object description: "test suite and execution labels" additionalProperties: type: string example: env: "prod" app: "backend" TestSuiteStepExecutionSummary: description: "Test suite execution summary" type: object required: - id - name - status properties: id: type: string example: "62f395e004109209b50edfc4" name: type: string description: execution name example: "run:testkube/test1" testName: type: string description: test name example: "test1" status: $ref: "#/components/schemas/ExecutionStatus" type: $ref: "#/components/schemas/TestSuiteStepType" TestSuiteStatus: type: object description: test suite status properties: latestExecution: $ref: "#/components/schemas/TestSuiteExecutionCore" TestSuiteExecutionCore: type: object description: test suite execution core properties: id: type: string description: execution id format: bson objectId example: "62f395e004109209b50edfc4" startTime: type: string description: "test suite execution start time" format: date-time endTime: type: string description: "test suite execution end time" format: date-time status: $ref: "#/components/schemas/TestSuiteExecutionStatus" Test: type: object properties: name: type: string description: test name example: "test1" namespace: type: string description: test namespace example: "testkube" type: type: string description: test type example: "postman/collection" content: $ref: "#/components/schemas/TestContent" description: test content source: type: string description: reference to test source resource example: "my-private-repository-test" created: type: string format: date-time example: "2022-07-30T06:54:15Z" labels: type: object description: "test labels" additionalProperties: type: string example: env: "prod" app: "backend" schedule: type: string description: schedule to run test example: "* * * * *" uploads: type: array items: type: string description: list of file paths that will be needed from uploads example: - settings/config.txt executionRequest: $ref: "#/components/schemas/ExecutionRequest" status: $ref: "#/components/schemas/TestStatus" TestContent: type: object properties: type: type: string description: test type enum: - string - file-uri - git-file - git-dir repository: $ref: "#/components/schemas/Repository" data: type: string description: test content data as string uri: type: string description: test content example: "https://github.com/kubeshop/testkube" TestContentRequest: description: test content request body type: object properties: repository: $ref: "#/components/schemas/RepositoryParameters" TestContentUpdate: description: test content update body type: object nullable: true allOf: - $ref: "#/components/schemas/TestContent" TestContentUpdateRequest: description: test content update request body type: object nullable: true allOf: - $ref: "#/components/schemas/TestContentRequest" TestSource: description: Test source resource for shared test content type: object allOf: - $ref: "#/components/schemas/TestContent" properties: name: type: string description: test source name example: "testsource1" namespace: type: string description: test source namespace example: "testkube" labels: type: object description: "test source labels" additionalProperties: type: string TestSourceUpdate: description: Test source resource update for shared test content type: object nullable: true allOf: - $ref: "#/components/schemas/TestContent" properties: name: type: string description: test source name example: "testsource1" namespace: type: string description: test source namespace example: "testkube" labels: type: object description: "test source labels" additionalProperties: type: string TestSourceUpsertRequest: description: test source create request body type: object allOf: - $ref: "#/components/schemas/TestContent" properties: name: type: string description: test source name example: "testsource1" namespace: type: string description: test source namespace example: "testkube" labels: type: object description: "test source labels" additionalProperties: type: string TestSourceUpdateRequest: description: test source update request body type: object nullable: true allOf: - $ref: "#/components/schemas/TestContent" properties: name: type: string description: test source name example: "testsource1" namespace: type: string description: test source namespace example: "testkube" labels: type: object description: "test source labels" additionalProperties: type: string TestStatus: type: object description: test status properties: latestExecution: $ref: "#/components/schemas/ExecutionCore" ExecutionCore: type: object description: test execution core properties: id: type: string description: execution id format: bson objectId example: "62f395e004109209b50edfc4" number: type: integer description: "execution number" example: 1 startTime: type: string description: "test start time" format: date-time endTime: type: string description: "test end time" format: date-time status: $ref: "#/components/schemas/ExecutionStatus" Execution: type: object description: test execution properties: id: type: string description: execution id format: bson objectId example: "62f395e004109209b50edfc4" testName: type: string description: unique test name (CRD Test name) example: "example-test" testSuiteName: type: string description: unique test suite name (CRD Test suite name), if it's run as a part of test suite example: "test-suite1" testNamespace: type: string description: test namespace example: "testkube" testType: type: string description: test type e.g. postman/collection example: "postman/collection" name: type: string description: "execution name" example: "test-suite1-example-test-1" number: type: integer description: "execution number" example: 1 envs: type: object description: "environment variables passed to executor" additionalProperties: type: string example: record: "true" prefix: "some-" args: type: array description: "additional arguments/flags passed to executor binary" example: ["--concurrency", "2", "--remote", "--some", "blabla"] items: type: string variables: $ref: "#/components/schemas/Variables" variablesFile: type: string description: variables file content - need to be in format for particular executor (e.g. postman envs file) testSecretUUID: type: string description: test secret uuid readOnly: true example: "7934600f-b367-48dd-b981-4353304362fb" testSuiteSecretUUID: type: string description: test suite secret uuid, if it's run as a part of test suite readOnly: true example: "7934600f-b367-48dd-b981-4353304362fb" content: $ref: "#/components/schemas/TestContent" startTime: type: string description: "test start time" format: date-time endTime: type: string description: "test end time" format: date-time duration: type: string description: "test duration" example: "88s" durationMs: type: integer description: "test duration in milliseconds" example: 10000 executionResult: $ref: "#/components/schemas/ExecutionResult" description: result get from executor labels: type: object description: "test and execution labels" additionalProperties: type: string example: env: "prod" app: "backend" uploads: type: array items: type: string description: list of file paths that need to be copied into the test from uploads example: - settings/config.txt bucketName: type: string description: minio bucket name to get uploads from example: execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43 artifactRequest: $ref: "#/components/schemas/ArtifactRequest" description: configuration parameters for storing container executor test artifacts preRunScript: type: string description: script to run before test execution example: "echo -n '$SECRET_ENV' > ./secret_file" Artifact: type: object description: API server artifact properties: name: type: string description: artifact file path size: type: integer description: file size in bytes ExecutionsResult: description: the result for a page of executions type: object required: - totals - results properties: totals: $ref: "#/components/schemas/ExecutionsTotals" filtered: $ref: "#/components/schemas/ExecutionsTotals" results: type: array items: $ref: "#/components/schemas/ExecutionSummary" ExecutionSummary: description: "Execution summary" type: object required: - id - name - testName - testType - status properties: id: type: string description: execution id format: bson objectId example: "62f395e004109209b50edfc4" name: type: string description: execution name example: "test-suite1-test1" number: type: integer description: execution number example: 1 testName: type: string description: name of the test example: "test1" testNamespace: type: string description: name of the test example: "testkube" testType: type: string description: the type of test for this execution example: "postman/collection" status: $ref: "#/components/schemas/ExecutionStatus" startTime: type: string description: "test execution start time" format: date-time endTime: type: string description: "test execution end time" format: date-time duration: type: string description: calculated test duration example: "00:00:13" durationMs: type: integer description: calculated test duration in ms example: 10000 labels: type: object description: "test and execution labels" additionalProperties: type: string example: env: "prod" app: "backend" ExecutionStatus: type: string enum: - queued - running - passed - failed - aborted - timeout ExecutionResult: description: execution result returned from executor type: object required: - status properties: status: $ref: "#/components/schemas/ExecutionStatus" output: type: string description: "RAW Test execution output, depends of reporter used in particular tool" outputType: type: string description: "output type depends of reporter used in particular tool" enum: - text/plain - application/junit+xml - application/json errorMessage: type: string description: "error message when status is error, separate to output as output can be partial in case of error" steps: type: array items: $ref: "#/components/schemas/ExecutionStepResult" description: execution steps (for collection of requests) reports: type: object properties: junit: type: string ExecutionStepResult: description: execution result data type: object required: - name - status properties: name: type: string description: step name example: "step1" duration: type: string format: duration example: "10m0s" status: type: string description: execution step status enum: [passed, failed] assertionResults: type: array items: $ref: "#/components/schemas/AssertionResult" AssertionResult: description: execution result data type: object properties: name: type: string example: "assertion1" status: type: string enum: [passed, failed] errorMessage: type: string nullable: true ExecutionsTotals: type: object description: various execution counters required: - results - passed - failed - queued - running properties: results: type: integer description: the total number of executions available passed: type: integer description: the total number of passed executions available failed: type: integer description: the total number of failed executions available queued: type: integer description: the total number of queued executions available running: type: integer description: the total number of running executions available ServerInfo: type: object description: Server information with build version, build commit etc. required: - version properties: version: type: string description: build version example: "v1.4.4" commit: type: string description: build commit example: "aaff223ae68aab1af56e8ed8c84c2b80ed63d9b8" namespace: type: string description: server installaton namespace example: "my-testkube" Repository: description: repository representation for tests in git repositories type: object required: - type - uri properties: type: type: string enum: - git description: VCS repository type uri: type: string description: uri of content file or git directory example: "https://github.com/kubeshop/testkube" branch: type: string description: branch/tag name for checkout example: "main" commit: type: string description: commit id (sha) for checkout example: "b928cbb7186944ab9275937ec1ac3d3738ca2e1d" path: type: string description: if needed we can checkout particular path (dir or file) in case of BIG/mono repositories example: "test/perf" username: type: string description: git auth username for private repositories token: type: string description: git auth token for private repositories usernameSecret: $ref: "#/components/schemas/SecretRef" tokenSecret: $ref: "#/components/schemas/SecretRef" certificateSecret: type: string description: secret with certificate for private repositories workingDir: type: string description: if provided we checkout the whole repository and run test from this directory example: "/" RepositoryParameters: description: repository parameters for tests in git repositories type: object properties: branch: type: string description: branch/tag name for checkout example: "main" commit: type: string description: commit id (sha) for checkout example: "b928cbb7186944ab9275937ec1ac3d3738ca2e1d" path: type: string description: if needed we can checkout particular path (dir or file) in case of BIG/mono repositories example: "test/perf" workingDir: type: string description: if provided we checkout the whole repository and run test from this directory example: "/" RepositoryUpdate: description: repository update body type: object nullable: true allOf: - $ref: "#/components/schemas/Repository" RepositoryUpdateParameters: description: repository update parameters for tests in git repositories type: object nullable: true allOf: - $ref: "#/components/schemas/RepositoryParameters" ArtifactRequest: description: artifact request body for container executors with test artifacts type: object required: - storageClassName - volumeMountPath properties: storageClassName: type: string description: artifact storage class name example: artifact-volume-local volumeMountPath: type: string description: artifact volume mount path dirs: type: array items: type: string description: artifact directories ArtifactUpdateRequest: description: artifact request update body type: object nullable: true allOf: - $ref: "#/components/schemas/ArtifactRequest" ExecutionRequest: description: test execution request body type: object properties: name: type: string description: test execution custom name example: "testing with 1000 users" testSuiteName: type: string description: unique test suite name (CRD Test suite name), if it's run as a part of test suite example: "test-suite1" number: type: integer description: test execution number executionLabels: type: object description: "test execution labels" additionalProperties: type: string example: users: "3" prefix: "some-" namespace: type: string description: test kubernetes namespace ("testkube" when not set) example: testkube variablesFile: type: string description: variables file content - need to be in format for particular executor (e.g. postman envs file) variables: $ref: "#/components/schemas/Variables" testSecretUUID: type: string description: test secret uuid readOnly: true example: "7934600f-b367-48dd-b981-4353304362fb" testSuiteSecretUUID: type: string description: test suite secret uuid, if it's run as a part of test suite readOnly: true example: "7934600f-b367-48dd-b981-4353304362fb" command: type: array description: "container executor image command" items: type: string example: - "curl" args: type: array description: "additional executor binary arguments" items: type: string example: - "--repeats" - "5" - "--insecure" image: type: string description: container image, executor will run inside this image example: kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91 imagePullSecrets: type: array description: "container image pull secrets" items: $ref: "#/components/schemas/LocalObjectReference" envs: type: object description: "environment variables passed to executor" additionalProperties: type: string example: record: "true" prefix: "some-" secretEnvs: type: object description: "execution variables passed to executor from secrets" additionalProperties: type: string example: secret_key_name1: "secret-name" secret_Key_name2: "secret-name" sync: type: boolean description: whether to start execution sync or async httpProxy: type: string description: http proxy for executor containers example: user:pass@my.proxy.server:8080 httpsProxy: type: string description: https proxy for executor containers example: user:pass@my.proxy.server:8081 negativeTest: type: boolean description: whether to run test as negative test example: false isNegativeTestChangedOnRun: type: boolean description: whether negativeTest was changed by user example: false activeDeadlineSeconds: type: integer format: int64 description: duration in seconds the test may be active, until its stopped example: 1 uploads: type: array items: type: string description: list of file paths that need to be copied into the test from uploads example: - settings/config.txt bucketName: type: string description: minio bucket name to get uploads from example: execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43 artifactRequest: $ref: "#/components/schemas/ArtifactRequest" description: configuration parameters for storing container executor test artifacts jobTemplate: type: string description: job template extensions contentRequest: $ref: "#/components/schemas/TestContentRequest" description: adjusting parameters for test content preRunScript: type: string description: script to run before test execution example: "echo -n '$SECRET_ENV' > ./secret_file" scraperTemplate: type: string description: scraper template extensions ExecutionUpdateRequest: description: test execution request update body type: object nullable: true allOf: - $ref: "#/components/schemas/ExecutionRequest" TestSuiteExecutionRequest: description: test suite execution request body type: object properties: name: type: string description: test execution custom name example: "testing with 1000 users" number: type: integer description: test suite execution number example: 1 namespace: type: string description: test kubernetes namespace ("testkube" when not set) example: testkube variables: $ref: "#/components/schemas/Variables" secretUUID: type: string description: secret uuid readOnly: true example: "7934600f-b367-48dd-b981-4353304362fb" labels: type: object description: "test suite labels" additionalProperties: type: string example: users: "3" prefix: "some-" executionLabels: type: object description: "execution labels" additionalProperties: type: string example: users: "3" prefix: "some-" sync: type: boolean description: whether to start execution sync or async httpProxy: type: string description: http proxy for executor containers example: user:pass@my.proxy.server:8080 httpsProxy: type: string description: https proxy for executor containers example: user:pass@my.proxy.server:8081 timeout: type: integer format: int32 description: duration in seconds the test suite may be active, until its stopped example: 1 contentRequest: $ref: "#/components/schemas/TestContentRequest" description: adjusting parameters for test content TestSuiteExecutionUpdateRequest: description: test suite execution update request body type: object nullable: true allOf: - $ref: "#/components/schemas/TestSuiteExecutionRequest" TestUpsertRequest: description: test create request body type: object allOf: - $ref: "#/components/schemas/Test" TestUpdateRequest: description: test update request body type: object nullable: true allOf: - $ref: "#/components/schemas/Test" TestSuiteUpsertRequest: description: test suite create request body type: object required: - name - namespace allOf: - $ref: "#/components/schemas/TestSuite" - $ref: "#/components/schemas/ObjectRef" TestSuiteUpdateRequest: description: test suite update body type: object nullable: true allOf: - $ref: "#/components/schemas/TestSuite" - $ref: "#/components/schemas/ObjectRef" TestTriggerUpsertRequest: description: test trigger create or update request body type: object required: - resource - resourceSelector - event - action - execution - testSelector allOf: - $ref: "#/components/schemas/TestTrigger" - $ref: "#/components/schemas/ObjectRef" ExecutorUpsertRequest: description: executor create request body type: object required: - name - namespace - types allOf: - $ref: "#/components/schemas/Executor" - $ref: "#/components/schemas/ObjectRef" ExecutorUpdateRequest: description: executor update request body type: object nullable: true allOf: - $ref: "#/components/schemas/Executor" - $ref: "#/components/schemas/ObjectRef" WebhookCreateRequest: description: webhook create request body type: object allOf: - $ref: "#/components/schemas/Webhook" # Copied from CRD spec # https://github.com/kubeshop/testkube-operator/blob/main/config/crd/bases/executor.testkube.io_executors.yaml # TODO we need to sync those in some nice way Executor: description: CRD based executor data type: object properties: executorType: description: ExecutorType one of "rest" for rest openapi based executors or "job" which will be default runners for testkube soon type: string image: description: Image for kube-job type: string imagePullSecrets: type: array description: "container image pull secrets" items: $ref: "#/components/schemas/LocalObjectReference" command: type: array description: "container executor image command" items: type: string example: - "curl" args: type: array description: "additional executor binary arguments" items: type: string example: - "--repeats" - "5" - "--insecure" types: description: Types defines what types can be handled by executor e.g. "postman/collection", ":curl/command" etc items: type: string type: array uri: description: URI for rest based executors type: string contentTypes: description: list of handled content types items: type: string type: array jobTemplate: description: Job template to launch executor type: string labels: type: object description: "executor labels" additionalProperties: type: string example: env: "prod" app: "backend" features: description: Available executor features type: array items: type: string enum: - artifacts - junit-report meta: $ref: "#/components/schemas/ExecutorMeta" ExecutorDetails: description: Executor details with Executor data and additional information like list of executions type: object properties: name: description: Executor name type: string executor: $ref: "#/components/schemas/Executor" executions: $ref: "#/components/schemas/ExecutionsResult" ExecutorOutput: description: CRD based executor data type: object required: - type properties: type: type: string description: One of possible output types enum: - error - log - event - result content: type: string description: Message/event data passed from executor (like log lines etc) result: $ref: "#/components/schemas/ExecutionResult" description: Execution result when job is finished time: type: string format: date-time description: Timestamp of log example: "2018-03-20T09:12:28Z" ExecutorMeta: description: Executor meta data type: object properties: iconURI: description: URI for executor icon type: string example: /assets/k6.jpg docsURI: description: URI for executor docs type: string example: https://kubeshop.github.io/testkube/test-types/executor-k6 tooltips: type: object description: executor tooltips additionalProperties: type: string example: general: "please provide k6 test script for execution" ExecutorMetaUpdate: description: Executor meta update data type: object nullable: true allOf: - $ref: "#/components/schemas/ExecutorMeta" Webhook: description: CRD based webhook data type: object required: - uri - types properties: name: type: string example: "webhook1" namespace: type: string example: "testkube" uri: type: string example: "https://hooks.app.com/services/1" events: type: array items: $ref: "#/components/schemas/EventType" selector: type: string description: Labels to filter for tests and test suites labels: type: object description: "webhook labels" additionalProperties: type: string example: env: "prod" app: "backend" Event: description: CRD based executor data type: object required: - type - id properties: id: type: string description: UUID of event type: $ref: "#/components/schemas/EventType" testExecution: $ref: "#/components/schemas/Execution" testSuiteExecution: $ref: "#/components/schemas/TestSuiteExecution" EventType: type: string enum: - start-test - end-test-success - end-test-failed - end-test-aborted - end-test-timeout - start-testsuite - end-testsuite-success - end-testsuite-failed - end-testsuite-aborted - end-testsuite-timeout EventResult: description: Listener result after sending particular event type: object required: - type properties: id: type: string description: UUID of event error: type: string description: error message if any result: type: string format: error description: result of event TestWithExecution: description: Test with latest Execution result type: object required: - test properties: test: $ref: "#/components/schemas/Test" latestExecution: $ref: "#/components/schemas/Execution" TestWithExecutionSummary: description: Test with latest Execution result summary type: object required: - test properties: test: $ref: "#/components/schemas/Test" latestExecution: $ref: "#/components/schemas/ExecutionSummary" TestSuiteWithExecution: description: Test suite with latest execution result type: object required: - testSuite properties: testSuite: $ref: "#/components/schemas/TestSuite" latestExecution: $ref: "#/components/schemas/TestSuiteExecution" TestSuiteWithExecutionSummary: description: Test suite with latest execution result type: object required: - testSuite properties: testSuite: $ref: "#/components/schemas/TestSuite" latestExecution: $ref: "#/components/schemas/TestSuiteExecutionSummary" Config: description: Testkube API config data structure type: object required: - id - clusterId - enableTelemetry properties: id: type: string clusterId: type: string enableTelemetry: type: boolean DebugInfo: description: Testkube debug info type: object properties: clientVersion: type: string example: "1.4.9" serverVersion: type: string example: "v1.4.9" clusterVersion: type: string example: "v1.23.4" apiLogs: type: array items: type: string example: ["logline1", "logline2", "logline3"] operatorLogs: type: array items: type: string example: ["logline1", "logline2", "logline3"] executionLogs: type: object additionalProperties: type: array items: type: string example: ["logline1", "logline2", "logline3"] TestTrigger: type: object required: - resource - resourceSelector - event - action - execution - testSelector properties: name: type: string description: test trigger name example: "test1" namespace: type: string description: test trigger namespace example: "testkube" labels: type: object description: "test trigger labels" additionalProperties: type: string example: env: "prod" app: "backend" resource: $ref: "#/components/schemas/TestTriggerResources" resourceSelector: $ref: "#/components/schemas/TestTriggerSelector" event: type: string description: listen for event for selected resource example: modified conditionSpec: $ref: "#/components/schemas/TestTriggerConditionSpec" action: $ref: "#/components/schemas/TestTriggerActions" execution: $ref: "#/components/schemas/TestTriggerExecutions" testSelector: $ref: "#/components/schemas/TestTriggerSelector" LocalObjectReference: description: Reference to Kubernetes object type: object properties: name: type: string TestTriggerSelector: type: object properties: name: type: string description: kubernetes resource name selector example: nginx namespace: type: string description: resource namespace example: testkube labelSelector: $ref: "https://raw.githubusercontent.com/garethr/kubernetes-json-schema/master/v1.7.8/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" description: label selector for Kubernetes resources TestTriggerResources: description: supported kubernetes resources for test triggers type: string enum: - pod - deployment - statefulset - daemonset - service - ingress - event - configmap TestTriggerExecutions: description: supported test resources for test triggers type: string enum: - test - testsuite TestTriggerActions: description: supported actions for test triggers type: string enum: - run TestTriggerConditionSpec: type: object properties: conditions: type: array items: $ref: "#/components/schemas/TestTriggerCondition" description: list of test trigger conditions timeout: type: integer format: int32 description: duration in seconds the test trigger waits for conditions, until its stopped example: 1 TestTriggerCondition: description: supported condition for test triggers type: object required: - status - type properties: status: $ref: "#/components/schemas/TestTriggerConditionStatuses" type: type: string description: test trigger condition example: Progressing reason: type: string description: test trigger condition reason example: NewReplicaSetAvailable TestTriggerConditionStatuses: description: supported kubernetes condition statuses for test triggers type: string enum: - "True" - "False" - "Unknown" TestTriggerKeyMap: type: object required: - resources - actions - executions - events properties: resources: type: array items: type: string description: list of supported values for resources example: ["pod", "deployment", "statefulset", "daemonset", "service", "ingress", "event", "configmap"] actions: type: array items: type: string description: list of supported values for resources example: ["run"] executions: type: array items: type: string description: list of supported values for resources example: ["test", "testsuite"] events: type: object additionalProperties: type: array items: type: string description: mapping between resources and supported events example: { "pod": ["created", "modified", "deleted"], "deployment": ["created", "modified", "deleted"] } TestSourceBatchRequest: description: Test source batch request type: object required: - batch properties: batch: type: array items: $ref: "#/components/schemas/TestSourceUpsertRequest" TestSourceBatchResult: description: Test source batch result type: object properties: created: type: array items: type: string description: created test sources example: ["name1", "name2", "name3"] updated: type: array items: type: string description: updated test sources example: ["name4", "name5", "name6"] deleted: type: array items: type: string description: deleted test sources example: ["name7", "name8", "name9"] # # Errors # Problem: description: problem response in case of error type: object properties: type: type: string description: Type contains a URI that identifies the problem type. example: https://kubeshop.io/testkube/problems/invalidtestname title: type: string description: Title is a short, human-readable summary of the problem type. This title SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. example: Invalid test name status: type: integer description: HTTP status code for this occurrence of the problem. example: 500 detail: type: string description: A human-readable explanation specific to this occurrence of the problem. example: Your test name can't contain forbidden characters like "}}}" passed instance: type: string description: A URI that identifies the specific occurrence of the problem. This URI may or may not yield further information if de-referenced. example: http://10.23.23.123:8088/tests # # Parameters # parameters: TestName: in: query name: test schema: type: string default: "" description: test namespaced name to filter required: false Type: in: query name: type schema: type: string default: "" description: object type required: false TextSearch: in: query name: textSearch schema: type: string default: "" description: text to search in name and test name required: false ID: in: path name: id schema: type: string required: true description: unique id of the object executionID: in: path name: executionID schema: type: string required: true description: unique id of the object execution Filename: in: path name: filename schema: type: string required: true description: filename of the object usually used for artifacts LastNDays: in: query name: last schema: type: integer default: 7 description: last N days to show required: false Limit: in: query name: limit schema: type: integer default: 7 description: limit records count same as pageSize required: false PageSize: in: query name: pageSize schema: type: integer default: 100 description: the number of executions to get, setting to 0 will return only totals required: false PageIndex: in: query name: page schema: type: integer default: 0 description: the page index to start at required: false StartDateFilter: in: query name: startDate schema: type: string format: date required: false description: startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd" EndDateFilter: in: query name: endDate schema: type: string format: date required: false description: endDate for filtering TestExecutionsStatusFilter: in: query name: status schema: $ref: "#/components/schemas/TestSuiteExecutionStatus" description: optional status filter containing multiple values separated by comma required: false ExecutionsStatusFilter: in: query name: status schema: $ref: "#/components/schemas/ExecutionStatus" description: optional status filter containing multiple values separated by comma required: false Selector: in: query name: selector schema: type: string description: Labels to filter by ExecutionSelector: in: query name: executionSelector schema: type: string description: Execution Labels to add to executions ConcurrencyLevel: in: query name: concurrency schema: type: integer default: 10 Namespace: in: query name: namespace schema: type: string default: "testkube" description: Namespace of the object Name: in: query name: name schema: type: string description: Name of the object requestBodies: UploadsBody: description: "Upload files request body data" required: true content: multipart/form-data: schema: type: object properties: parentName: type: string example: "test-1" parentType: type: string enum: - test - execution filePath: type: string example: folder/file.txt