Track By Number
curl --request GET \
--url https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}import requests
url = "https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}', 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/v1/tapes/{tape_id}/tracks/{track_number}",
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/v1/tapes/{tape_id}/tracks/{track_number}"
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/v1/tapes/{tape_id}/tracks/{track_number}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}")
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
Track By Number
Fetch a track’s catalog record by its tape and position.
GET
/
v1
/
tapes
/
{tape_id}
/
tracks
/
{track_number}
Track By Number
curl --request GET \
--url https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}import requests
url = "https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}', 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/v1/tapes/{tape_id}/tracks/{track_number}",
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/v1/tapes/{tape_id}/tracks/{track_number}"
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/v1/tapes/{tape_id}/tracks/{track_number}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/tapes/{tape_id}/tracks/{track_number}")
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_bodyResolves a track by position: give it a tape and a track number, get the same catalog record that track metadata returns by address.
Track numbers are positions in the tape’s Merkle tree, assigned in write order and never reused. That makes them a stable way to walk a tape from front to back: start at zero, count up, and every number below the tape’s track count resolves to exactly one record. It’s the natural endpoint for indexers and backup tools that process a tape in order and don’t want to collect addresses first.
The response arrives in the SDK’s binary encoding, so use an SDK method rather than
curl (conventions).
From Rust, get_track_by_number resolves the same record from chain state (Rust SDK).