UserService

POST /api/users/{user}:importMemos

Changed on

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.

Request

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

Path parameters

userstring required

The user id.

Request body

namestring required

Required. The user who receives the memos. Must be the caller. Format: users/{user}

uploadIdstring

Continues the upload identified by a previous response.

writeOffsetstring required

Required. Zero-based byte offset at which data is written. Must equal the committed size, except when retrying the most recently accepted chunk with identical bytes and offset, which is accepted without writing again.

datastring bytes

Optional. Archive bytes, at most max_chunk_size long. With no data and finish_write false, the call reports progress without writing, and write_offset is ignored.

finishWriteboolean

Optional. Finish the upload after writing data. The committed size must then equal total_size. The archive is validated and, unless validate_only is set, imported. Any later call for an imported upload returns the same report.

conflictPolicy'CONFLICT_POLICY_UNSPECIFIED' | 'SKIP' | 'REPLACE' | 'DUPLICATE' enum

Optional. Read on the finishing call that imports. Unspecified means SKIP.

validateOnlyboolean

Optional. On a finishing call, validate the archive and return the plan without importing. The upload stays staged so a later finishing call can import it.

Response

OK

uploadIdstring

Opaque ID for subsequent calls. This is not a resource name.

committedSizestring

Number of archive bytes committed so far.

maxChunkSizeinteger

Maximum number of data bytes accepted in one call.

Changes