blob: 5b3dc6cfb86957dacac4176b44f6c7e8a66fc732 [file] [log] [blame]
---
id: get-model-version-by-alias
title: "Get model version by alias"
description: "Get model version by alias"
sidebar_label: "Get model version by alias"
hide_title: true
hide_table_of_contents: true
api: eJztWFtv2zYU/isEnzZMkRR3A1a9pV3WZZe2SJwVWOYHRjy22EikRlKODUP/fTgkdbHlJG3WvdUwYJniuV++Q+6oZStDsxtaKQ4lXURU1aCZFUpecJrRFdg/8M2foI1Q8tX2rBTM0IhqMLWSBgzNdnSWpvjDweRa1EhMMzovgHS7iFoSJ4GsPSOibj9CbmlEcyUtSIv0rK5LkTvhyVryeKXZWlghVbw+/e6jQa47avICKoZPdlsDzWjPqdaouxVep1xxGO0S0sIKNI3oUumKWb/0YkajA7WvLLONIUiOWtuRFTSiIJuKZjfpoo28y4Jjjumj4Z9GaODo3kYLGtFgPI0oa7iw6O59pXHbwMlYLeRqoiE6ttGi027Pr7QdpBwzfsqpD8iIG3JhGGivVeDCtGbbozzC3uMaRVQ2ZcluS6CZ1Q1EVFiozNTOtsVsqKqQDU87IWz+NLHtoa8PwzXlP+z/VMs4LFlTovroQc4FcmPl+2OCR1b7bHhSpzPcRoT0GYxBWypNGHnT1Qlmqmp0DvG0HDQwq/QnZpcBTe4LRRwV8K4KHG9MDr8+FxUcY9hXGGcWTizuOiYFX+xxJvfMdCJRSskMdh+xFPC5iiMpRgtpp+qPGPP/xYg98S7EVlhMEx/DvZVxf6UtvoENq+rSx829vewaULaja1Y2MDS4dNqHXBOhBV+aLElqZovEqsTX9ag5pKMSv/GPpzSszbAz9aVI54UwRBjCuoqbZNcdbE9p5nVDLnewnXX/Z3Sc4X0eUowV7h3nEp2ls9OTFL/zNM3c9y96mAk96TSOxxm04RPR79Pvp0j1Vlnys2okJyfExZTpFdgDwOIKDJHKEtgIY+Mvilz76vx69e4tAa2VJjXblopxosE2WgInQhI2oOq9sAVZNtoWoAkHy0RpiJIuHx2DAxSqwBi2wkR2GkQ+hyYo9CB0VkKKCg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UHFS/Pr+bk7P0FHtZEDuEMG3rWmRtCySxOaRRquvPc/f19N6MqvUoCrUl+v3h9/vbq/GQWp3Fhq3Lvvoum8cv4dBLIn3C+ADMumXy4PsHVpdDGHt6ETY2I/5a+mIytmBwZ8ijm7inTO9TCxiZ1yYRj6YzfhS560wMykmcjoO0aKS4PYBh6KS72gOXbqSMPoNId9iOaec0WXb+5oTvXMa912ba4/E8DGotvMfQ9V4pcuKGc02zJSnMIKLthfqbfXAbo+ZY8MjccdUU3pMmta7vuWET9lcJ4VMGi/yL6DH58hjod8RfTpg/gM5QJtF9Mly5znhOmMDH/B00eHU2eoZJP+hYv7gtgHO+Rbnbh3VmOo/aI6unj394M9OZ8Ttv2X8mpviI=
sidebar_class_name: "get api-method"
info_path: docs/api/rest/gravitino-rest-api
custom_edit_url: null
---
import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"Get model version by alias"}
>
</Heading>
<MethodEndpoint
method={"get"}
path={"/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/models/{model}/aliases/{alias}"}
>
</MethodEndpoint>
Get model version by alias
<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>
<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Path Parameters
</h3>
</summary><div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"name":"metalake","in":"path","description":"The name of the metalake","required":true,"schema":{"type":"string"}}}
>
</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"catalog","in":"path","description":"The name of the catalog","required":true,"schema":{"type":"string"}}}
>
</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"schema","in":"path","description":"The name of the schema","required":true,"schema":{"type":"string"}}}
>
</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"model","in":"path","description":"The name of the model","required":true,"schema":{"type":"string"}}}
>
</ParamsItem><ParamsItem
className={"paramsItem"}
param={{"name":"alias","in":"path","required":true,"description":"The alias of the model version","schema":{"type":"string"}}}
>
</ParamsItem>
</ul>
</div>
</details><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>
The response of model version object
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/vnd.gravitino.v1+json"}
value={"application/vnd.gravitino.v1+json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"int32"}
qualifierMessage={"**Possible values:** [`0`]"}
schema={{"type":"integer","format":"int32","description":"Status code of the response","enum":[0]}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
modelVersion
</strong><span
className={"openapi-schema__name"}
>
object
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"uri"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"The uri of the model version"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"version"}
required={true}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer","description":"The version of the model"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"aliases"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","description":"The aliases of the model version","nullable":true,"items":{"type":"string"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"comment"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"The comment of the model version","nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
properties
</strong><span
className={"openapi-schema__name"}
>
object
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__nullable"}
>
nullable
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
The properties of the model version
</div><SchemaItem
name={"property name*"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
audit
</strong><span
className={"openapi-schema__name"}
>
object
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Audit information for a Gravitino resource.
</div><SchemaItem
collapsible={false}
name={"creator"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"The user who created the resource"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"createTime"}
required={false}
schemaName={"date-time"}
qualifierMessage={undefined}
schema={{"type":"string","format":"date-time","description":"The time the resource was created"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"lastModifier"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"The user who last modified the resource"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"lastModifiedTime"}
required={false}
schemaName={"date-time"}
qualifierMessage={undefined}
schema={{"type":"string","format":"date-time","description":"The time the resource was last modified"}}
>
</SchemaItem>
</div>
</details>
</SchemaItem>
</div>
</details>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"code\": 0,\n \"modelVersion\": {\n \"uri\": \"string\",\n \"version\": 0,\n \"aliases\": [\n \"string\"\n ],\n \"comment\": \"string\",\n \"properties\": {},\n \"audit\": {\n \"creator\": \"string\",\n \"createTime\": \"2024-07-29T15:51:28.071Z\",\n \"lastModifier\": \"string\",\n \"lastModifiedTime\": \"2024-07-29T15:51:28.071Z\"\n }\n }\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem><TabItem
label={"ModelResponse"}
value={"ModelResponse"}
>
<ResponseSamples
responseExample={"{\n \"code\": 0,\n \"modelVersion\": {\n \"uri\": \"hdfs://path/to/model\",\n \"version\": 0,\n \"aliases\": [\n \"alias1\",\n \"alias2\"\n ],\n \"comment\": \"This is a comment\",\n \"properties\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n },\n \"audit\": {\n \"creator\": \"user1\",\n \"createTime\": \"2021-01-01T00:00:00Z\",\n \"lastModifier\": \"user1\",\n \"lastModifiedTime\": \"2021-01-01T00:00:00Z\"\n }\n }\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"404"}
value={"404"}
>
<div>
Not Found - The target model version does not exist.
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/vnd.gravitino.v1+json"}
value={"application/vnd.gravitino.v1+json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"code"}
required={true}
schemaName={"integer"}
qualifierMessage={"**Possible values:** `>= 1000` and `<= 1100`"}
schema={{"type":"integer","minimum":1000,"maximum":1100,"description":"HTTP response code","example":1002}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"type"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Internal type definition of the error"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"message"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"A human-readable message"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"stack"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"}}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"code\": 1002,\n \"type\": \"string\",\n \"message\": \"string\",\n \"stack\": [\n \"string\"\n ]\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem><TabItem
label={"NoSuchModelVersionException"}
value={"NoSuchModelVersionException"}
>
<ResponseSamples
responseExample={"{\n \"code\": 1003,\n \"type\": \"NoSuchModelVersionException\",\n \"message\": \"Model version does not exist\",\n \"stack\": [\n \"org.apache.gravitino.exceptions.NoSuchModelVersionException: Model version does not exist\"\n ]\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"5xx"}
value={"5xx"}
>
<div>
A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes.
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/vnd.gravitino.v1+json"}
value={"application/vnd.gravitino.v1+json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"code"}
required={true}
schemaName={"integer"}
qualifierMessage={"**Possible values:** `>= 1000` and `<= 1100`"}
schema={{"type":"integer","minimum":1000,"maximum":1100,"description":"HTTP response code","example":1002}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"type"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Internal type definition of the error"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"message"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"A human-readable message"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"stack"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"}}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"code\": 1002,\n \"type\": \"string\",\n \"message\": \"string\",\n \"stack\": [\n \"string\"\n ]\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem><TabItem
label={"Example"}
value={"Example"}
>
<ResponseSamples
responseExample={"{\n \"code\": 1002,\n \"type\": \"RuntimeException\",\n \"message\": \"Internal Server Error\",\n \"stack\": [\n \"java.lang.RuntimeException: Internal Server Error\"\n ]\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
</ApiTabs>
</div>
</div>