Get a model version or model

get/models/{modelId}/versions/{versionId}
Internal-Use Only

Returns the model version or the model that is associated with the specified model ID and version ID. If the model ID and version ID are the same, the model is returned.

Note: You can also use @{modelVersionName} after the forward slash (/) to specify the name of a model version instead of the model version ID.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2023-08-07T14:40:58.979000Z",
3 "createdBy": "sasdemo",
4 "modifiedTimeStamp": "2023-08-07T16:40:08.568000Z",
5 "modifiedBy": "sasdemo",
6 "id": "01508e8d-a6e2-40b9-b955-58f48e1b1604",
7 "name": "QS_Reg1",
8 "description": "Logistic Regression",
9 "role": "champion",
10 "scoreCodeType": "dataStep",
11 "algorithm": "logisticreg",
12 "function": "classification",
13 "modeler": "sasdemo",
14 "modelType": "dataStep",
15 "trainTable": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/HMEQ_TRAIN",
16 "eventProbVar": "EM_EVENTPROBABILITY",
17 "targetVariable": "BAD",
18 "targetEvent": "1",
19 "targetLevel": "binary",
20 "tool": "Model Studio",
21 "toolVersion": 8.3,
22 "publishTimeStamp": 1691426404971,
23 "externalModelId": "407fbf89-7085-49c3-811a-7f5d912e4676",
24 "indirectFolderId": "f26f68e5-09ff-4880-8e3e-5c84c31a67b1",
25 "repositoryId": "8153f0d3-8b87-4415-b66d-537c70e3600b",
26 "projectId": "b38d3663-0187-4690-84f9-56a973e0e6b1",
27 "projectVersionId": "d8c79ea9-5ed8-46a0-b1d7-d9cfe0b20188",
28 "immutable": false,
29 "folderRef": "/folders/folders/a354fb9f-6dc9-4844-93ae-30aa9dd7e10c",
30 "location": "/Model Repositories/Public/publish delete/Version 1",
31 "modelVersionName": "12.0",
32 "projectName": "publish delete",
33 "projectVersionName": "Version 1",
34 "projectVersionNum": 1,
35 "files": [
36 {
37 "creationTimeStamp": "2023-08-07T14:40:59.519645Z",
38 "createdBy": "anonymous",
39 "modifiedTimeStamp": "2023-08-07T14:40:59.519646Z",
40 "modifiedBy": "anonymous",
41 "version": 2,
42 "id": "37cd93c8-b7a8-4c75-b920-f5d27486fac9",
43 "name": "ModelProperties.json",
44 "fileUri": "/files/files/0138bd91-f905-4100-836d-32a4090ec45c",
45 "modelId": "01508e8d-a6e2-40b9-b955-58f48e1b1604",
46 "links": [
47 {
48 "method": "GET",
49 "rel": "UP",
50 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
51 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
52 "itemType": "application/vnd.sas.models.model.content"
53 },
54 {
55 "method": "GET",
56 "rel": "self",
57 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
58 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
59 "type": "application/vnd.sas.models.model.content"
60 },
61 {
62 "method": "GET",
63 "rel": "content",
64 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9/content",
65 "type": "application/octet-stream"
66 },
67 {
68 "method": "POST",
69 "rel": "create",
70 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
71 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
72 "type": "multipart/form-data"
73 },
74 {
75 "method": "PUT",
76 "rel": "update",
77 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
78 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
79 "type": "application/vnd.sas.models.model.content"
80 },
81 {
82 "method": "PUT",
83 "rel": "updateContentMultipart",
84 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
85 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
86 "type": "application/vnd.sas.models.model.content"
87 },
88 {
89 "method": "DELETE",
90 "rel": "delete",
91 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9",
92 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents/37cd93c8-b7a8-4c75-b920-f5d27486fac9"
93 }
94 ]
95 }
96 ],
97 "inputVariables": [
98 {
99 "creationTimeStamp": "2023-08-07T14:41:01.946216Z",
100 "createdBy": "anonymous",
101 "modifiedTimeStamp": "2023-08-07T14:43:36.218739Z",
102 "name": "CLNO",
103 "description": "",
104 "role": "input",
105 "type": "decimal",
106 "level": "interval",
107 "format": "",
108 "aggregation": "",
109 "length": 8,
110 "id": "3ddb478f-f900-4c9f-bfa9-941d89e15e42",
111 "holderId": "01508e8d-a6e2-40b9-b955-58f48e1b1604",
112 "links": [
113 {
114 "method": "GET",
115 "rel": "up",
116 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
117 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables",
118 "type": "application/vnd.sas.collection"
119 },
120 {
121 "method": "GET",
122 "rel": "self",
123 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
124 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
125 "type": "application/vnd.sas.models.model.variable"
126 },
127 {
128 "method": "PUT",
129 "rel": "update",
130 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
131 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
132 "type": "application/vnd.sas.models.model.variable"
133 },
134 {
135 "method": "DELETE",
136 "rel": "delete",
137 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
138 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3ddb478f-f900-4c9f-bfa9-941d89e15e42",
139 "type": "application/vnd.sas.models.model.variable"
140 }
141 ]
142 }
143 ],
144 "outputVariables": [
145 {
146 "creationTimeStamp": "2023-08-07T14:41:02.431147Z",
147 "createdBy": "anonymous",
148 "modifiedTimeStamp": "2023-08-07T14:43:37.427800Z",
149 "name": "EM_CLASSIFICATION",
150 "description": "",
151 "role": "output",
152 "type": "string",
153 "level": "",
154 "format": "",
155 "aggregation": "",
156 "length": 1,
157 "id": "3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
158 "holderId": "01508e8d-a6e2-40b9-b955-58f48e1b1604",
159 "links": [
160 {
161 "method": "GET",
162 "rel": "up",
163 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
164 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables",
165 "type": "application/vnd.sas.collection"
166 },
167 {
168 "method": "GET",
169 "rel": "self",
170 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
171 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
172 "type": "application/vnd.sas.models.model.variable"
173 },
174 {
175 "method": "PUT",
176 "rel": "update",
177 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
178 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
179 "type": "application/vnd.sas.models.model.variable"
180 },
181 {
182 "method": "DELETE",
183 "rel": "delete",
184 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
185 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables/3c42ee3f-fdf7-46fa-a1b1-9b59a0080401",
186 "type": "application/vnd.sas.models.model.variable"
187 }
188 ]
189 }
190 ],
191 "modelVersions": [
192 {
193 "creationTimeStamp": "2023-08-07T14:43:41.850000Z",
194 "createdBy": "sasdemo",
195 "modifiedTimeStamp": "2023-08-07T14:43:41.850000Z",
196 "modifiedBy": "sasdemo",
197 "id": "e660c5f8-6ca4-4aae-a3bb-c78042708a92",
198 "name": "QS_Reg1",
199 "description": "Logistic Regression",
200 "role": "champion",
201 "scoreCodeType": "dataStep",
202 "algorithm": "logisticreg",
203 "function": "classification",
204 "modeler": "sasdemo",
205 "modelType": "dataStep",
206 "trainTable": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Public/tables/HMEQ_TRAIN",
207 "eventProbVar": "EM_EVENTPROBABILITY",
208 "targetVariable": "BAD",
209 "targetEvent": "1",
210 "targetLevel": "BINARY",
211 "tool": "Model Studio",
212 "toolVersion": 8.3,
213 "externalModelId": "407fbf89-7085-49c3-811a-7f5d912e4676",
214 "immutable": true,
215 "folderRef": "/folders/folders/a354fb9f-6dc9-4844-93ae-30aa9dd7e10c",
216 "modelVersionName": "1.0",
217 "inputVariables": null,
218 "outputVariables": null,
219 "modelVersions": null,
220 "modelLocks": null,
221 "globalTags": null,
222 "links": [
223 {
224 "method": "GET",
225 "rel": "up",
226 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions",
227 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions",
228 "type": "application/vnd.sas.collection",
229 "itemType": "application/vnd.sas.models.model.version"
230 },
231 {
232 "method": "GET",
233 "rel": "self",
234 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions/e660c5f8-6ca4-4aae-a3bb-c78042708a92",
235 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions/e660c5f8-6ca4-4aae-a3bb-c78042708a92",
236 "type": "application/vnd.sas.models.model.version"
237 },
238 {
239 "method": "GET",
240 "rel": "contents",
241 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions/e660c5f8-6ca4-4aae-a3bb-c78042708a92/contents",
242 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions/e660c5f8-6ca4-4aae-a3bb-c78042708a92/contents",
243 "type": "application/vnd.sas.collection",
244 "itemType": "application/vnd.sas.models.model.content"
245 }
246 ],
247 "version": 0,
248 "modelLastModifiedBy": "sasdemo",
249 "modelLastModifiedTimeStamp": "2023-08-07T14:43:41.681738Z",
250 "modelCreatedBy": "sasdemo",
251 "modelCreationTimeStamp": "2023-08-07T14:40:58.979328Z"
252 }
253 ],
254 "modelLocks": null,
255 "publishedModels": {
256 "modelId": "01508e8d-a6e2-40b9-b955-58f48e1b1604",
257 "projectId": "b38d3663-0187-4690-84f9-56a973e0e6b1",
258 "publishName": "QS_Reg1_pub1",
259 "publishResultUrl": "QS_Reg1_pub1",
260 "destinationName": "maslocal",
261 "destinationType": "microAnalyticService",
262 "state": "success",
263 "masUrl": "/microanalyticScore/modules/qs_reg1_pub1"
264 },
265 "globalTags": null,
266 "links": [
267 {
268 "method": "GET",
269 "rel": "up",
270 "href": "/modelRepository/models",
271 "uri": "/modelRepository/models",
272 "type": "application/vnd.sas.models.model"
273 },
274 {
275 "method": "GET",
276 "rel": "self",
277 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
278 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
279 "type": "application/vnd.sas.models.model"
280 },
281 {
282 "method": "PUT",
283 "rel": "update",
284 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
285 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
286 "type": "application/vnd.sas.models.model",
287 "responseItemType": "application/vnd.sas.models.model"
288 },
289 {
290 "method": "DELETE",
291 "rel": "delete",
292 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604",
293 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604"
294 },
295 {
296 "method": "GET",
297 "rel": "scoreCode",
298 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/code",
299 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/code",
300 "type": "text/plain"
301 },
302 {
303 "method": "GET",
304 "rel": "contents",
305 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents",
306 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/contents",
307 "type": "application/vnd.sas.collection",
308 "itemType": "application/vnd.sas.models.model.content"
309 },
310 {
311 "method": "GET",
312 "rel": "modelVersions",
313 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions",
314 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions",
315 "type": "application/vnd.sas.collection",
316 "responseItemType": "application/vnd.sas.models.model.version"
317 },
318 {
319 "method": "POST",
320 "rel": "addModelVersion",
321 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions",
322 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/modelVersions",
323 "type": "application/vnd.sas.models.model.version"
324 },
325 {
326 "method": "GET",
327 "rel": "variables",
328 "href": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables",
329 "uri": "/modelRepository/models/01508e8d-a6e2-40b9-b955-58f48e1b1604/variables",
330 "type": "application/vnd.sas.collection",
331 "itemType": "application/vnd.sas.models.model.variable"
332 }
333 ],
334 "version": 0,
335 "modelLastModifiedTimeStamp": "0001-01-01T00:00:00Z",
336 "modelCreationTimeStamp": "0001-01-01T00:00:00Z"
337}

Path Parameters

NameTypeRequiredDescription
modelId
string
true

The unique identifier for the model.

versionId
string
true

The unique identifier for the model version.

Responses

StatusMeaningDescription
200OKThe request succeeded. The model version was returned.HeadersSchema
404Not FoundNo model or model version exists at the requested path. The specified model ID or model version ID could not be found.Schema