POST /v2/apps/propose

To propose and validate a spec for a new or existing app, send a POST request to the /v2/apps/propose endpoint. The request returns some information about the proposed app, including app cost and upgrade cost. If an existing app ID is specified, the app spec is treated as a proposed update to the existing app.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
spec Object Yes

The desired configuration of an application.

spec.egress Object No

Specification for app egress configurations.

spec.egress.type String No

Possible values:

  • "DEDICATED_IP"
  • "AUTOASSIGN"

Default value: "AUTOASSIGN"

spec.region String No

The slug form of the geographical origin of the app. Default: nearest available

Possible values:

  • "fra"
  • "ams"
  • "blr"
  • "syd"
  • "tor"
  • "lon"
  • "sfo"
  • "sgp"
  • "nyc"
spec.domains[] Array No

A set of hostnames where the application will be available.

spec.domains[].zone String No

Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account.

For example, If the domain you are adding is app.domain.com, the zone could be domain.com.

spec.domains[].type String No
  • DEFAULT: The default .ondigitalocean.app domain assigned to this app
  • PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary.
  • ALIAS: A non-primary domain

Possible values:

  • "DEFAULT"
  • "PRIMARY"
  • "ALIAS"
  • "UNSPECIFIED"

Default value: "UNSPECIFIED"

spec.domains[].minimum_tls_version String No

The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: "1.2" or "1.3".

Possible values:

  • "1.3"
  • "1.2"
spec.domains[].domain String Yes

The hostname for the domain

spec.domains[].wildcard Boolean No

Indicates whether the domain includes all sub-domains, in addition to the given domain

spec.workers[] Array No

Workloads which do not expose publicly-accessible HTTP services.

spec.workers[].instance_count Integer No

The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used.

Default value: 1

spec.workers[].git Object No
spec.workers[].git.repo_clone_url String No

The clone URL of the repo. Example: https://github.com/digitalocean/sample-golang.git

spec.workers[].git.branch String No

The name of the branch to use

spec.workers[].environment_slug String No

An environment slug describing the type of this app. For a full list, please refer to the product documentation.

spec.workers[].run_command String No

An optional run command to override the component's default.

spec.workers[].image Object No
spec.workers[].image.digest String No

The image digest. Cannot be specified if tag is provided.

spec.workers[].image.deploy_on_push Object No
spec.workers[].image.deploy_on_push.enabled Boolean No

Whether to automatically deploy new images. Can only be used for images hosted in DOCR and can only be used with an image tag, not a specific digest.

spec.workers[].image.repository String No

The repository name.

spec.workers[].image.registry_type String No
  • DOCKER_HUB: The DockerHub container registry type.
  • DOCR: The DigitalOcean container registry type.
  • GHCR: The Github container registry type.

Possible values:

  • "DOCKER_HUB"
  • "DOCR"
  • "GHCR"
spec.workers[].image.registry_credentials String No

The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used.

  • "$username:$access_token" for registries of type DOCKER_HUB.
  • "$username:$access_token" for registries of type GHCR.
spec.workers[].image.registry String No

The registry name. Must be left empty for the DOCR registry type.

spec.workers[].image.tag String No

The repository tag. Defaults to latest if not provided and no digest is provided. Cannot be specified if digest is provided.

Default value: "latest"

spec.workers[].autoscaling Object No

Configuration for automatically scaling this component based on metrics.

spec.workers[].autoscaling.metrics Object No

The metrics that the component is scaled on.

spec.workers[].autoscaling.metrics.cpu Object No

Settings for scaling the component based on CPU utilization.

spec.workers[].autoscaling.metrics.cpu.percent Integer No

The average target CPU utilization for the component.

Default value: 80

spec.workers[].autoscaling.max_instance_count Integer No

The maximum amount of instances for this component. Must be more than min_instance_count.

spec.workers[].autoscaling.min_instance_count Integer No

The minimum amount of instances for this component. Must be less than max_instance_count.

spec.workers[].gitlab Object No
spec.workers[].gitlab.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.workers[].gitlab.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.workers[].gitlab.branch String No

The name of the branch to use

spec.workers[].instance_size_slug Object No

The instance size to use for this component. Default: apps-s-1vcpu-0.5gb

spec.workers[].liveness_health_check Object No
spec.workers[].liveness_health_check.initial_delay_seconds Integer No

The number of seconds to wait before beginning health checks.

spec.workers[].liveness_health_check.port Integer No

The port on which the health check will be performed.

spec.workers[].liveness_health_check.success_threshold Integer No

The number of successful health checks before considered healthy.

spec.workers[].liveness_health_check.failure_threshold Integer No

The number of failed health checks before considered unhealthy.

