Deploy

Deploy application

Changed on

Deploy application.

Auth: Required (bearer token). Scope: Organization-scoped in authenticated context. Side effects: May mutate server state.

post/api/v1/deploy/application

Request

  • Base URL
    http://:8080
  • URL
    http://:8080/api/v1/deploy/application
  • Auth
    none declared

Headers

Acceptstring

Request body */*

base_pathstring nullable

Base path for the application. Defaults to /

branchstring required

Git branch to deploy

build_packstring required

Build strategy for the application

build_variablesobject

Key-value pairs passed as build arguments to Docker

dockerfile_pathstring nullable

Path to the Dockerfile relative to the repository root

domainsstring[] nullable

Custom domains for the application

environmentstring required

Deployment environment

environment_variablesobject

Key-value pairs set as runtime environment variables

namestring required

Application name

portinteger required

Port the application listens on

post_run_commandstring

Command to run after the application starts

pre_run_commandstring

Command to run before the application starts

primary_server_idstring uuid

Primary server ID for routing

repositorystring required

Numeric GitHub repository ID (get from GET /github-connector/repositories). Do NOT pass owner/repo slug — it will fail at parse time.

routing_strategystring nullable

Routing strategy for multi-server deployments

server_idsstring[] nullable

Server IDs to deploy the application to

sourcestring nullable

Source type of the repository

target_server_idsstring[] nullable

Specific server IDs to target for this deployment

Example request

{
  "base_path": "/",
  "branch": "main",
  "build_pack": "dockerfile",
  "compose_domains": [
    {
      "domain": "app.example.com",
      "port": 8080,
      "service_name": "web"
    }
  ],
  "dockerfile_path": "Dockerfile",
  "environment": "production",
  "name": "my-web-app",
  "port": 3000,
  "post_run_command": "npm run seed",
  "pre_run_command": "npm run migrate",
  "primary_server_id": "550e8400-e29b-41d4-a716-446655440000",
  "repository": "912345678",
  "routing_strategy": "round-robin",
  "source": "github"
}

Response

Created

messagestring
statusstring

Changes

    • breaking

      the request property became required

    • breaking

      the request property became required

    • breaking

      the request property // became required

    • breaking

      the request property became required

    • breaking

      the request property became required

    • breaking

      the request property became required

    • breaking

      the request property became required

    • breaking

      removed the success response with the status

    • warning

      the / request property's maxLength was set to 5

    • warning

      the request property's max was set to 65535.00

    • warning

      the request property's min was set to 1.00

    • info

      api tag Deploy added

    • info

      api tag api/v1/deploy removed

    • info

      api tag application removed

    • info

      added the success response with the status

    • info

      added the optional property /////// to the response with the status (media type: application/json)

    • info

      added the optional property /////// to the response with the status (media type: application/xml)

    • info

      added the optional property //// to the response with the status (media type: application/json)

    • info

      added the optional property //// to the response with the status (media type: application/xml)

    • info

      added the optional property ////// to the response with the status (media type: application/json)

    • info

      added the optional property ////// to the response with the status (media type: application/xml)

    • info

      added the optional property / to the response with the status (media type: application/json)

    • info

      added the optional property / to the response with the status (media type: application/xml)