List model versions
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/model-versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/svc/v1/model-versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{controlPlaneURL}/api/svc/v1/model-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{controlPlaneURL}/api/svc/v1/model-versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{controlPlaneURL}/api/svc/v1/model-versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{controlPlaneURL}/api/svc/v1/model-versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/svc/v1/model-versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"manifest": {
"metadata": {},
"type": "model-version",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"step": 0,
"name": "<string>",
"ml_repo": "<string>",
"version": 2,
"description": "<string>",
"version_alias": "<string>",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": null,
"base_model": null
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"run_id": "<string>"
},
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"ml_repo_id": "<string>",
"model_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_code_snippet": "<string>",
"tags": [],
"metrics": [
{
"key": "<string>",
"value": 123,
"timestamp": 123,
"step": 123
}
],
"deployable": false
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Models
List model versions
List model versions with optional filtering by tag, FQN, model ID, ML Repo, name, version, run IDs, or run steps.
GET
/
api
/
svc
/
v1
/
model-versions
List model versions
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/model-versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/svc/v1/model-versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{controlPlaneURL}/api/svc/v1/model-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{controlPlaneURL}/api/svc/v1/model-versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{controlPlaneURL}/api/svc/v1/model-versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{controlPlaneURL}/api/svc/v1/model-versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/svc/v1/model-versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"manifest": {
"metadata": {},
"type": "model-version",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"step": 0,
"name": "<string>",
"ml_repo": "<string>",
"version": 2,
"description": "<string>",
"version_alias": "<string>",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": null,
"base_model": null
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"run_id": "<string>"
},
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"ml_repo_id": "<string>",
"model_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_code_snippet": "<string>",
"tags": [],
"metrics": [
{
"key": "<string>",
"value": 123,
"timestamp": 123,
"step": 123
}
],
"deployable": false
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of items per page
Required range:
1 <= x <= 1000Example:
10
Number of items to skip
Required range:
x >= 0Example:
0
Filter model versions by tag.
Filter model versions by Fully Qualified Name.
Filter model versions by model identifier.
Filter model versions by ML Repo identifier.
Filter model versions by name.
Version number (positive integer) to filter by.
Filter model versions by associated run identifiers.
Filter model versions by associated run steps.
Whether to include internal metadata in the response.
Was this page helpful?