spec.workers[].liveness_health_check.period_seconds Integer No

The number of seconds to wait between health checks.

spec.workers[].liveness_health_check.http_path String No

The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead.

spec.workers[].liveness_health_check.timeout_seconds Integer No

The number of seconds after which the check times out.

spec.workers[].name String Yes

The name. Must be unique across all components within the same app.

spec.workers[].envs[] Array No

A list of environment variables made available to the component.

spec.workers[].envs[].key String Yes

The variable name

spec.workers[].envs[].type String No
  • GENERAL: A plain-text environment variable
  • SECRET: A secret encrypted environment variable

Possible values:

  • "SECRET"
  • "GENERAL"

Default value: "GENERAL"

spec.workers[].envs[].scope String No
  • RUN_TIME: Made available only at run-time
  • BUILD_TIME: Made available only at build-time
  • RUN_AND_BUILD_TIME: Made available at both build and run-time

Possible values:

  • "BUILD_TIME"
  • "RUN_AND_BUILD_TIME"
  • "UNSET"
  • "RUN_TIME"

Default value: "RUN_AND_BUILD_TIME"

spec.workers[].envs[].value String No

The value. If the type is SECRET, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.

spec.workers[].bitbucket Object No
spec.workers[].bitbucket.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.workers[].bitbucket.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.workers[].bitbucket.branch String No

The name of the branch to use

spec.workers[].github Object No
spec.workers[].github.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.workers[].github.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.workers[].github.branch String No

The name of the branch to use

spec.workers[].source_dir String No

An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.

spec.workers[].build_command String No

An optional build command to run while building this component from source.

spec.workers[].termination Object No
spec.workers[].termination.grace_period_seconds Integer No

The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120)

spec.workers[].dockerfile_path String No

The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.

spec.workers[].log_destinations[] Array No

A list of configured log forwarding destinations.

spec.workers[].log_destinations[].datadog Object No

DataDog configuration.

spec.workers[].log_destinations[].datadog.api_key String Yes

Datadog API key.

spec.workers[].log_destinations[].datadog.endpoint String No

Datadog HTTP log intake endpoint.

spec.workers[].log_destinations[].name String Yes
spec.workers[].log_destinations[].open_search Object No

OpenSearch configuration.

spec.workers[].log_destinations[].open_search.cluster_name String No

The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.

spec.workers[].log_destinations[].open_search.basic_auth Object No

Configure Username and/or Password for Basic authentication.

spec.workers[].log_destinations[].open_search.basic_auth.user String No

Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.

spec.workers[].log_destinations[].open_search.basic_auth.password No

Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.

spec.workers[].log_destinations[].open_search.index_name String No

The index name to use for the logs. If not set, the default index name is "logs".

Default value: "logs"

spec.workers[].log_destinations[].open_search.endpoint String No

OpenSearch API Endpoint. Only HTTPS is supported. Format: https://:. Cannot be specified if cluster_name is also specified.

spec.workers[].log_destinations[].logtail Object No

Logtail configuration.

spec.workers[].log_destinations[].logtail.token String No

Logtail token.

spec.workers[].log_destinations[].papertrail Object No

Papertrail configuration.

spec.workers[].log_destinations[].papertrail.endpoint String Yes

Papertrail syslog endpoint.

spec.name String Yes

The name of the app. Must be unique across all apps in the same account.

spec.databases[] Array No

Database instances which can provide persistence to workloads within the application.

spec.databases[].engine String No
  • MYSQL: MySQL
  • PG: PostgreSQL
  • REDIS: Redis
  • MONGODB: MongoDB
  • KAFKA: Kafka
  • OPENSEARCH: OpenSearch
  • VALKEY: ValKey

Possible values:

  • "MYSQL"
  • "REDIS"
  • "MONGODB"
  • "OPENSEARCH"
  • "PG"
  • "UNSET"
  • "KAFKA"
  • "VALKEY"

Default value: "UNSET"

spec.databases[].production Boolean No

Whether this is a production or dev database.

spec.databases[].name String Yes

The database's name. The name must be unique across all components within the same app and cannot use capital letters.

spec.databases[].cluster_name String No

The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned.

spec.databases[].version String No

The version of the database engine

spec.databases[].db_name String No

The name of the MySQL or PostgreSQL database to configure.

spec.databases[].db_user String No

The name of the MySQL or PostgreSQL user to configure.

spec.services[] Array No

Workloads which expose publicly-accessible HTTP services.

spec.services[].instance_count Integer No

The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used.

Default value: 1

spec.services[].internal_ports[] Array No

The ports on which this service will listen for internal traffic.

spec.services[].routes[] Array No

(Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component.

spec.services[].routes[].preserve_path_prefix Boolean No

An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with path=/api will have requests to /api/list trimmed to /list. If this value is true, the path will remain /api/list.

spec.services[].routes[].path String No

(Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app.

spec.services[].git Object No
spec.services[].git.repo_clone_url String No

The clone URL of the repo. Example: https://github.com/digitalocean/sample-golang.git

spec.services[].git.branch String No

The name of the branch to use

spec.services[].environment_slug String No

An environment slug describing the type of this app. For a full list, please refer to the product documentation.

spec.services[].protocol String No

The protocol which the service uses to serve traffic on the http_port.

  • HTTP: The app is serving the HTTP protocol. Default.
  • HTTP2: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c).

Possible values:

  • "HTTP"
  • "HTTP2"
spec.services[].run_command String No

An optional run command to override the component's default.

spec.services[].image Object No
spec.services[].image.digest String No

The image digest. Cannot be specified if tag is provided.

spec.services[].image.deploy_on_push Object No
spec.services[].image.deploy_on_push.enabled Boolean No

Whether to automatically deploy new images. Can only be used for images hosted in DOCR and can only be used with an image tag, not a specific digest.

spec.services[].image.repository String No

The repository name.

spec.services[].image.registry_type String No
  • DOCKER_HUB: The DockerHub container registry type.
  • DOCR: The DigitalOcean container registry type.
  • GHCR: The Github container registry type.

Possible values:

  • "DOCKER_HUB"
  • "DOCR"
  • "GHCR"
spec.services[].image.registry_credentials String No

The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used.

  • "$username:$access_token" for registries of type DOCKER_HUB.
  • "$username:$access_token" for registries of type GHCR.
spec.services[].image.registry String No

The registry name. Must be left empty for the DOCR registry type.

spec.services[].image.tag String No

The repository tag. Defaults to latest if not provided and no digest is provided. Cannot be specified if digest is provided.

Default value: "latest"

spec.services[].autoscaling Object No

Configuration for automatically scaling this component based on metrics.

spec.services[].autoscaling.metrics Object No

The metrics that the component is scaled on.

spec.services[].autoscaling.metrics.cpu Object No

Settings for scaling the component based on CPU utilization.

spec.services[].autoscaling.metrics.cpu.percent Integer No

The average target CPU utilization for the component.

Default value: 80

spec.services[].autoscaling.max_instance_count Integer No

The maximum amount of instances for this component. Must be more than min_instance_count.

spec.services[].autoscaling.min_instance_count Integer No

The minimum amount of instances for this component. Must be less than max_instance_count.

spec.services[].gitlab Object No
spec.services[].gitlab.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.services[].gitlab.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.services[].gitlab.branch String No

The name of the branch to use

spec.services[].instance_size_slug Object No

The instance size to use for this component. Default: apps-s-1vcpu-0.5gb

spec.services[].liveness_health_check Object No
spec.services[].liveness_health_check.initial_delay_seconds Integer No

The number of seconds to wait before beginning health checks.

spec.services[].liveness_health_check.port Integer No

The port on which the health check will be performed.

spec.services[].liveness_health_check.success_threshold Integer No

The number of successful health checks before considered healthy.

spec.services[].liveness_health_check.failure_threshold Integer No

The number of failed health checks before considered unhealthy.

spec.services[].liveness_health_check.period_seconds Integer No

The number of seconds to wait between health checks.

spec.services[].liveness_health_check.http_path String No

The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead.

spec.services[].liveness_health_check.timeout_seconds Integer No

The number of seconds after which the check times out.

spec.services[].name String Yes

The name. Must be unique across all components within the same app.

spec.services[].health_check Object No
spec.services[].health_check.initial_delay_seconds Integer No

The number of seconds to wait before beginning health checks.

spec.services[].health_check.port Integer No

The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port.

spec.services[].health_check.success_threshold Integer No

The number of successful health checks before considered healthy.

spec.services[].health_check.failure_threshold Integer No

The number of failed health checks before considered unhealthy.

spec.services[].health_check.period_seconds Integer No

The number of seconds to wait between health checks.

spec.services[].health_check.http_path String No

The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead.

spec.services[].health_check.timeout_seconds Integer No

The number of seconds after which the check times out.

spec.services[].envs[] Array No

A list of environment variables made available to the component.

spec.services[].envs[].key String Yes

The variable name

spec.services[].envs[].type String No
  • GENERAL: A plain-text environment variable
  • SECRET: A secret encrypted environment variable

Possible values:

  • "SECRET"
  • "GENERAL"

Default value: "GENERAL"

spec.services[].envs[].scope String No
  • RUN_TIME: Made available only at run-time
  • BUILD_TIME: Made available only at build-time
  • RUN_AND_BUILD_TIME: Made available at both build and run-time

Possible values:

  • "BUILD_TIME"
  • "RUN_AND_BUILD_TIME"
  • "UNSET"
  • "RUN_TIME"

Default value: "RUN_AND_BUILD_TIME"

spec.services[].envs[].value String No

The value. If the type is SECRET, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.

spec.services[].bitbucket Object No
spec.services[].bitbucket.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.services[].bitbucket.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.services[].bitbucket.branch String No

The name of the branch to use

spec.services[].github Object No
spec.services[].github.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.services[].github.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.services[].github.branch String No

The name of the branch to use

spec.services[].source_dir String No

An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.

spec.services[].http_port Integer No

The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name PORT, one will be automatically added with its value set to the value of this field.

spec.services[].build_command String No

An optional build command to run while building this component from source.

spec.services[].termination Object No
spec.services[].termination.drain_seconds Integer No

The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. (Default 15)

spec.services[].termination.grace_period_seconds Integer No

The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120)

