DocumentationAPI reference
Rust · 0.1.0
Memo
A memo resource used by both reads and writes, with operation-specific writable fields.
Do not replay a whole response
CreateMemo and UpdateMemo accept this object directly. Creator, tags, reactions, property, parent and snippet are server-derived. A PATCH with updateMask=content needs only content, even though this reusable schema lists state and visibility as required. Attachments and relations are sets with replacement semantics when selected for update. Consult the operation's runtime notes before copying a response into a request.
Creation is not full resource replacement
CreateMemo and CreateMemoComment ignore state and pinned and create a NORMAL, unpinned record. Change these values afterward with UpdateMemo when needed. The shared required-field and property lists describe the protocol resource; the calling operation determines which inputs are applied.
Where this schema is used
These links are derived from direct references in the protocol snapshot. Follow the calling operation for authentication, accepted fields and runtime behavior; a reusable resource schema is not by itself a complete write request.
- POSTCreate Memo
/api/v1/memos - GETGet Memo
/api/v1/memos/{memo} - PATCHUpdate Memo
/api/v1/memos/{memo} - POSTCreate Memo Comment
/api/v1/memos/{memo}/comments - GETGet Shared Memo
/api/v1/shares/{shareToken}/memo
Referenced by these component schemas:
Shape and fields
object
| Field | Type / requirement | Description |
|---|---|---|
name | string | The resource name of the memo. Format: memos/{memo}, where memo is the user-defined UID. |
state | string (enum)STATE_UNSPECIFIED · NORMAL · ARCHIVEDRequired | The state of the memo. |
creator | string | The name of the creator. Format: users/{user} |
createTime | string (date-time) | The creation timestamp. If not set on creation, the server will set it to the current time. |
updateTime | string (date-time) | The last update timestamp. If not set on creation, the server will set it to the current time. |
content | string Required | Required. The content of the memo in Markdown format. |
visibility | string (enum)VISIBILITY_UNSPECIFIED · PRIVATE · PROTECTED · PUBLIC · SPACERequired | The visibility of the memo. One of PRIVATE (creator only), PROTECTED (signed-in users), PUBLIC (anonymous-eligible), or SPACE (active space members). Defaults to PRIVATE on creation when unspecified. |
tags | array<string> | Output only. The tags extracted from the content. |
pinned | boolean | Whether the memo is pinned. |
attachments | array<Attachment> | Optional. The attachments of the memo. |
relations | array<MemoRelation> | Optional. The relations of the memo. |
reactions | array<Reaction> | Output only. The reactions to the memo. |
property | allOf Memo_Property | Output only. The computed properties of the memo. |
parent | string | Output only. The context memo of this COMMENT relation, if any. Its identity is returned even when the caller cannot read the parent. Fetch the parent independently; this field does not grant read access. Format: memos/{memo} |
snippet | string | Output only. The snippet of the memo content. Plain text only. |
location | allOf Location | Optional. The location of the memo. |
space | string | Optional. The space in which this memo is placed. Format: spaces/{space}. Every memo, including a comment, owns its placement independently. |
Complete schema
Use this complete JSON definition for constraints and nested structure. A field's presence here does not mean it is writable by every caller.
{
"required": [
"state",
"content",
"visibility"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The resource name of the memo.\n Format: memos/{memo}, where memo is the user-defined UID."
},
"state": {
"enum": [
"STATE_UNSPECIFIED",
"NORMAL",
"ARCHIVED"
],
"type": "string",
"description": "The state of the memo.",
"format": "enum"
},
"creator": {
"readOnly": true,
"type": "string",
"description": "The name of the creator.\n Format: users/{user}"
},
"createTime": {
"type": "string",
"description": "The creation timestamp.\n If not set on creation, the server will set it to the current time.",
"format": "date-time"
},
"updateTime": {
"type": "string",
"description": "The last update timestamp.\n If not set on creation, the server will set it to the current time.",
"format": "date-time"
},
"content": {
"type": "string",
"description": "Required. The content of the memo in Markdown format."
},
"visibility": {
"enum": [
"VISIBILITY_UNSPECIFIED",
"PRIVATE",
"PROTECTED",
"PUBLIC",
"SPACE"
],
"type": "string",
"description": "The visibility of the memo.\n One of PRIVATE (creator only), PROTECTED (signed-in users), PUBLIC\n (anonymous-eligible), or SPACE (active space members). Defaults to\n PRIVATE on creation when unspecified.",
"format": "enum"
},
"tags": {
"readOnly": true,
"type": "array",
"items": {
"type": "string"
},
"description": "Output only. The tags extracted from the content."
},
"pinned": {
"type": "boolean",
"description": "Whether the memo is pinned."
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attachment"
},
"description": "Optional. The attachments of the memo."
},
"relations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemoRelation"
},
"description": "Optional. The relations of the memo."
},
"reactions": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/components/schemas/Reaction"
},
"description": "Output only. The reactions to the memo."
},
"property": {
"readOnly": true,
"allOf": [
{
"$ref": "#/components/schemas/Memo_Property"
}
],
"description": "Output only. The computed properties of the memo."
},
"parent": {
"readOnly": true,
"type": "string",
"description": "Output only. The context memo of this COMMENT relation, if any.\n Its identity is returned even when the caller cannot read the parent.\n Fetch the parent independently; this field does not grant read access.\n Format: memos/{memo}"
},
"snippet": {
"readOnly": true,
"type": "string",
"description": "Output only. The snippet of the memo content. Plain text only."
},
"location": {
"allOf": [
{
"$ref": "#/components/schemas/Location"
}
],
"description": "Optional. The location of the memo."
},
"space": {
"type": "string",
"description": "Optional. The space in which this memo is placed. Format: spaces/{space}.\n Every memo, including a comment, owns its placement independently."
}
}
}