Testkube Control Plane ../triggers operations
Testkube Pro API (cloud-api/1.10.51)
Download OpenAPI specification:Download
API for Testkube Pro
List test triggers
List test triggers from the kubernetes cluster
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
selector | string Example: selector=kubernetes.io/app=demo Only workflow executions with given status are included in this time series chart. |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "test1",
- "namespace": "testkube",
- "labels": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
query Parameters
namespace | string Default: "testkube" Namespace of the object |
selector | string Example: selector=kubernetes.io/app=demo Only workflow executions with given status are included in this time series chart. |
Responses
Response samples
- 400
- 404
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Bulk update test triggers
Updates test triggers provided as an array in the request body
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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
]
}
]
Get test trigger by ID
Get test trigger by ID from CRD in kubernetes cluster
path Parameters
environmentId required | string environmentID |
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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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
environmentId required | string environmentID |
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",
}
]
Update test trigger
Update test trigger
path Parameters
environmentId required | string environmentID |
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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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": {
- "app": "backend",
- "env": "prod"
}, - "annotations": {
- "app": "backend",
- "group": "teamA"
}, - "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
]
}