PUT
/
api
/
v1
/
stacks
/
{uuid}
/
deployment
Update stack deployment configuration
curl --request PUT \
  --url https://app.miget.com/api/v1/stacks/{uuid}/deployment \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "branch": "<string>",
  "auto_deploy_enabled": true,
  "repository": "<string>"
}
'
{
  "uuid": "<string>",
  "name": "<string>",
  "label": "<string>",
  "state": "<string>",
  "project_id": "<string>",
  "compose_path": "<string>",
  "deployment_config": {},
  "total_cpu_size": 123,
  "total_ram_size": 123,
  "total_disk_size": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "miget": {
    "uuid": "<string>",
    "name": "<string>",
    "state": "<string>",
    "labels": [
      "<string>"
    ],
    "total_disk_size": 123,
    "total_ram_size": 123,
    "total_cpu_size": 123,
    "total_used_disk_size": 123,
    "total_used_ram_size": 123,
    "total_used_cpu_size": 123,
    "available_cpu_size": 123,
    "available_disk_size": 123,
    "available_ram_size": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "plan": {
      "name": "<string>",
      "code_name": "<string>",
      "description": "<string>",
      "ram_size": 123,
      "disk_size": 123,
      "cpu_size": 123,
      "unit_price": 123
    },
    "components": [
      {
        "name": "<string>",
        "code_name": "<string>",
        "unit_price": 123
      }
    ]
  },
  "services": [
    {
      "compose_service_name": "<string>",
      "compose_service_type": "<string>",
      "status": "<string>",
      "item_type": "<string>",
      "item_uuid": "<string>",
      "item_name": "<string>"
    }
  ],
  "latest_deployment": {
    "uuid": "<string>",
    "state": "<string>",
    "subevent": "<string>",
    "commit_sha": "<string>",
    "validation_errors": {},
    "published_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: 'Bearer {token}'

Headers

X-Workspace-Id
string

Workspace ID (uses default workspace if not provided)

Path Parameters

uuid
string
required

Stack UUID

Body

application/json

Update stack deployment configuration

branch
string

Tracked Git branch

auto_deploy_enabled
boolean

Deploy automatically on push to the tracked branch

repository
string

Repository slug (owner/repo)

Response

Update stack deployment configuration

Api_V1_Entities_Stack model

uuid
string
required

Unique stack identifier

name
string
required

Stack codename (unique per workspace)

label
string
required

Human-readable display name

state
string
required

Computed state (pending, validating, publishing, building, deploying, running, degraded, failed, stopped)

project_id
string
required

Associated project UUID

compose_path
string
required

Path to the docker-compose file within the repository

deployment_config
object
required

Git deployment configuration (type, repository, branch, auto_deploy_enabled)

total_cpu_size
number<float>
required

Total CPU allocated across stack services (cores)

total_ram_size
integer<int32>
required

Total RAM allocated across stack services (MiB)

total_disk_size
integer<int32>
required

Total disk allocated across stack services (MiB)

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp

miget
object
required

Api_V1_Entities_Resource model

services
object[]
required

Services materialized from the compose manifest

latest_deployment
object
required

Api_V1_Entities_StackDeployment model