Publish a model version to one or more environments
POST/models/:modelId/versions/:version/publish
Available in development only — the pointers for every environment are written to the development table and replicated outwards.
At least one environment must be set to true. Environments set to false or omitted are left untouched; there is no unpublishing. To roll an environment back, publish the earlier version to it.
Promotion runs development, then sandbox, then production: a version reaches an environment only once its upstream holds it. Environments named in the same request count, so a single call can promote a version more than one step. Rolling an environment back onto an earlier version is exempt from the order, but only if that version has been published beyond development before — one that never left development cannot be dropped into production by going backwards.
Publishing to sandbox or production freezes the version: its body can never be changed again, so the version number remains a faithful record of what those environments ran. Rolling the environment back to an earlier version does not release the freeze. Publishing to development alone does not freeze anything.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
Version published successfully
No environment was selected
Missing or invalid bearer token
Token does not carry the management:models:write scope, or models are read-only in this environment
No such version of this model
The version has not reached the upstream environment, or the environment is being rolled back to a version that never left development