Testkube Control Plane ../templates operations
Testkube Pro API (cloud-api/1.10.51)
Download OpenAPI specification:Download
API for Testkube Pro
List templates
List templates 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
- 200
- 400
- 502
[- {
- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "app": "backend",
- "env": "prod"
}
}
]
Create new template
Create new template based on variables passed in request
path Parameters
id required | string organizationId |
environmentId required | string environmentID |
Request Body schema: required
template request body data
name required | string template name for reference |
namespace | string template namespace |
type required | string (TemplateType) Enum: "job" "container" "cronjob" "scraper" "pvc" "webhook" "pod" template type by purpose |
body required | string template body to use |
object template labels |
Responses
Request samples
- Payload
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "app": "backend",
- "env": "prod"
}
}
Response samples
- 201
- 400
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "app": "backend",
- "env": "prod"
}
}
Delete templates
Deletes labeled templates
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
- 502
[- {
- "title": "Invalid test name",
- "status": 500,
- "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
}
]
Get template details
Returns template
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
Responses
Response samples
- 200
- 400
- 404
- 500
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "app": "backend",
- "env": "prod"
}
}
Delete template
Deletes template by its name
path Parameters
environmentId required | string environmentID |
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",
}
]
Update new template
Update new template based on variables passed in request
path Parameters
environmentId required | string environmentID |
id required | string unique id of the object |
Request Body schema: required
template request body data
name required | string template name for reference |
namespace | string template namespace |
type required | string (TemplateType) Enum: "job" "container" "cronjob" "scraper" "pvc" "webhook" "pod" template type by purpose |
body required | string template body to use |
object template labels |
Responses
Request samples
- Payload
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "app": "backend",
- "env": "prod"
}
}
Response samples
- 200
- 400
- 404
- 502
{- "name": "webhook-template",
- "namespace": "testkube",
- "type": "job",
- "body": "{\"id\": \"{{ .Id }}\"}",
- "labels": {
- "app": "backend",
- "env": "prod"
}
}