Documentation
Documentation
https://docs.testkube.io/openapi/overview
Documentation
https://docs.testkube.io/openapi/agent/default--test-workflows
openapi: 3.0.1
info:
title: Testkube Standalone Agent api executor API
description: API for Testkube Standalone Agent
contact:
email: info@testkube.io
license:
name: MIT
url: https://opensource.org/licenses/MIT
version: 1.0.0
servers:
- url: https://api.testkube.io
description: Testkube Cloud Control Plane API Endpoint
- url: https://<your-testkube-api-host>
description: Testkube On-Prem API Endpoint
tags:
- name: executor
description: Executor operations
paths:
/executors:
get:
tags:
- executor
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
400:
description: problem with input for CRD generation
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:
- executor
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'
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/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
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:
- 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:
- 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
400:
description: problem with input for CRD generation
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 getting executor data
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
patch:
parameters:
- $ref: '#/components/parameters/ID'
tags:
- executor
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'
text/yaml:
schema:
type: string
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'
404:
description: executor 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'
/executor-by-types:
get:
parameters:
- $ref: '#/components/parameters/TestType'
tags:
- executor
summary: Get executor details by type
description: Returns executors data with executions passed to executor
operationId: getExecutorByType
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutorDetails'
text/yaml:
schema:
type: string
400:
description: problem with input for CRD generation
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 getting executor data
content:
application/problem+json:
schema:
type: array
items:
$ref: '#/components/schemas/Problem'
components:
schemas:
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
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
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'
ExecutionStatus:
type: string
enum:
- queued
- running
- passed
- failed
- aborted
- timeout
- skipped
- canceled
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://docs.testkube.io/test-types/executor-k6
tooltips:
type: object
description: executor tooltips
additionalProperties:
type: string
example:
general: please provide k6 test script for execution
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'
LocalObjectReference:
description: Reference to Kubernetes object
type: object
properties:
name:
type: string
ExecutorUpsertRequest:
description: executor create request body
type: object
required:
- name
- namespace
- types
allOf:
- $ref: '#/components/schemas/Executor'
- $ref: '#/components/schemas/ObjectRef'
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
ExecutionsTotals:
type: object
description: various execution counters
required:
- results
- passed
- failed
- queued
- running
- paused
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
ObjectRef:
required:
- name
type: object
properties:
namespace:
type: string
description: object kubernetes namespace
example: testkube
name:
type: string
description: object name
example: name
SlavesMeta:
description: Slave data for executing tests in distributed environment
type: object
properties:
image:
description: slave image
type: string
example: kubeshop/ex-slaves-image:latest
required:
- image
ExecutorUpdateRequest:
description: executor update request body
type: object
nullable: true
allOf:
- $ref: '#/components/schemas/Executor'
- $ref: '#/components/schemas/ObjectRef'
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
slaves:
$ref: '#/components/schemas/SlavesMeta'
imagePullSecrets:
type: array
description: container image pull secrets
items:
$ref: '#/components/schemas/LocalObjectReference'
command:
type: array
description: executor image command
items:
type: string
example:
- curl
args:
type: array
description: additional executor binary argument
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
jobTemplateReference:
type: string
description: name of the template resource
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'
useDataDirAsWorkingDir:
type: boolean
description: use data dir as working dir for executor
parameters:
TestType:
in: query
name: testType
schema:
type: string
required: true
description: test type of the executor
Selector:
in: query
name: selector
schema:
type: string
description: Labels to filter by
ID:
in: path
name: id
schema:
type: string
required: true
description: unique id of the object