spec.services[].dockerfile_path String No

The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.

spec.services[].log_destinations[] Array No

A list of configured log forwarding destinations.

spec.services[].log_destinations[].datadog Object No

DataDog configuration.

spec.services[].log_destinations[].datadog.api_key String Yes

Datadog API key.

spec.services[].log_destinations[].datadog.endpoint String No

Datadog HTTP log intake endpoint.

spec.services[].log_destinations[].name String Yes
spec.services[].log_destinations[].open_search Object No

OpenSearch configuration.

spec.services[].log_destinations[].open_search.cluster_name String No

The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.

spec.services[].log_destinations[].open_search.basic_auth Object No

Configure Username and/or Password for Basic authentication.

spec.services[].log_destinations[].open_search.basic_auth.user String No

Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.

spec.services[].log_destinations[].open_search.basic_auth.password No

Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.

spec.services[].log_destinations[].open_search.index_name String No

The index name to use for the logs. If not set, the default index name is "logs".

Default value: "logs"

spec.services[].log_destinations[].open_search.endpoint String No

OpenSearch API Endpoint. Only HTTPS is supported. Format: https://:. Cannot be specified if cluster_name is also specified.

spec.services[].log_destinations[].logtail Object No

Logtail configuration.

spec.services[].log_destinations[].logtail.token String No

Logtail token.

spec.services[].log_destinations[].papertrail Object No

Papertrail configuration.

spec.services[].log_destinations[].papertrail.endpoint String Yes

Papertrail syslog endpoint.

spec.maintenance Object No

Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app.

spec.maintenance.offline_page_url String No

A custom offline page to display when maintenance mode is enabled or the app is archived.

spec.maintenance.enabled Boolean No

Indicates whether maintenance mode should be enabled for the app.

spec.maintenance.archive Boolean No

Indicates whether the app should be archived. Setting this to true implies that enabled is set to true.

spec.jobs[] Array No

Pre and post deployment workloads which do not expose publicly-accessible HTTP routes.

spec.jobs[].instance_count Integer No

The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used.

Default value: 1

spec.jobs[].git Object No
spec.jobs[].git.repo_clone_url String No

The clone URL of the repo. Example: https://github.com/digitalocean/sample-golang.git

spec.jobs[].git.branch String No

The name of the branch to use

spec.jobs[].environment_slug String No

An environment slug describing the type of this app. For a full list, please refer to the product documentation.

spec.jobs[].run_command String No

An optional run command to override the component's default.

spec.jobs[].image Object No
spec.jobs[].image.digest String No

The image digest. Cannot be specified if tag is provided.

spec.jobs[].image.deploy_on_push Object No
spec.jobs[].image.deploy_on_push.enabled Boolean No

Whether to automatically deploy new images. Can only be used for images hosted in DOCR and can only be used with an image tag, not a specific digest.

spec.jobs[].image.repository String No

The repository name.

spec.jobs[].image.registry_type String No
  • DOCKER_HUB: The DockerHub container registry type.
  • DOCR: The DigitalOcean container registry type.
  • GHCR: The Github container registry type.

Possible values:

  • "DOCKER_HUB"
  • "DOCR"
  • "GHCR"
spec.jobs[].image.registry_credentials String No

The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used.

  • "$username:$access_token" for registries of type DOCKER_HUB.
  • "$username:$access_token" for registries of type GHCR.
spec.jobs[].image.registry String No

The registry name. Must be left empty for the DOCR registry type.

spec.jobs[].image.tag String No

The repository tag. Defaults to latest if not provided and no digest is provided. Cannot be specified if digest is provided.

Default value: "latest"

spec.jobs[].autoscaling Object No

