Create or replace a version of a model at a version number
PUT/models/:modelId/versions/:version
Available in development only — the sandbox and production tables are replicas of development, so models cannot be written there.
Stores the payload at the version number in the path, creating that version if it does not exist and replacing it if it does. Replacing is how a model published to development is corrected without burning a version number on it. Fields the payload leaves out are removed from the stored version.
A version number that has not been used before must still supersede every version already
created, exactly as it must on POST — a version cannot be inserted below the latest one.
The path names the version. A version in the payload is optional, and is rejected if it
disagrees with the path, so a whole representation as returned by a GET can be sent back
unedited.
Once a version is published to sandbox or production it carries frozenAt and can no longer
be replaced — the version number has to stay a faithful record of what those environments ran,
and a rollback does not release it. Changing a frozen version means creating a new one.
Storing a version does not change what any environment is pointing at.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
- 409
- 413
Version replaced successfully
Version created successfully
The payload names a different version to the path
Missing or invalid bearer token
Token does not carry the management:models:write scope, or models are read-only in this environment
Model not found
This version has been published beyond development and can no longer be replaced, or it is a new version that does not supersede the latest one
The model is too large to store