Sharelife API v1(公開 + member サーフェス)
このページでは、公開カタログ読み取り API と member 側の操作 API だけを扱います。 特権付きの内部エンドポイントは公開リファレンスでは扱いません。
対象範囲
- 公開読み取り API: マーケット検索、詳細、比較、ヘルス、能力確認。
- member API: ログイン、トライアル、インストール、アップロード、profile-pack の import/投稿、ローカルインストール管理、タスク復元、transfer-job 可視化、自分の投稿一覧とダウンロード。
- owner バインディング: 認証有効時、member ルートは現在の認証
user_idに属するデータだけを操作できます。
公開 + member アプリケーションメソッド
get_preferences(user_id)set_preference_mode(user_id, mode)set_preference_observe(user_id, enabled)submit_template(user_id, template_id, version)submit_template_package(user_id, template_id, version, filename, content_base64)list_templates()get_template_detail(template_id)request_trial(user_id, session_id, template_id)get_trial_status(user_id, session_id, template_id)install_template(user_id, session_id, template_id)generate_prompt_bundle(template_id)generate_package(template_id)list_member_tasks(user_id, limit=50)refresh_member_tasks(user_id, limit=50)list_member_transfer_jobs(user_id, direction="", status="", limit=50)refresh_member_transfer_jobs(user_id, direction="", status="", limit=50)list_profile_pack_catalog(pack_query="", pack_type="", risk_level="", review_label="", warning_flag="", featured="")get_profile_pack_catalog_detail(pack_id)compare_profile_pack_catalog(pack_id, selected_sections=None)member_import_profile_pack(user_id, filename, content_base64)member_list_profile_pack_imports(user_id, limit=50)submit_profile_pack(user_id, artifact_id, submit_options=None)list_member_installations(user_id, limit=50)refresh_member_installations(user_id, limit=50)uninstall_member_installation(user_id, template_id)member_list_submissions(user_id, status="", template_query="", risk_level="", review_label="", warning_flag="")member_get_submission_detail(user_id, submission_id)member_get_submission_package(user_id, submission_id, idempotency_key="")member_list_profile_pack_submissions(user_id, status="", pack_query="", pack_type="", risk_level="", review_label="", warning_flag="")member_get_profile_pack_submission_detail(user_id, submission_id)member_withdraw_profile_pack_submission(user_id, submission_id)member_get_profile_pack_submission_export(user_id, submission_id)
公開 + member HTTP ルート
公開ルート:
GET /api/auth-infoPOST /api/loginGET /api/healthGET /api/ui/capabilities?page_mode=auto|member|marketGET /api/templatesGET /api/templates/detail?template_id=...GET /api/profile-pack/catalogGET /api/profile-pack/catalog/detail?pack_id=...GET /api/profile-pack/catalog/compare?pack_id=...&selected_sections=plugins,providersGET /api/profile-pack/catalog/insights
member ルート:
GET /api/preferences?user_id=...POST /api/preferences/modePOST /api/preferences/observePOST /api/trialGET /api/trial/status?user_id=...&session_id=...&template_id=...POST /api/templates/installPOST /api/templates/submitGET /api/templates/package/download?template_id=...POST /api/templates/promptPOST /api/templates/packageGET /api/member/tasks?user_id=...POST /api/member/tasks/refreshGET /api/member/transfers?user_id=...&direction=download&status=...POST /api/member/transfers/refreshPOST /api/profile-pack/submitPOST /api/member/profile-pack/importsGET /api/member/profile-pack/imports?user_id=...GET /api/member/installations?user_id=...POST /api/member/installations/refreshPOST /api/member/installations/uninstallGET /api/member/submissions?user_id=...&status=...&template_id=...&risk_level=...GET /api/member/submissions/detail?user_id=...&submission_id=...GET /api/member/submissions/package/download?user_id=...&submission_id=...GET /api/member/profile-pack/submissions?user_id=...&status=...&pack_id=...&pack_type=...GET /api/member/profile-pack/submissions/detail?user_id=...&submission_id=...POST /api/member/profile-pack/submissions/withdrawGET /api/member/profile-pack/submissions/export/download?user_id=...&submission_id=...
公開アップロード / インストール payload メモ
POST /api/templates/installinstall_options.preflight: boolinstall_options.force_reinstall: boolinstall_options.source_preference: auto|uploaded_submission|generated
POST /api/templates/submitpackage_name + package_base64による直接パッケージ投稿upload_options.scan_mode: strict|balancedupload_options.visibility: community|privateupload_options.replace_existing: boolupload_options.idempotency_keyまたはIdempotency-Keyヘッダーによる安全な再試行
POST /api/profile-pack/submit- 現在ブランチでは
artifact_idが必須 submit_options.pack_type: bot_profile_pack|extension_packsubmit_options.selected_sections: string[]submit_options.redaction_mode: exclude_secrets|exclude_provider|include_provider_no_key|include_encrypted_secretssubmit_options.replace_existing: boolsubmit_options.idempotency_keyまたはIdempotency-Keyヘッダーによる安全な再試行
- 現在ブランチでは
POST /api/member/profile-pack/importsfilename + content_base64で、コミュニティ投稿前の member 所有 import draft を作成
GET /api/member/submissions/package/download- 任意の
Idempotency-Keyヘッダーで重複 download job 生成を抑止 - 成功レスポンスに
X-Sharelife-Transfer-Job-IdとX-Sharelife-Transfer-Statusが付く場合がある
- 任意の
- 直接テンプレートアップロードは
20 MiB上限で、超過時はpackage_too_largeを返します。
Auth Badge Matrix (HTTP)
| Route | Required Role | Deny Behavior |
|---|---|---|
GET /api/ui/capabilities | public | N/A |
POST /api/login | public | 401 invalid_credentials or 429 rate_limited |
GET /api/templates | public | N/A |
GET /api/templates/detail | public | N/A |
GET /api/profile-pack/catalog | public | N/A |
GET /api/profile-pack/catalog/detail | public | N/A |
GET /api/profile-pack/catalog/compare | public | N/A |
GET /api/profile-pack/catalog/insights | public | N/A |
POST /api/trial | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/trial/status | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
POST /api/templates/install | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/templates/package/download | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/notifications | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/preferences | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
POST /api/preferences/mode | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
POST /api/preferences/observe | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/member/tasks | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
POST /api/member/tasks/refresh | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/member/transfers | member | 401 unauthorized or 403 permission_denied |
POST /api/member/transfers/refresh | member | 401 unauthorized or 403 permission_denied |
POST /api/templates/submit | member | 401 unauthorized or 403 permission_denied |
POST /api/profile-pack/submit | member | 401 unauthorized or 403 permission_denied |
POST /api/member/profile-pack/imports | member | 401 unauthorized or 403 permission_denied |
GET /api/member/profile-pack/imports | member | 401 unauthorized or 403 permission_denied |
GET /api/member/installations | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
POST /api/member/installations/refresh | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
POST /api/member/installations/uninstall | member or anonymous allowlist | 401 unauthorized or 403 permission_denied |
GET /api/member/submissions | member | 401 unauthorized or 403 permission_denied |
GET /api/member/submissions/detail | member | 401 unauthorized or 403 permission_denied |
GET /api/member/submissions/package/download | member | 401 unauthorized or 403 permission_denied |
GET /api/member/profile-pack/submissions | member | 401 unauthorized or 403 permission_denied |
GET /api/member/profile-pack/submissions/detail | member | 401 unauthorized or 403 permission_denied |
POST /api/member/profile-pack/submissions/withdraw | member | 401 unauthorized or 403 permission_denied |
GET /api/member/profile-pack/submissions/export/download | member | 401 unauthorized or 403 permission_denied |
All role-deny responses are expected to return error.code=permission_denied.
Error Model
permission_denied:ロールまたは owner binding により現在の操作が拒否される。unauthorized/invalid_credentials:ログインが必要、または資格情報が不正。package_too_large:アップロードパッケージが20 MiB上限を超過。template_not_installable:対象テンプレートが現在インストール不可。profile_pack_source_required:profile-pack 投稿時にartifact_idが未指定。idempotency_key_conflict:同じ冪等キーが別スコープの投稿に再利用された。prompt_injection_detected:スキャンが高リスク信号を検出。現行動作はラベル付与と審査エスカレーションであり、自動削除ではない。
実行時メモ
get_trial_status()とGET /api/trial/statusはnot_started|active|expiredに加えttl_seconds/remaining_secondsを返す。GET /api/ui/capabilitiesはログイン前でも読み取り可能で、UI はこれを元に保護操作の表示・無効化を切り替える。allow_anonymous_member=trueの場合でも、匿名実行できるのは allowlist の操作だけで、要求はanonymous_member_user_idに固定される。GET /api/templatesはcategory、tag、source_channel、review_label、warning_flag、sort_by、sort_orderによるサーバー側フィルタ/ソートをサポートする。- テンプレート一覧と詳細 payload は
category、tags、maintainer、source_channel、および市場ランキング用のengagement集約を返す。 - 現在の
engagementにはtrial_requests、installs、prompt_generations、package_generations、community_submissions、last_activity_atが含まれる。 POST /api/templates/submitとPOST /api/profile-pack/submitは payload オプションまたはIdempotency-Keyヘッダーによる冪等リプレイに対応する。- member タスクルートはページ再読込後でも upload/download 履歴を監査イベントから復元する。
- member transfer ルートは
attempt_count、retry_count、failure_reason、metadataを返し、download トラブルシュートに使える。 - 投稿パッケージ download は transfer-job 情報を payload とレスポンスヘッダーへ付加でき、同一 logical download の安全な再実行に使える。
- member profile-pack import は、コミュニティ投稿されるまで member 所有の draft として保持される。
POST /api/member/profile-pack/submissions/withdrawにより、pending 投稿がキュー処理に入る前に取り下げできる。- member ダウンロード系は owner scope を強制するため、自分の投稿物だけを取得できる。
- 承認、apply/rollback、secret rotation、backup/restore、featured 運用などの特権フローは公開ドキュメントセットの対象外。