MemoService · MemoService_SetMemoAttachments
Destructive replacement: send the complete desired attachment set. Omitting an existing attachment deletes its metadata and invokes cleanup of its stored bytes; this is not a harmless unlink. An empty set removes all attachments. For an existing APPLE_LIVE_PHOTO pair, retaining only one member can remove the entire pair, including the member you submitted, if the update passes content-reference validation. Retain both or deliberately remove both. Keep a backup, and verify the current state before retrying after a lost response.
Access
Requires the memo creator or an instance administrator. Updates and share management also check applicable space placement. Space membership by itself does not grant ownership of another member's memo.
Replacement deletes omitted files
Read the current attachment list and submit the complete set you intend to retain. Existing names identify attachments; this is not a file upload. Omitted attachments are deleted with storage cleanup, not merely unlinked. Managed image references in Markdown must remain backed by retained attachments. To remove such images and their files together, update content and attachments in one UpdateMemo call. An empty attachments array removes the full set if content constraints allow it.
Successful response
This operation has no resource to return. The Rust REST transport serializes protobuf Empty as HTTP 200 with JSON {}. The empty success-schema area in the generated contract is intentional, not missing request instructions.
Keep existing Live Photo pairs complete
When replacing attachments, submitting only one member of an existing APPLE_LIVE_PHOTO pair removes the entire pair from the requested set, including the submitted member. If content-reference validation passes and the update proceeds, both members are deleted. Keep both attachment resource names or intentionally remove both. This differs from DeleteAttachment and BatchDeleteAttachments, which reject a partial group. Check the current set before retrying a write whose response was lost.
Request
SetMemoAttachments replaces the full set of attachments on a memo with the provided list (not an append). Pass the complete desired set; an empty list clears all attachments. Idempotent.
/api/v1/memos/{memo}/attachmentsParameters
| Name / location | Type / requirement | Description |
|---|---|---|
memopath | string Required | The memo id. |
Request body
Required
application/json · SetMemoAttachmentsRequest
Responses
200 · OK
default · Default error response
application/json · Status
Complete operation definition
All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.
Open JSON definition
{
"tags": [
"MemoService"
],
"description": "SetMemoAttachments replaces the full set of attachments on a memo with the\n provided list (not an append). Pass the complete desired set; an empty list\n clears all attachments. Idempotent.",
"operationId": "MemoService_SetMemoAttachments",
"parameters": [
{
"name": "memo",
"in": "path",
"description": "The memo id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SetMemoAttachmentsRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}