Restore an earlier version of a memory
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_id}/restore \
--header 'Content-Type: application/json' \
--data '
{
"version": 2,
"revision": 2
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({version: 2, revision: 2})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_id}/restore', 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}/memories/{memory_id}/restore"
payload = {
"version": 2,
"revision": 2
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"code": "storage_rule_violation",
"violations": [
{
"rule": "<string>",
"message": "<string>",
"limit": "<unknown>",
"actual": "<unknown>"
}
],
"project_id": "<string>",
"refused_by_rules": [
{
"title": "<string>",
"rule": "<string>",
"message": "<string>"
}
]
}Projects
Restore an earlier version of a memory
Put an earlier version’s title, content, tags and kind back, as a new revision (#683). version is a revision number from the versions list; revision is the memory’s current one, as for an edit. The text it replaces is kept as a version too. Only the memory’s author; an agent cannot restore an approved decision in a project that holds agents’ decisions for review.
POST
/
admin
/
api
/
projects
/
{project_id}
/
memories
/
{memory_id}
/
restore
Restore an earlier version of a memory
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_id}/restore \
--header 'Content-Type: application/json' \
--data '
{
"version": 2,
"revision": 2
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({version: 2, revision: 2})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/memories/{memory_id}/restore', 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}/memories/{memory_id}/restore"
payload = {
"version": 2,
"revision": 2
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"code": "storage_rule_violation",
"violations": [
{
"rule": "<string>",
"message": "<string>",
"limit": "<unknown>",
"actual": "<unknown>"
}
],
"project_id": "<string>",
"refused_by_rules": [
{
"title": "<string>",
"rule": "<string>",
"message": "<string>"
}
]
}Path Parameters
Body
application/json
Response
Successful operation
The response is of type object.