Operations 11
Documentation
Documentation
https://docs.testkube.io/openapi/overview
Documentation
https://docs.testkube.io/openapi/agent/default--test-workflows
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/kubeshop-tests-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Testkube Tests API
description: Testkube provides a Kubernetes-native framework for test definition, execution and results
contact:
email: contact@testkube.io
license:
name: MIT
url: https://opensource.org/licenses/MIT
version: 1.0.0
tags:
- name: tests
description: Tests operations
paths:
/test-suites/{id}/metrics:
get:
tags:
- tests
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'
500:
description: problem with read information from storage
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
/tests:
get:
tags:
- tests
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
400:
description: invalid parameters
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
502:
description: problem with read information from kubernetes cluster
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
post:
tags:
- tests
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'
text/yaml:
schema:
type: string
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
summary: Delete tests
description: Deletes all or labeled tests
operationId: deleteTests
parameters:
- $ref: '#/components/parameters/Selector'
responses:
204:
description: no content
404:
description: no tests found
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
500:
description: problem with deleting tests and their executions
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
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
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'
text/yaml:
schema:
type: string
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'
404:
description: test not found
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
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
400:
description: invalid parameters
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
404:
description: test not found
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
502:
description: problem with read information from kubernetes cluster
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
delete:
tags:
- tests
parameters:
- $ref: '#/components/parameters/ID'
- $ref: '#/components/parameters/SkipDeleteExecutions'
- $ref: '#/components/parameters/SkipDeleteCRD'
summary: Delete test
description: Deletes a test
operationId: deleteTest
responses:
204:
description: no content
404:
description: no tests found
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
500:
description: problem with deleting test and its executions
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
502:
description: problem with read information from kubernetes cluster
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
/tests/{id}/abort:
post:
tags:
- tests
parameters:
- $ref: '#/components/parameters/ID'
summary: Abort all executions of a test
description: Abort all test executions
operationId: abortTestExecutions
responses:
204:
description: no content
404:
description: no execution found
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
500:
description: problem with aborting test execution
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
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
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'
500:
description: problem with getting metrics
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
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
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
400:
description: invalid parameters
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
500:
description: problem with getting tests and their executions
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
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
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
400:
description: invalid parameters
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
404:
description: no tests found
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
500:
description: problem with getting tests and their executions
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
502:
description: problem with read information from kubernetes cluster
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
components:
parameters:
SkipDeleteCRD:
in: query
name: skipDeleteCRD
schema:
type: boolean
default: false
description: dont delete CRD
required: false
ID:
in: path
name: id
schema:
type: string
required: true
description: unique id of the object
ExecutionsStatusFilter:
in: query
name: status
schema:
$ref: '#/components/schemas/ExecutionStatus'
description: optional status filter containing multiple values separated by comma
required: false
PageIndex:
in: query
name: page
schema:
type: integer
default: 0
description: the page index to start at
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
Selector:
in: query
name: selector
schema:
type: string
description: Labels to filter by
TextSearch:
in: query
name: textSearch
schema:
type: string
default: ''
description: text to search in name and test name
required: false
LastNDays:
in: query
name: last
schema:
type: integer
default: 7
description: last N days to show
required: false
SkipDeleteExecutions:
in: query
name: skipDeleteExecutions
schema:
type: boolean
default: false
description: dont delete executions
required: false
schemas:
Test:
type: object
properties:
name:
type: string
description: test name
example: test1
namespace:
type: string
description: test namespace
example: testkube
description:
type: string
description: test description
example: this test is used for that purpose
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: '* * * * *'
readOnly:
type: boolean
description: if test is offline and cannot be executed
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'
PodResourcesRequest:
description: pod resources request specification
type: object
properties:
requests:
$ref: '#/components/schemas/ResourceRequest'
description: pod resources requests
limits:
$ref: '#/components/schemas/ResourceRequest'
description: pod resources limits
LocalObjectReference:
description: Reference to Kubernetes object
type: object
properties:
name:
type: string
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: /
ExecutionRequest:
description: test execution request body
type: object
properties:
id:
type: string
description: execution id
format: bson objectId
example: 62f395e004109209b50edfc1
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
isVariablesFileUploaded:
type: boolean
description: in case the variables file is too big, it will be uploaded
example: false
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: executor image command
items:
type: string
example:
- curl
args:
type: array
description: additional executor binary arguments
items:
type: string
example:
- --repeats
- '5'
- --insecure
args_mode:
type: string
description: usage mode for arguments
enum:
- append
- override
- replace
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:
deprecated: true
type: object
description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead'
additionalProperties:
type: string
example:
record: 'true'
prefix: some-
secretEnvs:
deprecated: true
type: object
description: 'Execution variables passed to executor from secrets. Deprecated: use Secret Variables instead'
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 test artifacts
jobTemplate:
type: string
description: job template extensions
jobTemplateReference:
type: string
description: name of the template resource
cronJobTemplate:
type: string
description: cron job template extensions
cronJobTemplateReference:
type: string
description: name of the template resource
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
postRunScript:
type: string
description: script to run after test execution
example: sleep 30
executePostRunScriptBeforeScraping:
type: boolean
description: execute post run script before scraping (prebuilt executor only)
sourceScripts:
type: boolean
description: run scripts using source command (container executor only)
scraperTemplate:
type: string
description: scraper template extensions
scraperTemplateReference:
type: string
description: name of the template resource
pvcTemplate:
type: string
description: pvc template extensions
pvcTemplateReference:
type: string
description: name of the template resource
envConfigMaps:
type: array
description: config map references
items:
$ref: '#/components/schemas/EnvReference'
envSecrets:
type: array
description: secret references
items:
$ref: '#/components/schemas/EnvReference'
runningContext:
$ref: '#/components/schemas/RunningContext'
description: running context for the test execution
testExecutionName:
type: string
description: test execution name started the test execution
downloadArtifactExecutionIDs:
type: array
description: execution ids for artifacts to download
items:
type: string
downloadArtifactTestNames:
type: array
description: test names for artifacts to download from latest executions
items:
type: string
slavePodRequest:
$ref: '#/components/schemas/PodRequest'
description: configuration parameters for executed slave pods
executionNamespace:
type: string
description: namespace for test execution (Pro edition only)
disableWebhooks:
type: boolean
description: whether webhooks on this execution are disabled
default: false
example:
- true
- false
AssertionResult:
description: execution result data
type: object
properties:
name:
type: string
example: assertion1
status:
type: string
enum:
- passed
- failed
errorMessage:
type:
- string
- 'null'
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'
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
TestContent:
type: object
properties:
type:
type: string
description: "type of sources a runner can get data from.\n string: String content (e.g. Postman JSON file).\n file-uri: content stored on the webserver.\n git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).\n git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).\n git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.\n"
enum:
- string
- file-uri
- git-file
- git-dir
- git
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
VariableType:
type: string
enum:
- basic
- secret
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
runningContext:
$ref: '#/components/schemas/RunningContext'
description: running context for the test execution
TestWithExecutionSummary:
description: Test with latest Execution result summary
type: object
required:
- test
properties:
test:
$ref: '#/components/schemas/Test'
latestExecution:
$ref: '#/components/schemas/ExecutionSummary'
RunningContext:
description: running context for test or test suite execution
type: object
required:
- type
properties:
type:
type: string
description: One of possible context types
enum:
- userCLI
- userUI
- testsuite
- testtrigger
- scheduler
- testworkflow
context:
type: string
description: Context value depending from its type
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:
deprecated: true
type: object
description: 'Environment variables passed to executor. Deprecated: use Basic Variables instead'
# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kubeshop/refs/heads/main/openapi/kubeshop-tests-api-openapi.yml