Search documentation
karat

+

K

User Documentation ↗
Version 2.0

List Model Versions

GET/api/v2/models/{modelRid}/versions
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Lists all Model Versions for a given Model.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:models-read.

Path parameters

modelRid
string

The Resource Identifier (RID) of a Model.

Query parameters

pageSize
integer
optional

The page size to use for the endpoint.

pageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request.

preview
boolean
optional

Enables the use of preview functionality.

Response body

ListModelVersionsResponse
object
Hide child attributes

Hide child attributes

data
list<ModelVersion>
optional
Show child attributes

Show child attributes

nextPageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request.

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/models/ri.models.main.model.f351c142-0e4c-4b12-adc2-6e1539737ae9/versions?preview=true"

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 { "data": [ { "backingRepositories": [ "ri.stemma.main.repository.a1b2c3d4-e5f6-7890-abcd-ef1234567890" ], "condaRequirements": [ "numpy==1.24.0", "pandas==2.0.0" ], "modelApi": { "inputs": [ { "name": "input_df", "required": true, "type": "tabular", "columns": [ { "name": "feature_1", "required": true, "dataType": { "type": "double" } }, { "name": "feature_2", "required": true, "dataType": { "type": "integer" } } ], "format": "PANDAS" } ], "outputs": [ { "name": "output_df", "required": true, "type": "tabular", "columns": [ { "name": "prediction", "required": true, "dataType": { "type": "double" } } ], "format": "SPARK" } ] }, "rid": "ri.models.main.model-version.adf94926-c3ac-41ea-beb2-4946699d08ee" } ], "nextPageToken": "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" }