POST
/
api
/
v1
/
apps
Create a new application
curl --request POST \
  --url https://app.miget.com/api/v1/apps \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "name": "<string>",
  "project_id": 123,
  "region_id": 123,
  "builder": "paketo",
  "resource_id": 123,
  "ram_size": 123,
  "cpu_size": 123
}
'
{
  "uuid": "<string>",
  "name": "<string>",
  "label": "<string>",
  "state": "<string>",
  "project_id": "<string>",
  "builder": "<string>",
  "manage_dns_records": true,
  "maintenance": true,
  "service_name": "<string>",
  "allow_connections": true,
  "quota": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "miget": {
    "uuid": "<string>",
    "name": "<string>",
    "state": "<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
      }
    ]
  },
  "addons": [
    {
      "uuid": "<string>",
      "name": "<string>",
      "type": "<string>",
      "label": "<string>",
      "state": "<string>",
      "quota": {},
      "settings": {},
      "var": {},
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "cronjobs": [
    {
      "uuid": "<string>",
      "name": "<string>",
      "type": "<string>",
      "label": "<string>",
      "state": "<string>",
      "quota": {},
      "settings": {},
      "var": {},
      "created_at": "2023-11-07T05:31:56Z",
      "updated_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)

Body

application/json

Create a new application

label
string
required

Human-readable display name for the application

name
string
required

Unique service name (used in URLs and DNS). Must be lowercase, alphanumeric with hyphens.

project_id
integer<int32>
required

ID of the project to create the application in

region_id
integer<int32>
required

ID of the deployment region

builder
enum<string>
required

Build strategy: 'paketo' for automatic buildpack detection, 'dockerfile' for custom Dockerfile builds

Available options:
paketo,
dockerfile
resource_id
integer<int32>

ID of the compute resource (Miget) to assign. If not provided, app will be created without compute power.

ram_size
number<float>

RAM allocation in MiB (e.g., 256, 512, 1024)

cpu_size
number<float>

CPU allocation in cores (e.g., 0.5, 1.0, 2.0)

Response

Create a new application

Api_V1_Entities_App model

uuid
string
required

Unique application identifier

name
string
required

Service name (used in URLs)

label
string
required

Display name

state
string
required

Current state (pending, running, stopped, etc.)

project_id
string
required

Associated project UUID

builder
string
required

Build strategy (paketo, dockerfile)

manage_dns_records
boolean
required

Auto DNS management enabled

maintenance
boolean
required

Maintenance mode enabled

service_name
string
required

Internal service name

allow_connections
boolean
required

Allow internal connections

quota
object
required

Resource quota configuration

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

addons
object[]
required

Attached add-ons

cronjobs
object[]
required

Scheduled cron jobs