Read a memory
const url = 'https://api.metaphorlabs.io/v1/spaces/personal/memories/4f1c9a7e2b8d06c3a5e9f17b20d4c8e6';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/4f1c9a7e2b8d06c3a5e9f17b20d4c8e6 \ --header 'Authorization: Bearer <token>' \ --header 'metaphor-user: customer-4821'Needs memories:read. A memory the acting user can neither see nor wrote answers as if it did not exist. So does one that was forgotten or that a newer one replaced, though a recall line about an earlier version can still name a replaced memory’s ID.
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.
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.
Example
4f1c9a7e2b8d06c3a5e9f17b20d4c8e6A 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.
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”The memory.
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.
Example
{ "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" }}not-found: no such memory, or no such shared space. not-ready: the memory was accepted and is waiting to be written; read it again in a few seconds. not-saved: the memory was accepted but could not be written in 24 hours, so it was dropped and nothing of it is kept; write it again. not-saved is answered for 31 days, then not-found.
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" }}