Skip to main content
GET
/
api
/
ml
/
v1
/
artifacts
List artifacts
curl --request GET \
  --url https://{controlPlaneURL}/api/ml/v1/artifacts \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{controlPlaneURL}/api/ml/v1/artifacts"

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/artifacts', 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/artifacts",
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/artifacts"

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/artifacts")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{controlPlaneURL}/api/ml/v1/artifacts")

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": [
    {
      "id": "<string>",
      "ml_repo_id": "<string>",
      "name": "<string>",
      "fqn": "<string>",
      "created_by_subject": {
        "subjectId": "<string>",
        "subjectSlug": "<string>",
        "subjectDisplayName": "<string>",
        "subjectPatName": "<string>",
        "subjectControllerName": "<string>",
        "subjectExternalIdentitySlug": "<string>"
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "latest_version": {
        "id": "<string>",
        "fqn": "<string>",
        "created_by_subject": {
          "subjectId": "<string>",
          "subjectSlug": "<string>",
          "subjectDisplayName": "<string>",
          "subjectPatName": "<string>",
          "subjectControllerName": "<string>",
          "subjectExternalIdentitySlug": "<string>"
        },
        "ml_repo_id": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "manifest": {
          "name": "<string>",
          "metadata": {},
          "ml_repo": "<string>",
          "source": {
            "type": "truefoundry",
            "uri": "<string>"
          },
          "version": 2,
          "type": "model-version",
          "description": "<string>",
          "version_alias": "<string>",
          "framework": {
            "type": "transformers",
            "library_name": "transformers",
            "pipeline_tag": "<string>",
            "base_model": "<string>"
          },
          "environment": {
            "python_version": "<string>",
            "pip_packages": [
              "<string>"
            ]
          },
          "step": 0,
          "run_id": "<string>"
        }
      },
      "run_steps": [
        123
      ]
    }
  ],
  "pagination": {
    "total": 100,
    "offset": 0,
    "limit": 10
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fqn
string

Fully qualified name to filter artifacts by (format: '{artifact_type}:{tenant_name}/{ml_repo_name}/{artifact_name}')

ml_repo_id
string

ID of the ML Repo to filter artifacts by

name
string

Name of the artifact to filter by

offset
integer
default:0

Number of artifacts to skip for pagination

limit
integer

Maximum number of artifacts to return

run_id
string

ID of the run to filter artifacts by

include_empty_artifacts
boolean
default:true

Whether to include artifacts that have no versions

Response

List of artifacts matching the query with pagination information

data
Artifact · object[]
required

List of artifacts matching the query

pagination
Pagination · object
required

Pagination information including total count, offset, and limit