Testkube Agent /triggers operations
Testkube API (1.0.0)
Download OpenAPI specification:Download
Testkube provides a Kubernetes-native framework for test definition, execution and results
List test triggers
List test triggers from the kubernetes cluster
query Parameters
namespace | string Default: "testkube" Namespace of the object |
selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
]
Create new test trigger
Create new test trigger CRD inside a Kubernetes cluster
Request Body schema: required
test trigger body
name required | string test trigger name |
namespace | string test trigger namespace |
object test trigger labels | |
object test trigger annotations | |
resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" "testworkflow" supported test resources for test triggers |
required | object (TestTriggerSelector) |
concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
disabled | boolean Default: false whether test trigger is disabled |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
Response samples
- 200
- 400
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
Bulk update test triggers
Updates test triggers provided as an array in the request body
Request Body schema: application/jsonrequired
array of test trigger upsert requests
name required | string test trigger name |
namespace | string test trigger namespace |
object test trigger labels | |
object test trigger annotations | |
resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" "testworkflow" supported test resources for test triggers |
required | object (TestTriggerSelector) |
concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
disabled | boolean Default: false whether test trigger is disabled |
Responses
Request samples
- Payload
[- {
- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
]
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
]
Delete test triggers
Deletes all or labeled test triggers
query Parameters
namespace | string Default: "testkube" Namespace of the object |
selector | string Labels to filter by |
Responses
Response samples
- 400
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get test trigger by ID
Get test trigger by ID from CRD in kubernetes cluster
path Parameters
id required | string unique id of the object |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
Responses
Response samples
- 200
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
Update test trigger
Update test trigger
path Parameters
id required | string unique id of the object |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
Request Body schema: required
test trigger upsert request
name required | string test trigger name |
namespace | string test trigger namespace |
object test trigger labels | |
object test trigger annotations | |
resource required | string (TestTriggerResources) Enum: "pod" "deployment" "statefulset" "daemonset" "service" "ingress" "event" "configmap" supported kubernetes resources for test triggers |
required | object (TestTriggerSelector) |
event required | string listen for event for selected resource |
object (TestTriggerConditionSpec) | |
object (TestTriggerProbeSpec) | |
action required | string (TestTriggerActions) Value: "run" supported actions for test triggers |
execution required | string (TestTriggerExecutions) Enum: "test" "testsuite" "testworkflow" supported test resources for test triggers |
required | object (TestTriggerSelector) |
concurrencyPolicy | string (TestTriggerConcurrencyPolicies) Enum: "allow" "forbid" "replace" supported concurrency policies for test triggers |
disabled | boolean Default: false whether test trigger is disabled |
Responses
Request samples
- Payload
{- "name": "name",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
Response samples
- 200
- 400
- 404
- 502
{- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "group": "teamA",
- "app": "backend"
}, - "resource": "pod",
- "resourceSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "event": "modified",
- "conditionSpec": {
- "conditions": [
- {
- "status": "True",
- "type": "Progressing",
- "reason": "NewReplicaSetAvailable",
- "ttl": 1
}
], - "timeout": 1,
- "delay": 1
}, - "probeSpec": {
- "probes": [
- {
- "scheme": "http",
- "host": "testkube-api-server",
- "path": "/",
- "port": 80,
- "headers": {
- "Content-Type": "application/xml"
}
}
], - "timeout": 1,
- "delay": 1
}, - "action": "run",
- "execution": "test",
- "testSelector": {
- "name": "nginx",
- "nameRegex": "nginx.*",
- "namespace": "testkube",
- "labelSelector": {
- "matchExpressions": [
- {
- "key": "string",
- "operator": "string",
- "values": [
- "string"
]
}
], - "matchLabels": {
- "property1": "string",
- "property2": "string"
}
}
}, - "concurrencyPolicy": "allow",
- "disabled": [
- true,
- false
]
}
Delete test trigger
Deletes a test trigger
path Parameters
id required | string unique id of the object |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
Responses
Response samples
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]