curl --request GET \
--url https://api.rootkey.ai/api-v1/platform/records/{fileId}/history \
--header 'x-api-key: <api-key>'import requests
url = "https://api.rootkey.ai/api-v1/platform/records/{fileId}/history"
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/{fileId}/history', 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/{fileId}/history",
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/{fileId}/history"
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/{fileId}/history")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootkey.ai/api-v1/platform/records/{fileId}/history")
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{
"chainId": 137,
"history": {
"data": [
{
"id": "<string>",
"fileId": "<string>",
"recordId": "<string>",
"member": {
"name": "<string>",
"email": "<string>",
"imagePath": "<string>"
},
"apiKey": {
"name": "<string>",
"icon": "<string>"
},
"connector": {
"name": "<string>",
"type": "<string>"
},
"action": "<string>",
"status": "<string>",
"actorType": "member",
"metadata": {},
"timestamp": "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"
}
}Fetch record history
Returns the activity/audit log for a record — creation, new versions, deletion, and related events — newest first by default. fileId is the record’s id (from __meta.id). A personal access token with the rootkey.read scope can call it.
curl --request GET \
--url https://api.rootkey.ai/api-v1/platform/records/{fileId}/history \
--header 'x-api-key: <api-key>'import requests
url = "https://api.rootkey.ai/api-v1/platform/records/{fileId}/history"
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/{fileId}/history', 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/{fileId}/history",
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/{fileId}/history"
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/{fileId}/history")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rootkey.ai/api-v1/platform/records/{fileId}/history")
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{
"chainId": 137,
"history": {
"data": [
{
"id": "<string>",
"fileId": "<string>",
"recordId": "<string>",
"member": {
"name": "<string>",
"email": "<string>",
"imagePath": "<string>"
},
"apiKey": {
"name": "<string>",
"icon": "<string>"
},
"connector": {
"name": "<string>",
"type": "<string>"
},
"action": "<string>",
"status": "<string>",
"actorType": "member",
"metadata": {},
"timestamp": "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 history to fetch.
Query Parameters
asc, desc Was this page helpful?

