Skip to main content

Update building block

PUT 

/api/meshobjects/meshbuildingblocks/:uuid

Updates the building block and triggers an apply run on a real provisioning change (an actual input change, or a version upgrade); a no-op PUT and a displayName-only rename do not trigger a run. The dry-run variant lives on POST /{uuid}/trigger-run. spec.inputs and spec.buildingBlockDefinitionVersionRef.uuid may be changed. When buildingBlockDefinitionVersionRef.uuid differs from the current version, an in-place upgrade is performed: provided inputs and spec.parentBuildingBlockRefs are applied, with existing values as fallback for inputs not supplied. The new version's required parent definitions must be satisfied by spec.parentBuildingBlockRefs; a 400 is returned if they are not. This example sends the deprecated spec.parentBuildingBlocks, which the API still accepts in place of spec.parentBuildingBlockRefs. An upgrade may only move to the latest released version of the same definition; downgrades and non-released versions are rejected with a 400. As an exception, a platform operator or admin may upgrade a building block that lives in the definition's own workspace to a draft version, to test an unreleased version on a test building block before releasing it. displayName can be changed in place to rename a building block on a same-version or version-change PUT; a rename alone does not trigger a run. On a same-version PUT, targetRef and the parent Building Blocks remain immutable. Only inputs with assignment type CUSTOMER_INPUT or PLATFORM_OPERATOR_MANUAL_INPUT can be updated. Inputs with assignment type STATIC are rejected. Null input values: a present-but-null input value is treated as 'omit this key' — the existing stored value is preserved and no error is returned. This enables read-modify-write patterns where callers echo a full GET response body (which may contain null-valued inputs for not-yet-set inputs) without having to filter out null entries. Note: inputs cannot be cleared to null via PUT — send a non-null value to update an input. Note that the building block definition may be owned by a different workspace than the one owning the building block itself. API keys with workspace-scoped permissions (e.g. 'Manage Building Blocks for owned definition') can update building blocks created from definitions owned by that workspace, even if the building block resides on a tenant in another workspace.

Authentication: This endpoint supports API Key authentication.

Request

Responses

200