curl --request GET \
--url http://127.0.0.1/v1/jobs/{id}/artifacts/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1/v1/jobs/{id}/artifacts/{name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1/v1/jobs/{id}/artifacts/{name}', 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 => "http://127.0.0.1/v1/jobs/{id}/artifacts/{name}",
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 := "http://127.0.0.1/v1/jobs/{id}/artifacts/{name}"
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("http://127.0.0.1/v1/jobs/{id}/artifacts/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1/v1/jobs/{id}/artifacts/{name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Stream one artifact's bytes, verified against its journaled SHA-256
{name} is an entry’s name from GET /v1/jobs//artifacts, never a filesystem path. Every name contains / (file/out/report.pdf, agent_image/1.png): send it with its / literal or percent-encoded (%2F), as one path parameter. The rest of the path is percent-decoded once and matched exactly against the manifest’s names; an escape that is not two hexadecimal digits, bytes that are not UTF-8 or NUL match no entry. The server opens the recorded place below the project root it holds, refusing a symbolic link at any component, and reads every byte against the recorded size and SHA-256 before the response starts (409 artifact_changed on a mismatch), keeping the SHA-256 of each 256 KiB chunk. While the bytes stream, each chunk is read again and sent only if it hashes to the digest kept for it: every byte that leaves is a byte of the recorded file, and a file changed during the stream ends it before its Content-Length. A stream also ends short when the server stops or cannot read the file: retry a short body, and a file that really changed then answers 409 artifact_changed. The bound is max_artifact_bytes; a larger artifact stays listed and is refused 403. At most 4 journal verifications and pre-download hash passes run at once (artifact_capacity otherwise); a stream holds no slot once its bytes start, is bounded by the connection limit, and is not bounded by the request deadline.
curl --request GET \
--url http://127.0.0.1/v1/jobs/{id}/artifacts/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1/v1/jobs/{id}/artifacts/{name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1/v1/jobs/{id}/artifacts/{name}', 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 => "http://127.0.0.1/v1/jobs/{id}/artifacts/{name}",
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 := "http://127.0.0.1/v1/jobs/{id}/artifacts/{name}"
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("http://127.0.0.1/v1/jobs/{id}/artifacts/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1/v1/jobs/{id}/artifacts/{name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Exactly one Authorization: Bearer value from the token file
Path Parameters
An entry's manifest name; its / may be sent literally or as %2F (decoded once, matched exactly)
1Response
The recorded bytes
The artifact's bytes; Content-Type is the manifest's mime
Was this page helpful?