curl --request GET \
--url https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions', 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.rootkey.ai/api-v1/platform/records/{parentId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.rootkey.ai/api-v1/platform/records/{parentId}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.rootkey.ai/api-v1/platform/records/{parentId}/versions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"memberId": "<string>",
"parentId": "<string>",
"blockchainId": "<string>",
"versionsNumber": 123,
"status": "PENDING",
"transactionHash": "<string>",
"ownerAddress": "<string>",
"chainId": 123,
"dataHash": "<string>",
"integrity": 123,
"vault": {
"name": "Partner Logos",
"address": "<string>"
},
"data": {},
"isTest": true,
"expirationDate": "2023-11-07T05:31:56Z",
"lastValidateAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"previousCursor": "<string>",
"nextCursor": "<string>"
},
"metadata": {
"fetchedCount": 123,
"totalCount": 123,
"serverTimestamp": "2023-11-07T05:31:56Z",
"parameters": {
"limit": 123,
"cursor": "<string>",
"order": "asc"
}
}
}{
"error": {
"requestId": "<string>",
"message": "<string>",
"errorCode": "<string>",
"docUrl": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"requestId": "<string>",
"message": "<string>",
"errorCode": "<string>",
"docUrl": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"requestId": "<string>",
"message": "<string>",
"errorCode": "<string>",
"docUrl": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}List record versions
Returns the version history of a record, newest first by default. parentId is the record’s id (from the __meta.id field of a List Records item). Each item is a full record version including its decrypted column values in data.
Response shape: this endpoint returns a bare pagination envelope (data / pagination / metadata) — unlike List Records and Fetch Record History, there is no chainId wrapper. A personal access token with the rootkey.read scope can call it.
curl --request GET \
--url https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions', 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.rootkey.ai/api-v1/platform/records/{parentId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.rootkey.ai/api-v1/platform/records/{parentId}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.rootkey.ai/api-v1/platform/records/{parentId}/versions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootkey.ai/api-v1/platform/records/{parentId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"memberId": "<string>",
"parentId": "<string>",
"blockchainId": "<string>",
"versionsNumber": 123,
"status": "PENDING",
"transactionHash": "<string>",
"ownerAddress": "<string>",
"chainId": 123,
"dataHash": "<string>",
"integrity": 123,
"vault": {
"name": "Partner Logos",
"address": "<string>"
},
"data": {},
"isTest": true,
"expirationDate": "2023-11-07T05:31:56Z",
"lastValidateAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"previousCursor": "<string>",
"nextCursor": "<string>"
},
"metadata": {
"fetchedCount": 123,
"totalCount": 123,
"serverTimestamp": "2023-11-07T05:31:56Z",
"parameters": {
"limit": 123,
"cursor": "<string>",
"order": "asc"
}
}
}{
"error": {
"requestId": "<string>",
"message": "<string>",
"errorCode": "<string>",
"docUrl": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"requestId": "<string>",
"message": "<string>",
"errorCode": "<string>",
"docUrl": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"requestId": "<string>",
"message": "<string>",
"errorCode": "<string>",
"docUrl": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
ROOTKey API key. A test key works on your organization's test data and a live key on its live data; both are used with the same API.
Headers
The organization a personal access token acts in: the id of one of the organizations that GET /organizations lists. Required with a personal access token on every endpoint that works inside an organization; without it the request gets organization_header_required. Ignored with an API key, which belongs to exactly one organization.
Whether a personal access token works on live data (false, the default) or on test data (true). Only this header decides, never a query string or a body field. An API key is itself a test or a live key and works on that data.
true, false Path Parameters
The record id whose versions to list (a branch root's id).
Query Parameters
Address of the table that owns the record.
asc, desc Was this page helpful?

