Skip to main content
New to Testkube? Unleash the power of cloud native testing in Kubernetes with Testkube. Get Started >

Testkube Control Plane ../triggers operations

Testkube Pro API (cloud-api/1.10.38)

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

Content type
[
  • {
    }
]

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

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

Content type
{
  • "name": "name",
  • "namespace": "testkube",
  • "labels": {
    },
  • "resource": "pod",
  • "resourceSelector": {
    },
  • "event": "modified",
  • "conditionSpec": {
    },
  • "probeSpec": {
    },
  • "action": "run",
  • "execution": "test",
  • "testSelector": {
    },
  • "concurrencyPolicy": "allow",
  • "disabled": [
    ]
}

Response samples

Content type
{
  • "name": "test1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "resource": "pod",
  • "resourceSelector": {
    },
  • "event": "modified",
  • "conditionSpec": {
    },
  • "probeSpec": {
    },
  • "action": "run",
  • "execution": "test",
  • "testSelector": {
    },
  • "concurrencyPolicy": "allow",
  • "disabled": [
    ]
}

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

Content type
application/problem+json
[]

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/json
required

array of test trigger upsert requests

Array
name
required
string

test trigger name

namespace
string

test trigger namespace

object

test trigger labels

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

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

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

Content type
{
  • "name": "test1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "resource": "pod",
  • "resourceSelector": {
    },
  • "event": "modified",
  • "conditionSpec": {
    },
  • "probeSpec": {
    },
  • "action": "run",
  • "execution": "test",
  • "testSelector": {
    },
  • "concurrencyPolicy": "allow",
  • "disabled": [
    ]
}

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

Content type
application/problem+json
[]

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

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

Content type
{
  • "name": "name",
  • "namespace": "testkube",
  • "labels": {
    },
  • "resource": "pod",
  • "resourceSelector": {
    },
  • "event": "modified",
  • "conditionSpec": {
    },
  • "probeSpec": {
    },
  • "action": "run",
  • "execution": "test",
  • "testSelector": {
    },
  • "concurrencyPolicy": "allow",
  • "disabled": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "test1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "resource": "pod",
  • "resourceSelector": {
    },
  • "event": "modified",
  • "conditionSpec": {
    },
  • "probeSpec": {
    },
  • "action": "run",
  • "execution": "test",
  • "testSelector": {
    },
  • "concurrencyPolicy": "allow",
  • "disabled": [
    ]
}