Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Model Version

GET/api/v2/models/{modelRid}/versions/{modelVersionRid}
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.

Retrieves a Model Version by its Resource Identifier (RID).

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.

modelVersionRid
string

The Resource Identifier (RID) of a Model Version.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Response body

ModelVersion
object
Hide child attributes

Hide child attributes

rid
string

The Resource Identifier (RID) of a Model Version.

modelApi
object

The Model API is a specification that describes the inputs and outputs of a machine learning model. It is used to define the interface for the model, including the types of data that can be passed to it and the types of data that it will return.

Show child attributes

Show child attributes

condaRequirements
list<string>
optional
backingRepositories
list<rid>
optional

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/ri.models.main.model-version.adf94926-c3ac-41ea-beb2-4946699d08ee?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 { "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" }

Error responses

Error Name
ModelVersionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given ModelVersion could not be found.
ParametersmodelRid, modelVersionRid