Skip to content

Import Workloads

POST
/deployments/import
curl --request POST \
--url 'https://api.mengi.cloud/deployments/import?cluster_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Content-Type: application/json' \
--data '{ "workloads": [ { "name": "example", "namespace": "example", "kind": "example", "display_name": "example", "app_type": "web_app", "docker_image": "example", "helm_chart_name": "example", "helm_chart_version": "example", "helm_repo_url": "example", "custom_values_yaml": "example", "cpu_request": 1, "memory_request_mb": 1, "replicas": 1, "container_port": 1, "service_account_name": "example", "selector_match_labels": { "additionalProperty": "example" }, "pod_template_labels": { "additionalProperty": "example" }, "manifest_yaml": "example", "extra_pod_spec_yaml": "example", "extra_container_spec_yaml": "example" } ] }'

Import discovered workloads as Mengi deployments.

Creates Deployment records and pushes values to Git with autoSync=false, so ArgoCD creates Applications but does not sync them automatically.

cluster_id
required
Cluster Id

Cluster ID to import workloads into

string format: uuid

Cluster ID to import workloads into

Media type application/json
WorkloadImportRequest
object
workloads
required
Workloads
Array<object>
WorkloadImportItem

A single workload to import into Mengi.

object
name
required
Name
string
namespace
required
Namespace
string
kind
required
Kind
string
display_name
Any of:
string
app_type
AppType
string
default: container
Allowed values: web_app api database static_site container helm
docker_image
Any of:
string
helm_chart_name
Any of:
string
helm_chart_version
Any of:
string
helm_repo_url
Any of:
string
custom_values_yaml
Any of:
string
cpu_request
Any of:
number
memory_request_mb
Any of:
integer
replicas
Any of:
integer
container_port
Any of:
integer
service_account_name
Any of:
string
selector_match_labels
Any of:
object
key
additional properties
string
pod_template_labels
Any of:
object
key
additional properties
string
manifest_yaml
Any of:
string
extra_pod_spec_yaml
Any of:
string
extra_container_spec_yaml
Any of:
string

Successful Response

Media type application/json
WorkloadImportResponse
object
imported
required
Imported
Array<object>
DeploymentResponse
object
id
required
Id
string format: uuid
user_id
required
User Id
string format: uuid
cluster_id
required
Cluster Id
string format: uuid
name
required
Name
string
app_type
required
AppType
string
Allowed values: web_app api database static_site container helm
status
required
DeploymentStatus
string
Allowed values: pending provisioning promoting running stopped failed error migrating deleting
config
Any of:
object
key
additional properties
any
values_yaml
Any of:
string
git_path
Any of:
string
endpoint_url
Any of:
string
error_message
Any of:
string
cpu_request
Any of:
number
memory_request_mb
Any of:
integer
replicas
Any of:
integer
container_port
Any of:
integer
storage_size_gb
Any of:
integer
deployment_type
Any of:
string
helm_repo_url
Any of:
string
helm_chart_name
Any of:
string
helm_chart_version
Any of:
string
custom_values_yaml
Any of:
string
image_update_strategy
Any of:
string
image_update_constraint
Any of:
string
image_allow_tags
Any of:
string
image_ignore_tags
Any of:
string
is_adopted
Is Adopted
boolean
source_namespace
Any of:
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
provider
Any of:
string
region
Any of:
string
cluster_status
Any of:
string
cluster_error
Any of:
string
failed
required
Failed
Array<object>
object
key
additional properties
any
total_imported
required
Total Imported
integer
total_failed
required
Total Failed
integer
Example
{
"imported": [
{
"app_type": "web_app",
"status": "pending",
"is_adopted": false
}
]
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}