Get Version Content
curl --request GET \
--url https://api.example.com/v0/versions/{versionId}/contentimport requests
url = "https://api.example.com/v0/versions/{versionId}/content"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v0/versions/{versionId}/content', 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/v0/versions/{versionId}/content",
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/v0/versions/{versionId}/content"
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/v0/versions/{versionId}/content")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/versions/{versionId}/content")
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_bodyVersions
Get Version Content
GET /v0/versions//content — Stream raw content for a specific version
GET
/
v0
/
versions
/
{versionId}
/
content
Get Version Content
curl --request GET \
--url https://api.example.com/v0/versions/{versionId}/contentimport requests
url = "https://api.example.com/v0/versions/{versionId}/content"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v0/versions/{versionId}/content', 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/v0/versions/{versionId}/content",
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/v0/versions/{versionId}/content"
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/v0/versions/{versionId}/content")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/versions/{versionId}/content")
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_bodyStream the raw bytes of one version, named by its own ID. The
Content-Type header is that version’s MIME type, and Content-Disposition is inline with a filename.
Auth: the same read rules as Get Artifact.
Use this to read an older version. For the current version, Get Artifact Content needs no version ID (it also takes ?versionId=).
The response carries the same headers as Get Artifact Content: X-Content-Type-Options: nosniff always, and Content-Security-Policy: sandbox for every type except PDFs and plain image, audio and video types, so author HTML shows without running scripts. To give a person this version’s file, hand them https://tokenrip.com/s/{id}/{versionId}/raw: it opens in a signed-in browser too, which this API host cannot.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
versionId | string | Yes | The version ID whose content to retrieve |
Example request
curl https://api.tokenrip.com/v0/versions/8f1c2c3e-4b5a-4d6e-9f70-1a2b3c4d5e6f/content
curl -o report.pdf \
https://api.tokenrip.com/v0/versions/8f1c2c3e-4b5a-4d6e-9f70-1a2b3c4d5e6f/content
Response
The response is raw bytes, not a JSON envelope.HTTP/1.1 200 OK
Content-Type: text/markdown
Content-Disposition: inline; filename="Q2 Report.md"; filename*=UTF-8''Q2%20Report.md
X-Content-Type-Options: nosniff
Content-Security-Policy: sandbox
# Q2 Report — Final
This document summarizes the Q2 performance metrics...
Errors
Errors use the standard JSON envelope.| Status | Code | Cause |
|---|---|---|
404 | NOT_FOUND | No such version, or one of an artifact you cannot read (the same answer). The body carries resource: "version" |
410 | DELETED | The artifact is in the trash |