Get task output preimage
curl --request GET \
--url https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimageimport requests
url = "https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage', 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://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage",
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://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage"
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://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage")
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_body{
"outputPreimage": [
"0xcc",
"0x1572afe6949fdf51cb3e0856216670ae9ee160ee",
"0x752c60",
"0xcb",
"0x711babb04ceccaf36db38bd0dd3172f1c27d1511",
"0x752c61"
],
"taskId": "01J3Z3K2P4W6M8Q0A1B2C3D4E5"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}tasks
Get task output preimage
Retrieves the output tree preimage for a specific task. The preimage contains the raw output data that hashes to the output tree root. This endpoint does not require authentication.
GET
/
tasks
/
{uuid}
/
output_preimage
Get task output preimage
curl --request GET \
--url https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimageimport requests
url = "https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage', 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://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage",
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://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage"
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://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.hdp.api.herodotus.cloud/tasks/{uuid}/output_preimage")
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_body{
"outputPreimage": [
"0xcc",
"0x1572afe6949fdf51cb3e0856216670ae9ee160ee",
"0x752c60",
"0xcb",
"0x711babb04ceccaf36db38bd0dd3172f1c27d1511",
"0x752c61"
],
"taskId": "01J3Z3K2P4W6M8Q0A1B2C3D4E5"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}Was this page helpful?
⌘I

