Skip to content

Discover Cluster Workloads

GET
/clusters/{cluster_id}/workloads/discover
curl --request GET \
--url https://api.mengi.cloud/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workloads/discover

Discover running workloads in a cluster.

Scans the cluster for Helm releases and K8s workloads (Deployments, StatefulSets, DaemonSets) and returns them for import selection. Users may only scan imported clusters; the service principal (worker) may scan any cluster, e.g. a migration target after a Velero restore.

cluster_id
required
Cluster Id
string format: uuid
namespace
Namespace

Only return workloads in this namespace

Any of:
string

Only return workloads in this namespace

Successful Response

Media typeapplication/json
DiscoveredWorkloadListResponse
object
workloads
required
Workloads
Array<object>
DiscoveredWorkload

A workload discovered from a running Kubernetes cluster.

object
name
required
Name
string
namespace
required
Namespace
string
kind
required
Kind
string
helm_chart_name
Helm Chart Name
Any of:
string
helm_chart_version
Helm Chart Version
Any of:
string
custom_values_yaml
Custom Values Yaml
Any of:
string
helm_status
Helm Status
Any of:
string
docker_image
Docker Image
Any of:
string
replicas
Replicas
Any of:
integer
cpu_request
Cpu Request
Any of:
number
memory_request_mb
Memory Request Mb
Any of:
integer
container_port
Container Port
Any of:
integer
service_account_name
Service Account Name
Any of:
string
selector_match_labels
Selector Match Labels
Any of:
object
key
additional properties
string
pod_template_labels
Pod Template Labels
Any of:
object
key
additional properties
string
manifest_yaml
Manifest Yaml
Any of:
string
command
Command
Any of:
Array<string>
args
Args
Any of:
Array<string>
extra_pod_spec_yaml
Extra Pod Spec Yaml
Any of:
string
extra_container_spec_yaml
Extra Container Spec Yaml
Any of:
string
is_helm_managed
Is Helm Managed
boolean
already_imported
Already Imported
boolean
total
required
Total
integer

Example

{
"workloads": [
{
"is_helm_managed": false,
"already_imported": false
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}