List memories
const url = 'https://api.metaphorlabs.io/v1/spaces/personal/memories?limit=50';const options = { method: 'GET', headers: {'metaphor-user': 'customer-4821', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.metaphorlabs.io/v1/spaces/personal/memories?limit=50' \ --header 'Authorization: Bearer <token>' \ --header 'metaphor-user: customer-4821'Needs memories:read. The memories in the space the acting user can see or wrote, newest first, optionally only one agent’s. A memory a newer one replaced is left out.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”personal for the acting user’s own space, or a shared space’s ID: 1 to 63 lowercase letters, digits and hyphens, starting with a letter or digit. personal always answers: before the user’s first write it holds nothing.
Example
personalpersonal for the acting user’s own space, or a shared space’s ID: 1 to 63 lowercase letters, digits and hyphens, starting with a letter or digit. personal always answers: before the user’s first write it holds nothing.
Query Parameters
Section titled “Query Parameters”1 to 100, written in plain digits. 50 when left out.
1 to 100, written in plain digits. 50 when left out.
Header Parameters
Section titled “Header Parameters”A member’s ID, which Metaphor issued and which starts with metaphor:, or your own ID for an end user: 1 to 256 visible ASCII characters but " and \, not starting with metaphor:. Metaphor keeps an end user’s ID as you send it only on a key held to that user. A service user’s ID is issued by Metaphor, so it starts with metaphor: too.
Example
customer-4821The user this request acts for. Required for a key of your own server; a key held to a user may leave it out, or send that user’s ID. A server key acts for a member only where the owner turned that on for the project, and each such request is recorded.
Responses
Section titled “Responses”A page of memories.
object
object
A memory’s ID, made from its source with a key of its space’s own. The same source gets a different ID in every space, and an ID names a memory only within its space. A write answers with it.
object
The source’s name, as it was written. Null for a memory written before sources were kept, or written from the console’s playground.
The item’s ID at the source, as it was written. It is kept with the memory and erased with it. Null when name is.
object
Null when the author is an end user other than the acting user: Metaphor keeps no other end user’s ID as you send it, so it has none to show.
The agent that wrote it, if any.
Who may see it. An entry naming an end user other than the acting user is left out, for the same reason.
How many entries were left out of audience.
stored: kept. It is the one value served today, and does not say whether the memory is ready for recall. Other values may be added.
When a recall last returned it, to the minute. Null when none has in the last 90 days. Forgetting it clears this, and an undo does not bring it back.
Send as after for the next page. Null on the last page. A page holds limit items unless it is the last.
Example
{ "data": [ { "id": "4f1c9a7e2b8d06c3a5e9f17b20d4c8e6", "occurred_at": "2027-01-31T09:30:00Z", "received_at": "2027-01-31T09:30:00Z", "last_recalled_at": "2027-01-31T09:30:00Z" } ]}The request is not valid, or names no user to act for.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}No valid API key was sent.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}The API key does not allow this, or not for this user.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}No such shared space.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}user-erased: the acting user was erased after the request was let in. Nothing was done. space-refused: the space cannot be served as it stands. Nothing was done. Sending the request again will not help.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}The API key sent more than 600 requests in a minute, the user’s keys together more than 2000, or the tenant’s keys together more than 6000. Wait the seconds Retry-After gives.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}Something went wrong. Try again.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}The request could not be checked. Try again.
object
object
One of ErrorCode, or a code added since. Treat a code you do not know by its status.
Example generated
{ "error": { "code": "example", "message": "example" }}