UserService · UserService_ImportMemos
Access
Owner-only: the user named in the path must be the authenticated caller. Instance administrator status does not allow acting on another account here.
Validate before importing
Upload a Memos export ZIP in chunks: begin with spec.totalSize and writeOffset "0", then continue with uploadId, committedSize and base64 data. Finish first with validateOnly: true to obtain a plan without importing. The archive remains staged; a later finishWrite: true without validateOnly imports it. Review the conflict policy: unspecified means SKIP, REPLACE changes existing owned memos, and DUPLICATE creates copies. The returned report can include individual failures and warnings; HTTP success is not proof that every memo imported. Chunk size is at most 2 MiB and sessions expire after 30 minutes idle or restart.
Request
ImportMemos uploads a Memos export file in bounded chunks and imports it into the user's memos. The first call carries the spec and returns an upload_id; later calls carry that upload_id. A finishing call with validate_only returns the plan and keeps the archive staged; a finishing call without it imports and returns the report. Uploads are bound to the authenticated user, expire after 30 minutes of inactivity, and do not survive a server restart.
/api/v1/users/{user}:importMemosParameters
| Name / location | Type / requirement | Description |
|---|---|---|
userpath | string Required | The user id. |
Request body
Required
application/json · ImportMemosRequest
Responses
200 · OK
application/json · ImportMemosResponse
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": [
"UserService"
],
"description": "ImportMemos uploads a Memos export file in bounded chunks and imports it into\n the user's memos. The first call carries the spec and returns an\n upload_id; later calls carry that upload_id. A finishing call with\n validate_only returns the plan and keeps the archive staged; a finishing\n call without it imports and returns the report. Uploads are bound to the\n authenticated user, expire after 30 minutes of inactivity, and do not\n survive a server restart.",
"operationId": "UserService_ImportMemos",
"parameters": [
{
"name": "user",
"in": "path",
"description": "The user id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImportMemosRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImportMemosResponse"
}
}
}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}