Publish models

post/publish

Publish a model to a CAS, Hadoop, Teradata, SAS Micro Analytic Service, or a container publishing destination. For more information, see Publishing Models in SAS Model Manager: User's Guide

Request Samples

1

Response Samples

1[
2 {
3 "creationTimeStamp": "2025-04-25T13:53:45.908835Z"
4 },
5 {
6 "createdBy": "sasdemo"
7 },
8 {
9 "modifiedTimeStamp": "2025-04-25T13:53:45.908836Z"
10 },
11 {
12 "modifiedBy": "sasdemo"
13 },
14 {
15 "version": 2
16 },
17 {
18 "id": "ed3d0aea-233a-44a5-97ae-8153a926bf17"
19 },
20 {
21 "name": "QS_Reg1_Nominal"
22 },
23 {
24 "publishName": "QS_Reg1_Nominal"
25 },
26 {
27 "publishType": "container"
28 },
29 {
30 "verified": false
31 },
32 {
33 "principalId": "78286c1c-8ef3-4bfa-93cd-2a4989622ef8"
34 },
35 {
36 "destinationName": "scrAzure"
37 },
38 {
39 "destination": [
40 {
41 "creationTimeStamp": "0001-01-01T00:00:00Z"
42 },
43 {
44 "modifiedTimeStamp": "0001-01-01T00:00:00Z"
45 },
46 {
47 "version": 2
48 }
49 ]
50 },
51 {
52 "codeType": "ds1"
53 },
54 {
55 "analyticStoreUri": []
56 },
57 {
58 "sourceUri": "/modelRepository/models/78286c1c-8ef3-4bfa-93cd-2a4989622ef8/modelVersions/afa96d6a-c4aa-4b3e-be77-11f6163dbe53"
59 },
60 {
61 "projectId": "39f8a892-76ba-4963-ae50-bde0eaf6e4ef"
62 },
63 {
64 "projectVersionId": "c917565a-02d3-4704-abdd-acecb4bded6b"
65 },
66 {
67 "modelId": "78286c1c-8ef3-4bfa-93cd-2a4989622ef8"
68 },
69 {
70 "modelVersionId": "1.0"
71 },
72 {
73 "publishLevel": "model"
74 },
75 {
76 "state": "running"
77 },
78 {
79 "properties": {}
80 },
81 {
82 "errorResponse": {}
83 },
84 {
85 "links": [
86 {
87 "method": "GET",
88 "rel": "up",
89 "href": "/modelPublish/models",
90 "uri": "/modelPublish/models",
91 "type": "application/vnd.sas.collection"
92 },
93 {
94 "method": "GET",
95 "rel": "self",
96 "href": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17",
97 "uri": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17",
98 "type": "application/vnd.sas.models.publishing.publish"
99 },
100 {
101 "method": "DELETE",
102 "rel": "delete",
103 "href": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17",
104 "uri": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17"
105 },
106 {
107 "method": "PUT",
108 "rel": "update",
109 "href": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17",
110 "uri": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17",
111 "type": "application/vnd.sas.models.publishing.publish"
112 },
113 {
114 "method": "GET",
115 "rel": "publishingLog",
116 "href": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17/log",
117 "uri": "/modelPublish/models/ed3d0aea-233a-44a5-97ae-8153a926bf17/log",
118 "type": "application/json"
119 }
120 ]
121 }
122]

Query Parameters

NameTypeRequiredDescription
force
boolean
false

Indicates to publish models and replace previously published models with the same name.

Default:
false
reloadModelTable
boolean
false

Indicates whether to reload the model table for the destination.

Default:
false

Request Body

The representation of a publish request.

Contains information about a publishing model request.

NameTypeRequiredDescription
description
string
false

The description for the published model.

modelContents
array [Publishing Model Content]
true

A list of models.

name
string
true

The published name of a model.

note
string
false

The description for the published model.

destinationName
string
true

The name of the publishing destination.

properties
object
false

Additional properties for the published model.

Here is a list of the additional properties that are supported:

  • gitRemotePath: Indicates the directory path within the Git repository to publish the selected items to.
  • AMLWorkspaceName: Indicates the workspace in the Azure Machine Learning environment to publish the selected items to.
    • containerRegistryName: Indicates the name of the container registry for a local Azure container destination.
skipVersioning
boolean
false

Indicates whether the model version will be incremented when a model is published. This property is supported for 2025.03 and later releases.

tags
array [string]
false

A list of tags associated with the model.

verified
boolean
false

Indicates whether the model is verified.

version
integer
false

The API representation version.

Default:
1

Responses

StatusMeaningDescription
201Created

The models were published successfully.

Schema
400Bad Request

The request was invalid. Errors might of been caused by the model that was published, a snapshot that could not be created, the destination was not specified, or there are no models provided by the "modelContents".

Schema
404Not Found

No model score code exists at the requested path.

Schema