Versions
Update the artifact version state
Updates the state of an artifact version.
NOTE: There are some restrictions on state transitions. Notably a version cannot be transitioned to the DRAFT state from any other state. The DRAFT state can only be entered (optionally) when creating a new artifact/version. A version in DRAFT state can only be transitioned to ENABLED. When this happens, any configured content rules will be applied. This may result in a failure to change the state.
This operation can fail for the following reasons:
- No artifact with this artifactId exists (HTTP error 404)
- No version with this version exists (HTTP error 404)
- An invalid new state was provided (HTTP error 400)
- The draft content violates one or more of the rules configured for the artifact (HTTP error 409)
- A server error occurred (HTTP error 500)
put/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/state
Query parameters
dryRunboolean
When set to true, the operation will not result in any changes. Instead, it will return a result based on whether the operation would have succeeded.
Request body
Example request
{
"state": "ENABLED"
}Response
The state was successfully updated.