Configuration for automatically scaling this component based on metrics.

spec.jobs[].autoscaling.metrics Object No

The metrics that the component is scaled on.

spec.jobs[].autoscaling.metrics.cpu Object No

Settings for scaling the component based on CPU utilization.

spec.jobs[].autoscaling.metrics.cpu.percent Integer No

The average target CPU utilization for the component.

Default value: 80

spec.jobs[].autoscaling.max_instance_count Integer No

The maximum amount of instances for this component. Must be more than min_instance_count.

spec.jobs[].autoscaling.min_instance_count Integer No

The minimum amount of instances for this component. Must be less than max_instance_count.

spec.jobs[].gitlab Object No
spec.jobs[].gitlab.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.jobs[].gitlab.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.jobs[].gitlab.branch String No

The name of the branch to use

spec.jobs[].instance_size_slug Object No

The instance size to use for this component. Default: apps-s-1vcpu-0.5gb

spec.jobs[].name String Yes

The name. Must be unique across all components within the same app.

spec.jobs[].envs[] Array No

A list of environment variables made available to the component.

spec.jobs[].envs[].key String Yes

The variable name

spec.jobs[].envs[].type String No
  • GENERAL: A plain-text environment variable
  • SECRET: A secret encrypted environment variable

Possible values:

  • "SECRET"
  • "GENERAL"

Default value: "GENERAL"

spec.jobs[].envs[].scope String No
  • RUN_TIME: Made available only at run-time
  • BUILD_TIME: Made available only at build-time
  • RUN_AND_BUILD_TIME: Made available at both build and run-time

Possible values:

  • "BUILD_TIME"
  • "RUN_AND_BUILD_TIME"
  • "UNSET"
  • "RUN_TIME"

Default value: "RUN_AND_BUILD_TIME"

spec.jobs[].envs[].value String No

The value. If the type is SECRET, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.

spec.jobs[].bitbucket Object No
spec.jobs[].bitbucket.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.jobs[].bitbucket.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.jobs[].bitbucket.branch String No

The name of the branch to use

spec.jobs[].github Object No
spec.jobs[].github.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.jobs[].github.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.jobs[].github.branch String No

The name of the branch to use

spec.jobs[].source_dir String No

An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.

spec.jobs[].kind String No
  • UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind.
  • PRE_DEPLOY: Indicates a job that runs before an app deployment.
  • POST_DEPLOY: Indicates a job that runs after an app deployment.
  • FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy.

Possible values:

  • "PRE_DEPLOY"
  • "UNSPECIFIED"
  • "POST_DEPLOY"
  • "FAILED_DEPLOY"

Default value: "UNSPECIFIED"

spec.jobs[].build_command String No

An optional build command to run while building this component from source.

spec.jobs[].termination Object No
spec.jobs[].termination.grace_period_seconds Integer No

The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120)

spec.jobs[].dockerfile_path String No

The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.

spec.jobs[].log_destinations[] Array No

A list of configured log forwarding destinations.

spec.jobs[].log_destinations[].datadog Object No

DataDog configuration.

spec.jobs[].log_destinations[].datadog.api_key String Yes

Datadog API key.

spec.jobs[].log_destinations[].datadog.endpoint String No

Datadog HTTP log intake endpoint.

spec.jobs[].log_destinations[].name String Yes
spec.jobs[].log_destinations[].open_search Object No

OpenSearch configuration.

spec.jobs[].log_destinations[].open_search.cluster_name String No

The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.

spec.jobs[].log_destinations[].open_search.basic_auth Object No

Configure Username and/or Password for Basic authentication.

spec.jobs[].log_destinations[].open_search.basic_auth.user String No

Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.

spec.jobs[].log_destinations[].open_search.basic_auth.password No

Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.

spec.jobs[].log_destinations[].open_search.index_name String No

The index name to use for the logs. If not set, the default index name is "logs".

Default value: "logs"

spec.jobs[].log_destinations[].open_search.endpoint String No

OpenSearch API Endpoint. Only HTTPS is supported. Format: https://:. Cannot be specified if cluster_name is also specified.

spec.jobs[].log_destinations[].logtail Object No

Logtail configuration.

spec.jobs[].log_destinations[].logtail.token String No

Logtail token.

spec.jobs[].log_destinations[].papertrail Object No

Papertrail configuration.

spec.jobs[].log_destinations[].papertrail.endpoint String Yes

Papertrail syslog endpoint.

spec.static_sites[] Array No

Content which can be rendered to static web assets.

spec.static_sites[].catchall_document String No

The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of catchall_document or error_document can be set.

spec.static_sites[].routes[] Array No

(Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component.

spec.static_sites[].routes[].preserve_path_prefix Boolean No

An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with path=/api will have requests to /api/list trimmed to /list. If this value is true, the path will remain /api/list.

spec.static_sites[].routes[].path String No

(Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app.

spec.static_sites[].git Object No
spec.static_sites[].git.repo_clone_url String No

The clone URL of the repo. Example: https://github.com/digitalocean/sample-golang.git

spec.static_sites[].git.branch String No

The name of the branch to use

spec.static_sites[].environment_slug String No

An environment slug describing the type of this app. For a full list, please refer to the product documentation.

spec.static_sites[].run_command String No

An optional run command to override the component's default.

spec.static_sites[].image Object No
spec.static_sites[].image.digest String No

The image digest. Cannot be specified if tag is provided.

spec.static_sites[].image.deploy_on_push Object No
spec.static_sites[].image.deploy_on_push.enabled Boolean No

Whether to automatically deploy new images. Can only be used for images hosted in DOCR and can only be used with an image tag, not a specific digest.

spec.static_sites[].image.repository String No

The repository name.

spec.static_sites[].image.registry_type String No
  • DOCKER_HUB: The DockerHub container registry type.
  • DOCR: The DigitalOcean container registry type.
  • GHCR: The Github container registry type.

Possible values:

  • "DOCKER_HUB"
  • "DOCR"
  • "GHCR"
spec.static_sites[].image.registry_credentials String No

The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used.

  • "$username:$access_token" for registries of type DOCKER_HUB.
  • "$username:$access_token" for registries of type GHCR.
spec.static_sites[].image.registry String No

The registry name. Must be left empty for the DOCR registry type.

spec.static_sites[].image.tag String No

The repository tag. Defaults to latest if not provided and no digest is provided. Cannot be specified if digest is provided.

Default value: "latest"

spec.static_sites[].index_document String No

The name of the index document to use when serving this static site. Default: index.html

Default value: "index.html"

spec.static_sites[].gitlab Object No
spec.static_sites[].gitlab.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.static_sites[].gitlab.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.static_sites[].gitlab.branch String No

The name of the branch to use

spec.static_sites[].name String Yes

The name. Must be unique across all components within the same app.

spec.static_sites[].error_document String No

The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one.

Default value: "404.html"

spec.static_sites[].output_dir String No

An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: _static, dist, public, build.

spec.static_sites[].envs[] Array No

A list of environment variables made available to the component.

spec.static_sites[].envs[].key String Yes

The variable name

spec.static_sites[].envs[].type String No
  • GENERAL: A plain-text environment variable
  • SECRET: A secret encrypted environment variable

Possible values:

  • "SECRET"
  • "GENERAL"

Default value: "GENERAL"

spec.static_sites[].envs[].scope String No
  • RUN_TIME: Made available only at run-time
  • BUILD_TIME: Made available only at build-time
  • RUN_AND_BUILD_TIME: Made available at both build and run-time

Possible values:

  • "BUILD_TIME"
  • "RUN_AND_BUILD_TIME"
  • "UNSET"
  • "RUN_TIME"

Default value: "RUN_AND_BUILD_TIME"

spec.static_sites[].envs[].value String No

The value. If the type is SECRET, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.

spec.static_sites[].bitbucket Object No
spec.static_sites[].bitbucket.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.static_sites[].bitbucket.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.static_sites[].bitbucket.branch String No

The name of the branch to use

spec.static_sites[].github Object No
spec.static_sites[].github.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.static_sites[].github.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.static_sites[].github.branch String No

The name of the branch to use

spec.static_sites[].source_dir String No

An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.

spec.static_sites[].build_command String No

An optional build command to run while building this component from source.

spec.static_sites[].dockerfile_path String No

The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.

spec.static_sites[].log_destinations[] Array No

A list of configured log forwarding destinations.

spec.static_sites[].log_destinations[].datadog Object No

DataDog configuration.

spec.static_sites[].log_destinations[].datadog.api_key String Yes

Datadog API key.

spec.static_sites[].log_destinations[].datadog.endpoint String No

Datadog HTTP log intake endpoint.

spec.static_sites[].log_destinations[].name String Yes
spec.static_sites[].log_destinations[].open_search Object No

OpenSearch configuration.

spec.static_sites[].log_destinations[].open_search.cluster_name String No

The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.

spec.static_sites[].log_destinations[].open_search.basic_auth Object No

Configure Username and/or Password for Basic authentication.

spec.static_sites[].log_destinations[].open_search.basic_auth.user String No

Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.

spec.static_sites[].log_destinations[].open_search.basic_auth.password No

Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.

spec.static_sites[].log_destinations[].open_search.index_name String No

The index name to use for the logs. If not set, the default index name is "logs".

Default value: "logs"

spec.static_sites[].log_destinations[].open_search.endpoint String No

OpenSearch API Endpoint. Only HTTPS is supported. Format: https://:. Cannot be specified if cluster_name is also specified.

spec.static_sites[].log_destinations[].logtail Object No

Logtail configuration.

spec.static_sites[].log_destinations[].logtail.token String No

Logtail token.

spec.static_sites[].log_destinations[].papertrail Object No

Papertrail configuration.

spec.static_sites[].log_destinations[].papertrail.endpoint String Yes

Papertrail syslog endpoint.

spec.ingress Object No

Specification for app ingress configurations.

spec.ingress.rules[] Array No

Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.

spec.ingress.rules[].match Object No

The match configuration for the rule.

spec.ingress.rules[].match.authority Object No

The authority to match on.

spec.ingress.rules[].match.authority.exact String Yes
spec.ingress.rules[].match.path Object No

The path to match on.

spec.ingress.rules[].match.path.prefix String Yes

Prefix-based match. For example, /api will match /api, /api/, and any nested paths such as /api/v1/endpoint.

spec.ingress.rules[].cors Object No
spec.ingress.rules[].cors.allow_origins[] Array No

The set of allowed CORS origins.

spec.ingress.rules[].cors.allow_origins[].exact String No

Exact string match. Only 1 of exact, prefix, or regex must be set.

spec.ingress.rules[].cors.allow_origins[].prefix String No

Prefix-based match. Only 1 of exact, prefix, or regex must be set.

spec.ingress.rules[].cors.allow_origins[].regex String No

RE2 style regex-based match. Only 1 of exact, prefix, or regex must be set. For more information about RE2 syntax, see: https://github.com/google/re2/wiki/Syntax

spec.ingress.rules[].cors.expose_headers[] Array No

The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.

spec.ingress.rules[].cors.allow_headers[] Array No

The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.

spec.ingress.rules[].cors.allow_credentials Boolean No

Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is include. This configures the Access-Control-Allow-Credentials header.

spec.ingress.rules[].cors.max_age String No

An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header.

spec.ingress.rules[].cors.allow_methods[] Array No

The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.

spec.ingress.rules[].component Object No

The component to route to. Only one of component or redirect may be set.

spec.ingress.rules[].component.name String Yes

The name of the component to route to.

spec.ingress.rules[].component.rewrite String No

An optional field that will rewrite the path of the component to be what is specified here. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with path=/api will have requests to /api/list trimmed to /list. If you specified the rewrite to be /v1/, requests to /api/list would be rewritten to /v1/list. Note: this is mutually exclusive with preserve_path_prefix.

spec.ingress.rules[].component.preserve_path_prefix String No

An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with path=/api will have requests to /api/list trimmed to /list. If this value is true, the path will remain /api/list. Note: this is not applicable for Functions Components and is mutually exclusive with rewrite.

spec.ingress.rules[].redirect Object No

The redirect configuration for the rule. Only one of component or redirect may be set.

spec.ingress.rules[].redirect.uri String No

An optional URI path to redirect to. Note: if this is specified the whole URI of the original request will be overwritten to this value, irrespective of the original request URI being matched.

spec.ingress.rules[].redirect.port Integer No

The port to redirect to.

spec.ingress.rules[].redirect.scheme String No

The scheme to redirect to. Supported values are http or https. Default: https.

spec.ingress.rules[].redirect.authority String No

The authority/host to redirect to. This can be a hostname or IP address. Note: use port to set the port.

spec.ingress.rules[].redirect.redirect_code Integer No

The redirect code to use. Defaults to 302. Supported values are 300, 301, 302, 303, 304, 307, 308.

spec.functions[] Array No

Workloads which expose publicly-accessible HTTP services via Functions Components.

spec.functions[].gitlab Object No
spec.functions[].gitlab.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.functions[].gitlab.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.functions[].gitlab.branch String No

The name of the branch to use

spec.functions[].name String Yes

The name. Must be unique across all components within the same app.

spec.functions[].routes[] Array No

(Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component.

spec.functions[].routes[].preserve_path_prefix Boolean No

An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with path=/api will have requests to /api/list trimmed to /list. If this value is true, the path will remain /api/list.

spec.functions[].routes[].path String No

(Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app.

spec.functions[].envs[] Array No

A list of environment variables made available to the component.

spec.functions[].envs[].key String Yes

The variable name

spec.functions[].envs[].type String No
  • GENERAL: A plain-text environment variable
  • SECRET: A secret encrypted environment variable

Possible values:

  • "SECRET"
  • "GENERAL"

Default value: "GENERAL"

spec.functions[].envs[].scope String No
  • RUN_TIME: Made available only at run-time
  • BUILD_TIME: Made available only at build-time
  • RUN_AND_BUILD_TIME: Made available at both build and run-time

Possible values:

  • "BUILD_TIME"
  • "RUN_AND_BUILD_TIME"
  • "UNSET"
  • "RUN_TIME"

Default value: "RUN_AND_BUILD_TIME"

spec.functions[].envs[].value String No

The value. If the type is SECRET, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.

spec.functions[].git Object No
spec.functions[].git.repo_clone_url String No

The clone URL of the repo. Example: https://github.com/digitalocean/sample-golang.git

spec.functions[].git.branch String No

The name of the branch to use

spec.functions[].bitbucket Object No
spec.functions[].bitbucket.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.functions[].bitbucket.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.functions[].bitbucket.branch String No

The name of the branch to use

spec.functions[].github Object No
spec.functions[].github.repo String No

The name of the repo in the format owner/repo. Example: digitalocean/sample-golang

spec.functions[].github.deploy_on_push Boolean No

Whether to automatically deploy new commits made to the repo

spec.functions[].github.branch String No

The name of the branch to use

spec.functions[].source_dir String No

An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.

spec.functions[].alerts[] Array No
spec.functions[].alerts[].operator String No

Possible values:

  • "GREATER_THAN"
  • "UNSPECIFIED_OPERATOR"
  • "LESS_THAN"

Default value: "UNSPECIFIED_OPERATOR"

spec.functions[].alerts[].rule String No

Possible values:

  • "DEPLOYMENT_LIVE"
  • "MEM_UTILIZATION"
  • "FUNCTIONS_ERROR_COUNT"
  • "DEPLOYMENT_FAILED"
  • "FUNCTIONS_ERROR_RATE_PER_MINUTE"
  • "FUNCTIONS_AVERAGE_DURATION_MS"
  • "DOMAIN_FAILED"
  • "CPU_UTILIZATION"
  • "UNSPECIFIED_RULE"
  • "FUNCTIONS_AVERAGE_WAIT_TIME_MS"
  • "DOMAIN_LIVE"
  • "RESTART_COUNT"
  • "FUNCTIONS_GB_RATE_PER_SECOND"
  • "AUTOSCALE_FAILED"
  • "FUNCTIONS_ACTIVATION_COUNT"

Default value: "UNSPECIFIED_RULE"

spec.functions[].alerts[].disabled Boolean No

Is the alert disabled?

spec.functions[].alerts[].value Number No

Threshold value for alert

spec.functions[].alerts[].window String No

Possible values:

  • "ONE_HOUR"
  • "THIRTY_MINUTES"
  • "FIVE_MINUTES"
  • "TEN_MINUTES"
  • "UNSPECIFIED_WINDOW"

Default value: "UNSPECIFIED_WINDOW"

spec.functions[].log_destinations[] Array No

A list of configured log forwarding destinations.

spec.functions[].log_destinations[].datadog Object No

DataDog configuration.

spec.functions[].log_destinations[].datadog.api_key String Yes

Datadog API key.

spec.functions[].log_destinations[].datadog.endpoint String No

Datadog HTTP log intake endpoint.

spec.functions[].log_destinations[].name String Yes
spec.functions[].log_destinations[].open_search Object No

OpenSearch configuration.

spec.functions[].log_destinations[].open_search.cluster_name String No

The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if endpoint is also specified.

spec.functions[].log_destinations[].open_search.basic_auth Object No

Configure Username and/or Password for Basic authentication.

spec.functions[].log_destinations[].open_search.basic_auth.user String No

Username to authenticate with. Only required when endpoint is set. Defaults to doadmin when cluster_name is set.

spec.functions[].log_destinations[].open_search.basic_auth.password No

Password for user defined in User. Is required when endpoint is set. Cannot be set if using a DigitalOcean DBaaS OpenSearch cluster.

spec.functions[].log_destinations[].open_search.index_name String No

The index name to use for the logs. If not set, the default index name is "logs".

Default value: "logs"

spec.functions[].log_destinations[].open_search.endpoint String No

OpenSearch API Endpoint. Only HTTPS is supported. Format: https://:. Cannot be specified if cluster_name is also specified.

spec.functions[].log_destinations[].logtail Object No

Logtail configuration.

spec.functions[].log_destinations[].logtail.token String No

Logtail token.

spec.functions[].log_destinations[].papertrail Object No

Papertrail configuration.

spec.functions[].log_destinations[].papertrail.endpoint String Yes

Papertrail syslog endpoint.

app_id String No

An optional ID of an existing app. If set, the spec will be treated as a proposed update to the specified app. The existing app is not modified using this method.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.