Skip to main content
Memory Stores

Memory Store の Identity へのマウント

Memory Store を Identity と Template にマウントします。

既存の Memory Store を (identity, template) にマウントします。その Identity が Template を使用して作成する Session には Store の Memory 内容が自動的に提供されます。 明示的にマウントした Store は常に read_only です。1 つの (identity, template) には、システム管理のデフォルト Store を除いて最大 10 個を明示的にマウントできます。 同じマウント操作は冪等です。 同じ Store を再度マウントすると既存のレコードが返され、created_at は最初のマウント時刻のままです。

パス

POST /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores

ヘッダー

ヘッダー必須説明
AuthorizationはいBearer <PAT, admin SAT, or SAT for this Identity>
Content-Typeはいapplication/json
Identity レベルの Service Account Token は自身の Identity のみ操作できます。別の Identity を操作すると 403 が返されます。

パスパラメータ

パラメータ必須説明
identity_idstringはいIdentity ID(idn_...)。
template_idstringはいTemplate ID(tmpl_...)。

リクエストボディ

フィールド必須説明
memory_store_idstringはいマウントする Memory Store ID(memstore_...)。呼び出し元から参照できる active 状態の Store である必要があります。

リクエスト例

curl -X POST "https://api.qoder.com/api/v1/forward/identities/idn_63ee28747a35cff93771c491/templates/tmpl_eb3377fb74ad413e17b3d755/memory_stores" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "memory_store_id": "memstore_00mc7mukn7lkxr454tjd"
  }'

レスポンス例

HTTP 200 OK
{
  "memory_store_id": "memstore_00mc7mukn7lkxr454tjd",
  "identity_id": "idn_63ee28747a35cff93771c491",
  "template_id": "tmpl_eb3377fb74ad413e17b3d755",
  "access": "read_only",
  "system_managed": false,
  "name": "team-a",
  "status": "active",
  "entry_count": 12,
  "created_at": "2026-08-14T10:00:00Z"
}

レスポンス

Memory Store マウントオブジェクトを返します。

注意事項

複数の Store をマウントすると、Agent にはすべての Store の Memory が path で統合されたフラットな名前空間として見えます。同じ path は互いに隠れる可能性があります。Session 内での見え方を参照してください。

エラー

HTTPType発生条件
400invalid_request_errormemory_store_id がない、Store がアーカイブ済み、または (identity, template) にすでに 10 個の明示的なマウントがあります。
401authentication_error認証トークンがないか無効です。
403permission_errorIdentity レベルの SAT が別の Identity を操作しようとしました。
404not_found_errorIdentity、Template、Memory Store のいずれかが存在しないか参照できません。
500/502/503api_errorForward または依存サービスでエラーが発生しました。