Testkube Agent /webhook-templates operations
Testkube API (1.0.0)
Download OpenAPI specification:Download
Testkube provides a Kubernetes-native framework for test definition, execution and results
List webhook templates
List webhook templates available in cluster
query Parameters
selector | string Labels to filter by |
Responses
Response samples
- 200
- 400
- 502
[- {
- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "env": "prod",
- "app": "backend"
}, - "disabled": [
- true,
- false
], - "config": {
- "property1": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}, - "property2": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}
}, - "parameters": [
- {
- "name": "string",
- "description": "string",
- "required": false,
- "example": "string",
- "default": {
- "value": "string"
}, - "pattern": "string"
}
]
}
]
Create new webhook template
Create new webhook template based on variables passed in request
Request Body schema: required
webhook template request body data
name required | string |
namespace | string |
uri | string |
events | Array of strings (EventType) Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "become-test-up" "become-test-down" "become-test-failed" "become-test-aborted" "become-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "become-testsuite-up" "become-testsuite-down" "become-testsuite-failed" "become-testsuite-aborted" "become-testsuite-timeout" "queue-testworkflow" "start-testworkflow" "end-testworkflow-success" "end-testworkflow-failed" "end-testworkflow-aborted" "become-testworkflow-up" "become-testworkflow-down" "become-testworkflow-failed" "become-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 | |
object webhook annotations | |
disabled | boolean Default: false whether webhook is disabled |
object (WebhookConfig) configuration values | |
Array of objects (WebhookParameterSchema) |
Responses
Request samples
- Payload
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "env": "prod",
- "app": "backend"
}, - "disabled": [
- true,
- false
], - "config": {
- "property1": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}, - "property2": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}
}, - "parameters": [
- {
- "name": "string",
- "description": "string",
- "required": false,
- "example": "string",
- "default": {
- "value": "string"
}, - "pattern": "string"
}
]
}
Response samples
- 201
- 400
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "env": "prod",
- "app": "backend"
}, - "disabled": [
- true,
- false
], - "config": {
- "property1": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}, - "property2": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}
}, - "parameters": [
- {
- "name": "string",
- "description": "string",
- "required": false,
- "example": "string",
- "default": {
- "value": "string"
}, - "pattern": "string"
}
]
}
Delete webhook templates
Deletes labeled webhook templates
query Parameters
selector | string Labels to filter by |
Responses
Response samples
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Delete webhook template
Deletes webhook template by its name
path Parameters
id required | string unique id 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",
}
]
Get webhook template details
Returns webhook template
path Parameters
id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "env": "prod",
- "app": "backend"
}, - "disabled": [
- true,
- false
], - "config": {
- "property1": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}, - "property2": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}
}, - "parameters": [
- {
- "name": "string",
- "description": "string",
- "required": false,
- "example": "string",
- "default": {
- "value": "string"
}, - "pattern": "string"
}
]
}
Update new webhook template
Update new webhook template based on variables passed in request
path Parameters
id required | string unique id of the object |
Request Body schema: required
webhook template request body data
name required | string |
namespace | string |
uri | string |
events | Array of strings (EventType) Items Enum: "start-test" "end-test-success" "end-test-failed" "end-test-aborted" "end-test-timeout" "become-test-up" "become-test-down" "become-test-failed" "become-test-aborted" "become-test-timeout" "start-testsuite" "end-testsuite-success" "end-testsuite-failed" "end-testsuite-aborted" "end-testsuite-timeout" "become-testsuite-up" "become-testsuite-down" "become-testsuite-failed" "become-testsuite-aborted" "become-testsuite-timeout" "queue-testworkflow" "start-testworkflow" "end-testworkflow-success" "end-testworkflow-failed" "end-testworkflow-aborted" "become-testworkflow-up" "become-testworkflow-down" "become-testworkflow-failed" "become-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 | |
object webhook annotations | |
disabled | boolean Default: false whether webhook is disabled |
object (WebhookConfig) configuration values | |
Array of objects (WebhookParameterSchema) |
Responses
Request samples
- Payload
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "env": "prod",
- "app": "backend"
}, - "disabled": [
- true,
- false
], - "config": {
- "property1": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}, - "property2": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}
}, - "parameters": [
- {
- "name": "string",
- "description": "string",
- "required": false,
- "example": "string",
- "default": {
- "value": "string"
}, - "pattern": "string"
}
]
}
Response samples
- 200
- 400
- 404
- 502
{- "name": "webhook1",
- "namespace": "testkube",
- "events": [
- "start-test"
], - "selector": "string",
- "payloadObjectField": "string",
- "payloadTemplate": "string",
- "payloadTemplateReference": "string",
- "headers": {
- "Content-Type": "application/xml"
}, - "labels": {
- "env": "prod",
- "app": "backend"
}, - "annotations": {
- "env": "prod",
- "app": "backend"
}, - "disabled": [
- true,
- false
], - "config": {
- "property1": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}, - "property2": {
- "value": {
- "value": "string"
}, - "secret": {
- "namespace": "string",
- "name": "string",
- "key": "string"
}
}
}, - "parameters": [
- {
- "name": "string",
- "description": "string",
- "required": false,
- "example": "string",
- "default": {
- "value": "string"
}, - "pattern": "string"
}
]
}