environments
Create Environment
Creates a new environment based on a manifest.
post/apps/{appId}/environments
Request
- Base URLhttps://privatecloud.mendixcloud.com/api/v4
- AuthAPI key in header Authorization
Request body
Example request
{
"manifestVersion": "2.0.0",
"environment": {
"id": "e9m3vf7f",
"properties": {
"name": "my-environment",
"environmentPurpose": "Test"
},
"deployment": {
"appUrl": "https://test.app.url",
"packageId": "045b8cf4-c9cd-41b4-b241-414b87a7f219",
"constants": [
{
"name": "MyFirstModule.Constant_Name",
"value": "2022-03-10T13:15:00"
}
],
"scheduledEvents": [
{
"name": "MyFirstModule.Scheduled_event1"
}
],
"appLogLevels": [
{
"name": "MY_LOG_LEVEL",
"level": "DEBUG"
}
]
},
"container": {
"state": "Ready",
"instances": 3,
"coreResources": {
"limits": {
"cpu": "1",
"memory": "0.512",
"ephemeralStorage": "1"
},
"requests": {
"cpu": "1",
"memory": "0.512",
"ephemeralStorage": "1"
}
}
},
"network": {
"outgoingConnectionCertificate": [
{
"password": "base64 encoded string, e.g. dGVzdA==",
"certificateType": "Client",
"key": "long base64 encoded .pfx file"
}
]
},
"runtime": {
"subscriptionSecret": "base64 encoded string, e.g. c3Vic2NyaXB0aW9uLXNlY3JldA==",
"debuggerPassword": "base64 encoded string, e.g. c3Vic2NyaXB0aW9uLXNlY3JldA==",
"mxAdminPassword": "base64 encoded string, e.g. c3Vic2NyaXB0aW9uLXNlY3JldA==",
"runtimeVersion": "9.24.2",
"environmentVariables": [
{
"name": "custom-env-variable1",
"value": "custom-env-variable1-value"
}
],
"customRuntimeSettings": [
{
"name": "HashAlgorithm",
"value": "BCRYPT"
}
]
},
"provider": {
"clusterId": "a712d8f4-a77c-4189-a211-e0ea1dfde03c",
"namespace": "my-namespace",
"namespaceId": "db6ed4d3-8b6d-4c2b-ad2b-2a69d0f7afe0"
},
"annotations": [
{
"key": "prometheus.io/port",
"value": "8900",
"annotationType": "Pod"
}
],
"services": [
{
"name": "ephemeral_db",
"plan": "OnDemand",
"config": "{type: \\\"database\\\"}"
}
],
"runtimeMetricsConfiguration": {
"mode": "native",
"interval": "https://docs.mendix.com/refguide/custom-settings/#11-durationinterval-settings",
"mxAgentConfig": "https://docs.mendix.com/developerportal/deploy/private-cloud-monitor/#configuring-mxagent",
"mxAgentInstrumentationConfig": "https://docs.mendix.com/developerportal/deploy/private-cloud-monitor/#configuring-mxagent"
}
}
}Response
The job response returned by a get-job request. The Location header is populated once the job has been created successfully.
Example response
{
"id": "db6ed4d3-8b6d-4c2b-ad2b-2a69d0f7afe0",
"status": "finished",
"details": "Request to create cluster.",
"error": {
"code": 400,
"message": "Request validation errors"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.