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

Testkube Control Plane ../webhooks operations

Testkube Pro API (cloud-api/1.10.38)

Download OpenAPI specification:Download

API for Testkube Pro

List webhooks

List webhooks available in cluster

path Parameters
id
required
string

organizationId

environmentId
required
string

environmentID

query Parameters
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 webhook

Create new webhook based on variables passed in request

path Parameters
id
required
string

organizationId

environmentId
required
string

environmentID

Request Body schema:
required

webhook request body data

name
string
namespace
string
uri
required
string
events
required
Array of strings (EventType)
Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "queue-testworkflow" "start-testworkflow" "end-testworkflow-success" "end-testworkflow-failed" "end-testworkflow-aborted" "created" "updated" "deleted"
selector
string

Labels to filter for tests and test suites

payloadObjectField
string

will load the generated payload for notification inside the object

payloadTemplate
string

golang based template for notification payload

payloadTemplateReference
string

name of the template resource

object

webhook headers (golang template supported)

object

webhook labels

disabled
boolean
Default: false

whether webhook is disabled

onStateChange
boolean
Default: false

whether webhook is triggered on state change only

Responses

Request samples

Content type
{
  • "name": "webhook1",
  • "namespace": "testkube",
  • "events": [
    ],
  • "selector": "string",
  • "payloadObjectField": "string",
  • "payloadTemplate": "string",
  • "payloadTemplateReference": "string",
  • "headers": {
    },
  • "labels": {
    },
  • "disabled": [
    ],
  • "onStateChange": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "webhook1",
  • "namespace": "testkube",
  • "events": [
    ],
  • "selector": "string",
  • "payloadObjectField": "string",
  • "payloadTemplate": "string",
  • "payloadTemplateReference": "string",
  • "headers": {
    },
  • "labels": {
    },
  • "disabled": [
    ],
  • "onStateChange": [
    ]
}

Delete webhooks

Deletes labeled webhooks

path Parameters
id
required
string

organizationId

environmentId
required
string

environmentID

query Parameters
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
[]

Get webhook details

Returns webhook

path Parameters
environmentId
required
string

environmentID

id
required
string

unique id of the object

Responses

Response samples

Content type
{
  • "name": "webhook1",
  • "namespace": "testkube",
  • "events": [
    ],
  • "selector": "string",
  • "payloadObjectField": "string",
  • "payloadTemplate": "string",
  • "payloadTemplateReference": "string",
  • "headers": {
    },
  • "labels": {
    },
  • "disabled": [
    ],
  • "onStateChange": [
    ]
}

Delete webhook

Deletes webhook by its name

path Parameters
environmentId
required
string

environmentID

id
required
string

unique id of the object

Responses

Response samples

Content type
application/problem+json
[]

Update new webhook

Update new webhook based on variables passed in request

path Parameters
environmentId
required
string

environmentID

id
required
string

unique id of the object

Request Body schema:
required

webhook request body data

name
string
namespace
string
uri
required
string
events
required
Array of strings (EventType)
Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "queue-testworkflow" "start-testworkflow" "end-testworkflow-success" "end-testworkflow-failed" "end-testworkflow-aborted" "created" "updated" "deleted"
selector
string

Labels to filter for tests and test suites

payloadObjectField
string

will load the generated payload for notification inside the object

payloadTemplate
string

golang based template for notification payload

payloadTemplateReference
string

name of the template resource

object

webhook headers (golang template supported)

object

webhook labels

disabled
boolean
Default: false

whether webhook is disabled

onStateChange
boolean
Default: false

whether webhook is triggered on state change only

Responses

Request samples

Content type
{
  • "name": "webhook1",
  • "namespace": "testkube",
  • "events": [
    ],
  • "selector": "string",
  • "payloadObjectField": "string",
  • "payloadTemplate": "string",
  • "payloadTemplateReference": "string",
  • "headers": {
    },
  • "labels": {
    },
  • "disabled": [
    ],
  • "onStateChange": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "webhook1",
  • "namespace": "testkube",
  • "events": [
    ],
  • "selector": "string",
  • "payloadObjectField": "string",
  • "payloadTemplate": "string",
  • "payloadTemplateReference": "string",
  • "headers": {
    },
  • "labels": {
    },
  • "disabled": [
    ],
  • "onStateChange": [
    ]
}