Merge two duplicate memories
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/memories/merge-proposals/{proposal_id}/accept \
--header 'Content-Type: application/json' \
--data '
{
"keep": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"a_revision": 2,
"b_revision": 2,
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
keep: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
a_revision: 2,
b_revision: 2,
title: '<string>',
content: '<string>',
tags: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/memories/merge-proposals/{proposal_id}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/memories/merge-proposals/{proposal_id}/accept"
payload = {
"keep": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"a_revision": 2,
"b_revision": 2,
"title": "<string>",
"content": "<string>",
"tags": ["<string>"]
}
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>"
}
]
}Data workspace
Merge two duplicate memories
Keeps one memory and marks the other as superseded by it, in one step (#687). Send the revision you read of each; if either changed since, or is no longer current, the merge is refused with 409. When the caller wrote the kept memory, tags are united unless tags is given; anyone else leaves the kept memory unchanged. A new title, content or tags needs the kept memory’s author (403 otherwise). Agents may merge at hookie:write, except a decision in a project that holds agents’ decisions for review (403). Returns proposal, kept and superseded.
POST
/
admin
/
api
/
data-workspace
/
memories
/
merge-proposals
/
{proposal_id}
/
accept
Merge two duplicate memories
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/memories/merge-proposals/{proposal_id}/accept \
--header 'Content-Type: application/json' \
--data '
{
"keep": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"a_revision": 2,
"b_revision": 2,
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
keep: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
a_revision: 2,
b_revision: 2,
title: '<string>',
content: '<string>',
tags: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/memories/merge-proposals/{proposal_id}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/memories/merge-proposals/{proposal_id}/accept"
payload = {
"keep": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"a_revision": 2,
"b_revision": 2,
"title": "<string>",
"content": "<string>",
"tags": ["<string>"]
}
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>"
}
]
}Body
application/json
Response
Successful operation
The response is of type object.