MemoService

POST /api/memos/{memo}/comments

Changed on

CreateMemoComment atomically creates an independent memo plus one immutable COMMENT context relation to the named memo. The new memo keeps its own placement, visibility, authorship, and lifecycle. The named memo must be readable by the caller and not archived.

Request

  • The document declares no server URL.
  • Auth
    none declared

Path parameters

memostring required

The memo id.

Query parameters

commentIdstring

Optional. The ID to use for the comment memo, in the same format as CreateMemoRequest.memo_id. If empty, a unique ID is generated.

Request body

namestring

Identifier. The resource name of the memo, where memo is the user-defined UID. Format: memos/{memo}

creatorstring

Output only. The resource name of the creator. Format: users/{user}

spacestring

Optional. The space in which the memo is placed. Every memo, including a comment, owns its placement independently. Format: spaces/{space}

contentstring required

Required. The content of the memo in Markdown. Must not exceed the instance's content length limit.

visibility'VISIBILITY_UNSPECIFIED' | 'PRIVATE' | 'PROTECTED' | 'PUBLIC' | 'SPACE' enum required

Required. The visibility of the memo. Defaults to PRIVATE on creation when unspecified. SPACE requires the memo to be placed in a space.

state'STATE_UNSPECIFIED' | 'NORMAL' | 'ARCHIVED' enum required

Required. The state of the memo. New memos are always NORMAL; change it with UpdateMemo.

pinnedboolean

Optional. Whether the memo is pinned. Ignored on creation; change it with UpdateMemo.

parentstring

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}

tagsstring[]

Output only. The tags extracted from the content.

snippetstring

Output only. A plain-text snippet of the content.

createTimestring date-time

Optional. The creation time. Defaults to the current time when unset on creation.

updateTimestring date-time

Optional. The last update time. Defaults to the current time when unset on creation.

Response

OK

namestring

Identifier. The resource name of the memo, where memo is the user-defined UID. Format: memos/{memo}

creatorstring

Output only. The resource name of the creator. Format: users/{user}

spacestring

Optional. The space in which the memo is placed. Every memo, including a comment, owns its placement independently. Format: spaces/{space}

contentstring required

Required. The content of the memo in Markdown. Must not exceed the instance's content length limit.

visibility'VISIBILITY_UNSPECIFIED' | 'PRIVATE' | 'PROTECTED' | 'PUBLIC' | 'SPACE' enum required

Required. The visibility of the memo. Defaults to PRIVATE on creation when unspecified. SPACE requires the memo to be placed in a space.

state'STATE_UNSPECIFIED' | 'NORMAL' | 'ARCHIVED' enum required

Required. The state of the memo. New memos are always NORMAL; change it with UpdateMemo.

pinnedboolean

Optional. Whether the memo is pinned. Ignored on creation; change it with UpdateMemo.

parentstring

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}

tagsstring[]

Output only. The tags extracted from the content.

snippetstring

Output only. A plain-text snippet of the content.

createTimestring date-time

Optional. The creation time. Defaults to the current time when unset on creation.

updateTimestring date-time

Optional. The last update time. Defaults to the current time when unset on creation.

Changes

    • info

      added the new optional request property /////

    • info

      added the optional property ///// to the response with the status

    • info

      endpoint added