pydo.apps.validate_app_spec()

Description

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.

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object.

Click to expand an example response for propose.
{
  "value": {
    "app_name_available": true,
    "existing_static_apps": "2",
    "max_free_static_apps": "3",
    "spec": {
      "name": "sample-golang",
      "services": [
        {
          "name": "web",
          "github": {
            "repo": "digitalocean/sample-golang",
            "branch": "branch"
          },
          "run_command": "bin/sample-golang",
          "environment_slug": "go",
          "instance_size_slug": "apps-s-1vcpu-0.5gb",
          "instance_count": 1,
          "http_port": 8080,
          "routes": [
            {
              "path": "/"
            }
          ]
        }
      ],
      "region": "ams"
    },
    "app_cost": 5
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}