Get an artifact
import requests
url = "https://app.strandai.com/api/v1/artifacts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://app.strandai.com/api/v1/artifacts/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.strandai.com/api/v1/artifacts/{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://app.strandai.com/api/v1/artifacts/{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://app.strandai.com/api/v1/artifacts/{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://app.strandai.com/api/v1/artifacts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.strandai.com/api/v1/artifacts/{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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"sample_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"job_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"author_type": "user",
"author_id": "<string>",
"entry_html_path": "index.html",
"size_bytes": 16777216,
"sha256": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}Endpoints
Get an artifact
Read report metadata, provenance and its organization-gated in-app URL.
GET
/
artifacts
/
{id}
Get an artifact
import requests
url = "https://app.strandai.com/api/v1/artifacts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://app.strandai.com/api/v1/artifacts/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.strandai.com/api/v1/artifacts/{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://app.strandai.com/api/v1/artifacts/{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://app.strandai.com/api/v1/artifacts/{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://app.strandai.com/api/v1/artifacts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.strandai.com/api/v1/artifacts/{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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"sample_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"job_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"author_type": "user",
"author_id": "<string>",
"entry_html_path": "index.html",
"size_bytes": 16777216,
"sha256": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}Requires
MCP
samples:read and results:read. Credit-free. Supply an artifact UUID.
The response contains id, org_id, title, description, sample_ids,
job_ids, author_type (user or agent), author_id,
entry_html_path (index.html), size_bytes, sha256, created_at and
url. The URL is a relative in-app path such as /artifacts/<uuid> and
requires organization login. HTML and bundled asset bytes are not returned.
artifact = client.artifacts.get(artifact_id)
print(artifact["description"], artifact["url"])
get_artifact takes artifact_id. Missing artifacts and IDs belonging to
another organization return 404. Responses are private and not cached.Authorizations
ApiKeyOAuth2
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Artifact metadata
Available options:
user, agent Available options:
index.html Required range:
1 <= x <= 33554432Pattern:
^[a-f0-9]{64}$Org-gated relative in-app URL /artifacts/{id}, not a public link.
Was this page helpful?