List a document's earlier versions
curl --request GET \
--url https://app.hookie.ai/admin/api/projects/{project_id}/brain/documents/{document_id}/versionsconst options = {method: 'GET'};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/brain/documents/{document_id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/brain/documents/{document_id}/versions"
response = requests.get(url)
print(response.text){}Projects
List a document's earlier versions
The earlier versions of a project document, newest first (#683): what it replaced through an upload with replaces, a restore, or its repository file changing. Each has its name, kind, size, who added it (owner), and who replaced it and how (replaced_by; replaced_via is console, repo, or the agent’s name). Up to 10 per document, kept for the plan’s history retention (retention_days). Deleting the document deletes them.
GET
/
admin
/
api
/
projects
/
{project_id}
/
brain
/
documents
/
{document_id}
/
versions
List a document's earlier versions
curl --request GET \
--url https://app.hookie.ai/admin/api/projects/{project_id}/brain/documents/{document_id}/versionsconst options = {method: 'GET'};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/brain/documents/{document_id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/brain/documents/{document_id}/versions"
response = requests.get(url)
print(response.text){}