Get ML Repo
curl --request GET \
--url https://{controlPlaneURL}/api/ml/v1/ml-repos/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/ml/v1/ml-repos/{id}"
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/ml/v1/ml-repos/{id}', 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/ml/v1/ml-repos/{id}",
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/ml/v1/ml-repos/{id}"
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/ml/v1/ml-repos/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/ml/v1/ml-repos/{id}")
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": {
"tenant_name": "truefoundry",
"manifest": {
"name": "devtest-finetuning-test-420",
"type": "ml-repo",
"description": "This is a test MLRepo for fine-tuning experiments.",
"collaborators": [
{
"role_id": "mlf-project-admin",
"subject": "user:user1@example.com"
},
{
"role_id": "mlf-project-admin",
"subject": "team:teamb"
}
],
"storage_integration_fqn": "truefoundry:aws:aws-4:blob-storage:devtest-test-1"
},
"created_by_subject": {
"subjectId": "cm1xxxp",
"subjectSlug": "test-user@truefoundry.com",
"subjectType": "user",
"subjectDisplayName": "Test User"
},
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"id": "420",
"num_runs": 10,
"artifact_type_counts": {},
"datasets_count": 10
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}MLRepos
Get ML Repo
Get an ML Repo by its ID.
GET
/
api
/
ml
/
v1
/
ml-repos
/
{id}
Get ML Repo
curl --request GET \
--url https://{controlPlaneURL}/api/ml/v1/ml-repos/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{controlPlaneURL}/api/ml/v1/ml-repos/{id}"
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/ml/v1/ml-repos/{id}', 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/ml/v1/ml-repos/{id}",
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/ml/v1/ml-repos/{id}"
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/ml/v1/ml-repos/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{controlPlaneURL}/api/ml/v1/ml-repos/{id}")
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": {
"tenant_name": "truefoundry",
"manifest": {
"name": "devtest-finetuning-test-420",
"type": "ml-repo",
"description": "This is a test MLRepo for fine-tuning experiments.",
"collaborators": [
{
"role_id": "mlf-project-admin",
"subject": "user:user1@example.com"
},
{
"role_id": "mlf-project-admin",
"subject": "team:teamb"
}
],
"storage_integration_fqn": "truefoundry:aws:aws-4:blob-storage:devtest-test-1"
},
"created_by_subject": {
"subjectId": "cm1xxxp",
"subjectSlug": "test-user@truefoundry.com",
"subjectType": "user",
"subjectDisplayName": "Test User"
},
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"id": "420",
"num_runs": 10,
"artifact_type_counts": {},
"datasets_count": 10
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Was this page helpful?
⌘I