Attest a region
curl --request GET \
--url https://api.zode.dev/v1/regions/{region}/attestation \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zode.dev/v1/regions/{region}/attestation"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zode.dev/v1/regions/{region}/attestation', 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.zode.dev/v1/regions/{region}/attestation",
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 := "https://api.zode.dev/v1/regions/{region}/attestation"
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("https://api.zode.dev/v1/regions/{region}/attestation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zode.dev/v1/regions/{region}/attestation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"region": "<string>",
"hosts": [
{
"host": "<string>",
"region": "<string>",
"report": {
"class": "tpm_quoted",
"release": "<string>",
"manifest": "aSDinaTvuI8gbWludGxpZnk=",
"manifest_digest": "<string>",
"bundle": {},
"measured": [
{
"name": "<string>",
"path": "<string>",
"sha256": "<string>",
"error": "<string>"
}
],
"measured_at": "2023-11-07T05:31:56Z",
"quote": {
"nonce": "<string>",
"attest": "aSDinaTvuI8gbWludGxpZnk=",
"signature": "aSDinaTvuI8gbWludGxpZnk=",
"ak_public": "<string>",
"pcrs": {}
},
"error": "<string>"
},
"verdict": {
"ok": true,
"class": "tpm_quoted",
"claimed": "<string>",
"checks": [
"<string>"
],
"release": "<string>",
"manifest_digest": "<string>",
"log": {
"log": "<string>",
"log_url": "<string>",
"log_index": 123,
"tree_size": 123,
"root_hash": "<string>",
"integrated_time": "2023-11-07T05:31:56Z",
"set": true
},
"limits": [
"<string>"
],
"problem": "<string>"
}
}
]
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Attestation
Attest a region
Attestation of every active host in a region (any role).
zode verify <region>. Hosts are named by a short hash, never by
node id. A host that does not answer is listed with class none.
GET
/
v1
/
regions
/
{region}
/
attestation
Attest a region
curl --request GET \
--url https://api.zode.dev/v1/regions/{region}/attestation \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zode.dev/v1/regions/{region}/attestation"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zode.dev/v1/regions/{region}/attestation', 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.zode.dev/v1/regions/{region}/attestation",
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 := "https://api.zode.dev/v1/regions/{region}/attestation"
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("https://api.zode.dev/v1/regions/{region}/attestation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zode.dev/v1/regions/{region}/attestation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"region": "<string>",
"hosts": [
{
"host": "<string>",
"region": "<string>",
"report": {
"class": "tpm_quoted",
"release": "<string>",
"manifest": "aSDinaTvuI8gbWludGxpZnk=",
"manifest_digest": "<string>",
"bundle": {},
"measured": [
{
"name": "<string>",
"path": "<string>",
"sha256": "<string>",
"error": "<string>"
}
],
"measured_at": "2023-11-07T05:31:56Z",
"quote": {
"nonce": "<string>",
"attest": "aSDinaTvuI8gbWludGxpZnk=",
"signature": "aSDinaTvuI8gbWludGxpZnk=",
"ak_public": "<string>",
"pcrs": {}
},
"error": "<string>"
},
"verdict": {
"ok": true,
"class": "tpm_quoted",
"claimed": "<string>",
"checks": [
"<string>"
],
"release": "<string>",
"manifest_digest": "<string>",
"log": {
"log": "<string>",
"log_url": "<string>",
"log_index": 123,
"tree_size": 123,
"root_hash": "<string>",
"integrated_time": "2023-11-07T05:31:56Z",
"set": true
},
"limits": [
"<string>"
],
"problem": "<string>"
}
}
]
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Authorizations
An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.
Query Parameters
⌘I