Get Track
curl --request GET \
--url https://api.example.com/track/{track_id}import requests
url = "https://api.example.com/track/{track_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/track/{track_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://api.example.com/track/{track_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/track/{track_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/track/{track_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/track/{track_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyTracks
Get Track
Fetch a single track’s decoded bytes by its address.
GET
/
track
/
{track_id}
Get Track
curl --request GET \
--url https://api.example.com/track/{track_id}import requests
url = "https://api.example.com/track/{track_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/track/{track_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://api.example.com/track/{track_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/track/{track_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/track/{track_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/track/{track_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyFetches exactly the addressed track’s own bytes.
The difference from get object: this endpoint does not follow stream manifests. Ask it for a manifest track and you get the manifest itself; ask for a segment track and you get that segment. Use it when you want the raw pieces rather than the assembled payload.
Response headers
| Header | Value |
|---|---|
Content-Length | the track’s size |
ETag | the track’s on-chain commitment |
Cache-Control | immutable; a track-addressed URL serves one possible payload |
Errors
The endpoint-specific case:400 when the track isn’t certified yet. Everything else follows the shared conventions, and the endpoint is metered per IP (rate limits).
Example
curl -sI "$TAPE_GATEWAY/track/7f3kD9mQxYz2pW8vN4cRtE5uH6bJamd9GvKq2rTeUWXs"
Response
HTTP/2 200
content-length: 4194304
etag: "HxbTgzim3nRPhWSyBEUvvteNRWLbrAxV3rDJyoW4mZ5J"
cache-control: public, max-age=31536000, immutable