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

Testkube Control Plane ../test-sources operations

Testkube Pro API (cloud-api/1.10.51)

Download OpenAPI specification:Download

API for Testkube Pro

List test sources

List test sources 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 test source

Create new test source based on variables passed in request

path Parameters
id
required
string

organizationId

environmentId
required
string

environmentID

Request Body schema:
required

test source request body data

name
string

test source name

namespace
string

test source namespace

object

test source labels

type
string
Enum: "string" "file-uri" "git-file" "git-dir" "git"

type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.

object (Repository)

repository representation for tests in git repositories

data
string

test content data as string

uri
string

test content

Responses

Request samples

Content type
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Response samples

Content type
application/json
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Delete test sources

Deletes labeled test sources

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

Process test source batch (create, update, delete)

Process test source batch based on variables passed in request

path Parameters
id
required
string

organizationId

environmentId
required
string

environmentID

Request Body schema: application/json
required

test source batch request body data

required
Array of objects (TestSourceUpsertRequest)
Array
name
string

test source name

namespace
string

test source namespace

object

test source labels

type
string
Enum: "string" "file-uri" "git-file" "git-dir" "git"

type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.

object (Repository)

repository representation for tests in git repositories

data
string

test content data as string

uri
string

test content

Responses

Request samples

Content type
application/json
{
  • "batch": [
    ]
}

Response samples

Content type
application/json
{
  • "created": [
    ],
  • "updated": [
    ],
  • "deleted": [
    ]
}

Get test source data

Returns test sources data

path Parameters
environmentId
required
string

environmentID

id
required
string

unique id of the object

Responses

Response samples

Content type
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Delete test source

Deletes test source 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 test source

Update test source based on test content or git based data

path Parameters
environmentId
required
string

environmentID

id
required
string

unique id of the object

Request Body schema:
required

test source body

name
string

test source name

namespace
string

test source namespace

object

test source labels

type
string
Enum: "string" "file-uri" "git-file" "git-dir" "git"

type of sources a runner can get data from. string: String content (e.g. Postman JSON file). file-uri: content stored on the webserver. git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead). git-dir: the entire git repo or git subdirectory depending on the repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead). git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.

object (Repository)

repository representation for tests in git repositories

data
string

test content data as string

uri
string

test content

Responses

Request samples

Content type
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}

Response samples

Content type
application/json
{
  • "name": "testsource1",
  • "namespace": "testkube",
  • "labels": {
    },
  • "type": "string",
  • "repository": {
    },
  • "data": "string",
}