Опубликовать версию модели
Accepts the publication and answers at once with its operation, in
status publishing; the platform then copies and verifies the version's
immutable files, registers it and flips the catalogue in the background.
Poll GET /models/{model_id}/ (or the version list): its publication
says publishing until every step is done, then published -- only
then does the model's own status say published -- or failed with
a safe error_code (retryable when the same request may simply be
made again). Repeating the request while it runs returns the same
operation; different parameters while it runs are a 409.
Авторизация
apiToken StackMoreLayers API token. Send as
Authorization: Bearer sml_pat_live_<prefix>.<secret>.
In: header
Параметры пути
Stable model identifier.
1 <= length <= 255Immutable model version identifier.
1 <= length <= 255Заголовки
Opaque client-generated key. A retry with the same key and body returns the original result instead of repeating the effect.
^[!-~]+$8 <= length <= 128Тело запроса
application/json
Типы TypeScript
Use the request body type in TypeScript.
Ответ
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/models/string/versions/string/publish/" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "model_id": "string", "model_version_id": "string", "status": "publishing", "error_code": "string", "retryable": true, "visibility": "private", "model_alias": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z"}