メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

PUT /v1/memory_stores/{memory_store_id}/memories/{memory_id} 指定されたメモリエントリの内容を更新します。更新ごとにバージョン番号が自動的にインクリメントされ、バージョンレコードが生成されます。

パスパラメータ

パラメータ必須説明
memory_store_idstringはいMemory Store ID(memstore_ プレフィックス)
memory_idstringはいメモリエントリ ID(mem_ プレフィックス)

ヘッダー

ヘッダー必須
AuthorizationBearer $QODER_PATはい
Content-Typeapplication/jsonはい

リクエストボディ

フィールド必須説明
contentstringはい新しいメモリ内容

リクエスト例

curl -X PUT "https://openapi.qoder.sh/api/v1/cloud/memory_stores/memstore_xxx/memories/mem_xxx" \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "更新後の内容..."
  }'

レスポンス例

HTTP 200 OK 更新後の MemoryEntry オブジェクトを返します。
{
  "id": "mem_019e3bb965a671fca51bde1cf8d87de0",
  "type": "memory",
  "store_id": "memstore_019e3bb93b7074f9a5130d39ddcca90f",
  "path": "test/note.md",
  "content": "Hello world - updated content",
  "size": 29,
  "content_sha256": "663ab3dd969f51ffd6565202a6a5006db76a96a09a3506962f8d442df8f9bd76",
  "version": 2,
  "metadata": {},
  "created_at": "2026-05-18T15:34:26.494349Z",
  "updated_at": "2026-05-18T15:34:37.780345Z"
}

レスポンスフィールド

フィールド説明
idstring一意識別子
typestring固定値 "memory"
store_idstring所属する Store ID
pathstring相対パス(変更されない)
contentstring更新後の内容
sizeint64新内容サイズ(バイト)
content_sha256string新内容の SHA-256 ハッシュ
versionint64インクリメント後のバージョン番号
metadataobjectカスタムメタデータ
created_atstring元の作成時刻(変更されない)
updated_atstring更新時刻(ISO 8601)

エラーレスポンス

HTTPtype説明
401TOKEN_INVALID認証トークンが提供されていないまたは無効
404not_found_error指定の Memory Store またはメモリエントリが存在しない

注意事項

  • 更新ごとに version が自動的にインクリメントされます(例:1 から 2 へ)
  • created_at は変わらず、updated_at が現在時刻に更新されます
  • sizecontent_sha256 は新内容に基づいて再計算されます
  • 更新ごとに action: "updated" のバージョンレコードが生成されます
  • path は更新時に変更できません