Versions of a note
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/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://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/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 => [
"Authorization: Bearer <token>"
],
]);
$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://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"kind": "procedure",
"note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origin": "agent",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"title": "<string>",
"version": 2,
"visibility": "source",
"evidence": {
"conversation_id": "<string>",
"task_id": "<string>"
},
"supersedes_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"valid_until": "2023-11-07T05:31:56Z"
}
]{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Agent memory
Versions of a note
Every version, oldest first.
GET
/
v1
/
agent-memory
/
notes
/
{note_id}
/
versions
Versions of a note
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/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://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/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 => [
"Authorization: Bearer <token>"
],
]);
$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://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/agent-memory/notes/{note_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"kind": "procedure",
"note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origin": "agent",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"title": "<string>",
"version": 2,
"visibility": "source",
"evidence": {
"conversation_id": "<string>",
"task_id": "<string>"
},
"supersedes_note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"valid_until": "2023-11-07T05:31:56Z"
}
]{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Authorizations
sourceKeypersonToken
nia_sk_...
Path Parameters
Response
The versions.
source:<id> or user:<id>.
Available options:
procedure, tool_note, process_note, pitfall Available options:
agent, human, distilled The agent that owns the note.
Available options:
active, retired Required range:
x >= 1Available options:
source, vendor, space Where the note came from: an id only, never the text of the conversation or task.
Show child attributes
Show child attributes
The version this one replaced; that one is retired.
After this moment the note leaves the block and the search.

