Testkube Control Plane ../environments operations
Testkube Pro API (cloud-api/1.10.51)
Download OpenAPI specification:Download
API for Testkube Pro
List environments
List environments from the active organization
Authorizations:
path Parameters
| id required  | string  unique id of the object  | 
query Parameters
| limit | integer  limit queries for list of resources  | 
Responses
Response samples
- 200
 - 400
 - 401
 - 403
 - 404
 
{- "elements": [
- {
- "id": "string",
 - "name": "string",
 - "description": "string",
 - "labels": {
- "property1": "string",
 - "property2": "string"
 
}, - "createdAt": "2019-08-24T14:15:22Z",
 - "updatedAt": "2019-08-24T14:15:22Z",
 - "slug": "demo-environment",
 - "connected": true,
 - "status": "Green",
 - "organizationID": "733420bd-7e56-461f-8431-6378759e60ae",
 - "agentToken": "tkcagnt_adead343112adeadcaaaaa221daee2",
 - "connectCommand": "testkube pro connect --agent-key tkcagnt_111",
 - "disconnectCommand": "testkube pro disconnect",
 - "installCommand": "helm upgrade --install --create-namespace testkube testkube/testkube --set testkube-api.cloud.url=agent.testkube.xyz:443 --set testkube-api.cloud.key=<api-key> --set testkube-api.minio.enabled=false --set mongodb.enabled=false --namespace testkube",
 - "installCommandCli": "testkube init-cloud --agent-key tkcagnt_111 --agent-url agent.testkube.xyz:443",
 - "configureContextCommand": "testkube context set --api-url https://api.testkube.xyz --api-key <api-key> --agent-url https://agent.testkube.xyz --agent-key <agent-key>",
 - "features": [
- {
- "name": "string",
 - "displayName": "string",
 - "description": "string",
 - "enabled": true
 
} 
] 
} 
] 
}Create new environment
Create test environment
Authorizations:
path Parameters
| id required  | string  unique id of the object  | 
Request Body schema: application/jsonrequired
environment details body
| id required  | string   | 
| name required  | string   | 
| description | string   | 
object   | |
| createdAt | string <date-time>    | 
| updatedAt | string <date-time>    | 
| slug | string  Human- and URL friendly identifier  | 
| connected required  | boolean  State of the agent connection  | 
| status | string  Enum: "Green" "Yellow" "Red"   State of the environment  | 
| organizationID | string  organizationID  | 
| agentToken | string  agent token for environment  | 
| connectCommand | string  command to connect existing Testkube OSS installation to the Testkube Pro  | 
| disconnectCommand | string  command to disconnect from testkube pro and get back to standalone OSS mode  | 
| installCommand | string  command to install/upgrade agent  | 
| installCommandCli | string  command to install/upgrade agent  | 
| configureContextCommand | string  command to configure  | 
Array of objects (EnvironmentFeature)    | 
Responses
Request samples
- Payload
 
{- "id": "string",
 - "name": "string",
 - "description": "string",
 - "labels": {
- "property1": "string",
 - "property2": "string"
 
}, - "createdAt": "2019-08-24T14:15:22Z",
 - "updatedAt": "2019-08-24T14:15:22Z",
 - "slug": "demo-environment",
 - "connected": true,
 - "status": "Green",
 - "organizationID": "733420bd-7e56-461f-8431-6378759e60ae",
 - "agentToken": "tkcagnt_adead343112adeadcaaaaa221daee2",
 - "connectCommand": "testkube pro connect --agent-key tkcagnt_111",
 - "disconnectCommand": "testkube pro disconnect",
 - "installCommand": "helm upgrade --install --create-namespace testkube testkube/testkube --set testkube-api.cloud.url=agent.testkube.xyz:443 --set testkube-api.cloud.key=<api-key> --set testkube-api.minio.enabled=false --set mongodb.enabled=false --namespace testkube",
 - "installCommandCli": "testkube init-cloud --agent-key tkcagnt_111 --agent-url agent.testkube.xyz:443",
 - "configureContextCommand": "testkube context set --api-url https://api.testkube.xyz --api-key <api-key> --agent-url https://agent.testkube.xyz --agent-key <agent-key>",
 - "features": [
- {
- "name": "string",
 - "displayName": "string",
 - "description": "string",
 - "enabled": true
 
} 
] 
}Response samples
- 200
 - 400
 
