Update style artifact

http
PUT /projects/{project_reference}/style-artifacts/current

Record the state of the compiled CSS artifact for a branch, environment or release after a build; returns the style artifact record. Requires project.files.write.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.

Request body

FieldTypeRequiredDescription
style_profile_hashstringYesStyle profile identifier used with the selector to find current metadata.
branchstringBranch name. Exactly one of branch, environment_name, or release_id is required. Main may be implicit before its branch row exists; other branch and environment names must exist in the project or the request returns 404.
environment_namestringEnvironment name. Exactly one selector is required.
release_idstringRelease UUID. Exactly one selector is required.
statusstringMetadata state. Ready requires artifact_hash; other states forbid it. Failed requires failure_reason.
artifact_hashstringCSS artifact hash; required only for ready status and forbidden for other states.
asset_pathstringRegistered CSS asset path. This operation does not upload the asset.
content_typestringRegistered MIME type of the CSS asset.
etagstringRegistered entity tag for the CSS asset.
build_run_idstringStyle build run identifier, when available.
failure_reasonstringFailure detail; required when registering failed status.

Responses

StatusDescription
200Registered style artifact metadata
400Bad request
401Unauthorized
403Forbidden
404Not found
500Server error