curl --request GET \
--url https://api.example.com/api/v1/memories \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/memories"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/memories', 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.example.com/api/v1/memories",
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://api.example.com/api/v1/memories"
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://api.example.com/api/v1/memories")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/memories")
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{
"memories": [
{
"memory_id": "<string>",
"user_id": "<string>",
"memory": "<string>",
"topics": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"total_count": 123,
"next_cursor": "<string>",
"has_more": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List Memories
List memories with cursor-based pagination.
Cursor-based pagination is more efficient for large datasets and handles data changes better than offset-based pagination.
Args: user_id: Optional user ID to filter memories cursor: Cursor from previous response for next page (None for first page) limit: Number of items per page (default: 50, max: 100) sort_by: Field to sort by (default: ‘updated_at’) sort_order: Sort order - ‘asc’ or ‘desc’ (default: ‘desc’)
Returns: MemoryListResponse with memories and next_cursor
Examples: First page: GET /memories?user_id=user_123&limit=50
Next page (using cursor from previous response): GET /memories?user_id=user_123&cursor=mem_xyz123&limit=50
Sort by updated_at descending (most recent first): GET /memories?user_id=user_123&sort_by=updated_at&sort_order=desc
Sort by memory_id ascending: GET /memories?user_id=user_123&sort_by=memory_id&sort_order=asc
curl --request GET \
--url https://api.example.com/api/v1/memories \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/memories"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/memories', 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.example.com/api/v1/memories",
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://api.example.com/api/v1/memories"
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://api.example.com/api/v1/memories")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/memories")
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{
"memories": [
{
"memory_id": "<string>",
"user_id": "<string>",
"memory": "<string>",
"topics": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {}
}
],
"total_count": 123,
"next_cursor": "<string>",
"has_more": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace ID
Query Parameters
User ID to filter memories
Cursor for pagination (use next_cursor from previous response)
Number of memories to return per page
1 <= x <= 100Field to sort memories by (e.g., 'memory_id', 'updated_at')
Sort order (asc or desc)
asc, desc Response
Successful Response
Schema for listing memories with cursor-based pagination.
List of memories.
Show child attributes
Show child attributes
Total number of memories returned in this request.
Cursor for fetching the next page. None if no more pages.
Whether there are more memories to fetch.