{- "id": "string",
 - "name": "string",
 - "description": "string",
 - "labels": {
- "property1": "string",
 - "property2": "string"
 
}, - "createdAt": "2019-08-24T14:15:22Z",
 - "updatedAt": "2019-08-24T14:15:22Z",
 - "slug": "demo-environment",
 - "connected": true,
 - "status": "Green",
 - "organizationID": "733420bd-7e56-461f-8431-6378759e60ae",
 - "agentToken": "tkcagnt_adead343112adeadcaaaaa221daee2",
 - "connectCommand": "testkube pro connect --agent-key tkcagnt_111",
 - "disconnectCommand": "testkube pro disconnect",
 - "installCommand": "helm upgrade --install --create-namespace testkube testkube/testkube --set testkube-api.cloud.url=agent.testkube.xyz:443 --set testkube-api.cloud.key=<api-key> --set testkube-api.minio.enabled=false --set mongodb.enabled=false --namespace testkube",
 - "installCommandCli": "testkube init-cloud --agent-key tkcagnt_111 --agent-url agent.testkube.xyz:443",
 - "configureContextCommand": "testkube context set --api-url https://api.testkube.xyz --api-key <api-key> --agent-url https://agent.testkube.xyz --agent-key <agent-key>",
 - "features": [
- {
- "name": "string",
 - "displayName": "string",
 - "description": "string",
 - "enabled": true
 
} 
] 
}Delete environments
Deletes all or labeled environments
Authorizations:
path Parameters
| id required  | string  unique id of the object  | 
query Parameters
| name | string  object name to search for  | 
Responses
Response samples
- 401
 - 403
 
{- "title": "Invalid test name",
 - "status": 500,
 - "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
 
}Get environment by ID
Get test environment by ID from CRD in kubernetes cluster
Authorizations:
path Parameters
| id required  | string  unique id of the object  | 
| environmentID required  | string  unique id of the environment  | 
Responses
Response samples
- 200
 - 401
 - 403
 
{- "id": "string",
 - "name": "string",
 - "description": "string",
 - "labels": {
- "property1": "string",
 - "property2": "string"
 
}, - "createdAt": "2019-08-24T14:15:22Z",
 - "updatedAt": "2019-08-24T14:15:22Z",
 - "slug": "demo-environment",
 - "connected": true,
 - "status": "Green",
 - "organizationID": "733420bd-7e56-461f-8431-6378759e60ae",
 - "agentToken": "tkcagnt_adead343112adeadcaaaaa221daee2",
 - "connectCommand": "testkube pro connect --agent-key tkcagnt_111",
 - "disconnectCommand": "testkube pro disconnect",
 - "installCommand": "helm upgrade --install --create-namespace testkube testkube/testkube --set testkube-api.cloud.url=agent.testkube.xyz:443 --set testkube-api.cloud.key=<api-key> --set testkube-api.minio.enabled=false --set mongodb.enabled=false --namespace testkube",
 - "installCommandCli": "testkube init-cloud --agent-key tkcagnt_111 --agent-url agent.testkube.xyz:443",
 - "configureContextCommand": "testkube context set --api-url https://api.testkube.xyz --api-key <api-key> --agent-url https://agent.testkube.xyz --agent-key <agent-key>",
 - "features": [
- {
- "name": "string",
 - "displayName": "string",
 - "description": "string",
 - "enabled": true
 
} 
] 
}Delete test environment
Deletes a test environment
Authorizations:
path Parameters
| id required  | string  unique id of the object  | 
| environmentID required  | string  unique id of the environment  | 
Responses
Response samples
- 401
 - 403
 
