Triggering An Apply Change

Triggering An Apply Change
Triggering an Apply Change

Transmits pending changes to BOSH.

Submitting a POST request to this endpoint is equivalent to triggering the Apply Changes button in the GUI.

When deploy_products is an array of product guids ["my-guid", "another-guid"], it will deploy the director tile and all passed-in products. If there are any tiles being deployed, which are dependent on tiles with staged changes not being deployed, there will be validation errors and the deploy will not occur.

Request
URI
POST
https://{opsmanager-installation}/api/v0/installations
COPY
Request Body
PostInstallations of type(s) application/json
Optional
{
    "force_latest_variables": false,
    "recreate": false,
    "fix_stemcells": false,
    "ignore_warnings": false,
    "deploy_products": [
        "string"
    ],
    "errands": {},
    "allow_unsafe_dependency_update": false,
    "allow_unsafe_dependency_deletion": false,
    "rotate_certs": {
        "non_configurable_leaf": false
    }
}
boolean
force_latest_variables
Optional

When true, the BOSH deploy will use the --force-latest-variables CLI flag. This will force any certificates or other BOSH variables to use their latest version even when a stemcell is not being upgraded for the deployment.

boolean
recreate
Optional

When true, the BOSH deploy will use the --recreate CLI flag, causing all director managed VMs to be recreated. When omitted, the recreate behavior is determined by the Director tile's "Recreate VMs" configuration setting.

boolean
fix_stemcells
Optional

When true, stemcell uploads will use the bosh upload-stemcell --fix CLI flag, forcing the BOSH Director to replace stemcells it already has by name and version. Use this after migrating an availability zone to a different vCenter, so the stemcell is created in the newly targeted vCenter, or to recover from a corrupt or incompletely uploaded stemcell on the Director. Apply Changes fails if an assigned stemcell's tarball is not present in the Ops Manager library, since it cannot be re-uploaded. Does not affect the BOSH Director VM's own stemcell.

boolean
ignore_warnings
Optional

When true, bypass warnings from ignorable verifiers. (Optional)

deploy_products
Optional

Apply changes only for the specified products. Will always apply changes for the BOSH Director. Can either be an array of product guids or a string with the value "all" or "none".

object
errands
Optional

Hash of products with their enabled errands. (Optional)

Post Deploy errands support the following states:

  • true
  • false
  • "default"

Pre Delete errands support the following states:

  • true
  • false
  • "default"
boolean
allow_unsafe_dependency_update
Optional

When true, bypass the dependency-has-staged-changes check for optional dependencies only. Required dependencies always block Apply Changes regardless of this flag. Use after receiving a 422 response whose available_overrides includes "allow_unsafe_dependency_update".

boolean
allow_unsafe_dependency_deletion
Optional

When true, bypass the deletion-dependency check for optional dependencies only. Required dependencies always block Apply Changes regardless of this flag. Use after receiving a 422 response whose available_overrides includes "allow_unsafe_dependency_deletion".

object
rotate_certs
Optional

Options for rotating certificates during Apply Changes.

Responses
200

OK

Returns Install of type(s) application/json
{
    "install": {
        "id": 0
    }
}
install
Optional

install


400

Setup is not completed or bad request

{
    "errors": {
        "errors": [
            "string"
        ]
    }
}

401

Unauthorized

Returns UnauthorizedResponse of type(s) application/json
{
    "errors": {
        "errors": [
            "string"
        ]
    }
}
object
errors
Optional

errors


403

Forbidden

Returns ForbiddenResponse of type(s) application/json
{
    "errors": {
        "errors": [
            "string"
        ]
    }
}
object
errors
Optional

errors


422

Unprocessable Content

Returns InstallationsErrorResponse of type(s) application/json
{
    "errors": [
        "string"
    ],
    "warnings": [
        "string"
    ],
    "available_overrides": [
        "string"
    ],
    "deployment_errors": {
        "products": [
            {
                "identifier": "string",
                "complete": false,
                "network": {
                    "assigned": false
                },
                "availability_zone": {
                    "assigned": false
                },
                "stemcells": [
                    {
                        "assigned": false,
                        "required_stemcell_version": "string",
                        "required_stemcell_os": "string"
                    }
                ],
                "properties": [
                    {
                        "name": "string",
                        "type": "string",
                        "errors": [
                            "string"
                        ],
                        "records": [
                            {
                                "index": 0,
                                "errors": [
                                    {
                                        "name": "string",
                                        "type": "string",
                                        "errors": [
                                            "string"
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ],
                "resources": {
                    "jobs": [
                        {
                            "identifier": "string",
                            "guid": "string",
                            "error": [
                                "string"
                            ]
                        }
                    ]
                },
                "verifiers": [
                    {
                        "type": "string",
                        "ignorable": false,
                        "errors": [
                            "string"
                        ]
                    }
                ]
            }
        ]
    }
}
array of string
errors
Required  

errors

array of string
warnings
Optional

warnings

array of string
available_overrides
Optional

Override mechanisms available to unblock a retry. Each value is a request parameter name that can be set to true on the next request. Omitted when no overrides are available. Clients must handle unknown values gracefully, as new override types may be added in minor versions without a version bump.

deployment_errors
Optional

deployment_errors


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '}' https://{api_host}/api/v0/installations