{- "title": "Invalid test name",
 - "status": 500,
 - "detail": "Your test name can't contain forbidden characters like \"}}}\" passed",
 
}Update environment
Update environment with given request body
Authorizations:
path Parameters
| id required  | string  unique id of the object  | 
| environmentID required  | string  unique id of the environment  | 
Request Body schema: application/jsonrequired
environment details body
| id required  | string   | 
| name required  | string   | 
| description | string   | 
object   | |
| createdAt | string <date-time>    | 
| updatedAt | string <date-time>    | 
| slug | string  Human- and URL friendly identifier  | 
| connected required  | boolean  State of the agent connection  | 
| status | string  Enum: "Green" "Yellow" "Red"   State of the environment  | 
| organizationID | string  organizationID  | 
| agentToken | string  agent token for environment  | 
| connectCommand | string  command to connect existing Testkube OSS installation to the Testkube Pro  | 
| disconnectCommand | string  command to disconnect from testkube pro and get back to standalone OSS mode  | 
| installCommand | string  command to install/upgrade agent  | 
| installCommandCli | string  command to install/upgrade agent  | 
| configureContextCommand | string  command to configure  | 
Array of objects (EnvironmentFeature)    | 
Responses
Request samples
- Payload
 
{- "id": "string",
 - "name": "string",
 - "description": "string",
 - "labels": {
- "property1": "string",
 - "property2": "string"
 
}, - "createdAt": "2019-08-24T14:15:22Z",
 - "updatedAt": "2019-08-24T14:15:22Z",
 - "slug": "demo-environment",
 - "connected": true,
 - "status": "Green",
 - "organizationID": "733420bd-7e56-461f-8431-6378759e60ae",
 - "agentToken": "tkcagnt_adead343112adeadcaaaaa221daee2",
 - "connectCommand": "testkube pro connect --agent-key tkcagnt_111",
 - "disconnectCommand": "testkube pro disconnect",
 - "installCommand": "helm upgrade --install --create-namespace testkube testkube/testkube --set testkube-api.cloud.url=agent.testkube.xyz:443 --set testkube-api.cloud.key=<api-key> --set testkube-api.minio.enabled=false --set mongodb.enabled=false --namespace testkube",
 - "installCommandCli": "testkube init-cloud --agent-key tkcagnt_111 --agent-url agent.testkube.xyz:443",
 - "configureContextCommand": "testkube context set --api-url https://api.testkube.xyz --api-key <api-key> --agent-url https://agent.testkube.xyz --agent-key <agent-key>",
 - "features": [
- {
- "name": "string",
 - "displayName": "string",
 - "description": "string",
 - "enabled": true
 
} 
] 
}Response samples
- 200
 - 400
 - 401
 - 403
 
{- "id": "string",
 - "name": "string",
 - "description": "string",
 - "labels": {
- "property1": "string",
 - "property2": "string"
 
}, - "createdAt": "2019-08-24T14:15:22Z",
 - "updatedAt": "2019-08-24T14:15:22Z",
 - "slug": "demo-environment",
 - "connected": true,
 - "status": "Green",
 - "organizationID": "733420bd-7e56-461f-8431-6378759e60ae",
 - "agentToken": "tkcagnt_adead343112adeadcaaaaa221daee2",
 - "connectCommand": "testkube pro connect --agent-key tkcagnt_111",
 - "disconnectCommand": "testkube pro disconnect",
 - "installCommand": "helm upgrade --install --create-namespace testkube testkube/testkube --set testkube-api.cloud.url=agent.testkube.xyz:443 --set testkube-api.cloud.key=<api-key> --set testkube-api.minio.enabled=false --set mongodb.enabled=false --namespace testkube",
 - "installCommandCli": "testkube init-cloud --agent-key tkcagnt_111 --agent-url agent.testkube.xyz:443",
 - "configureContextCommand": "testkube context set --api-url https://api.testkube.xyz --api-key <api-key> --agent-url https://agent.testkube.xyz --agent-key <agent-key>",
 - "features": [
- {
- "name": "string",
 - "displayName": "string",
 - "description": "string",
 - "enabled": true
 
} 
] 
}