Skip to content

レジストリAPIリファレンス

独立した registry サービス (内部ポート 4000、同梱の docker-compose.yml ではホスト側ポート 4001) によって提供されます。メインアプリからは /registry/... 経由のnginxプロキシで、独立した コミュニティサイトからは /api/... 経由でアクセスされます — このリファレンスではサービス自身の パスを直接使用します。

認証 (/api/v1/auth)

メソッド & パス認証説明
POST /auth/register{ email, username, password } → アカウントを作成し、セッションCookieを発行し、確認メールを送信 (または data/outbox/ に書き込み)
POST /auth/login{ email, password } → セッションCookie
POST /auth/logoutセッションセッションCookieをクリア
GET /auth/meセッション現在のユーザー、またはなければ 401
POST /auth/verify-email確認メール内の { token } → アカウントを確認済みとしてマーク
POST /auth/forgot-password{ email } → メールが登録されているかに関わらず常に 200
POST /auth/reset-password{ token, new_password }
GET /auth/githubGitHub OAuthへリダイレクト。運用者が GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET/GITHUB_CALLBACK_URL を設定していない場合は 501 GITHUB_OAUTH_NOT_CONFIGURED
GET /auth/github/callbackOAuthコールバック。アカウントを作成/紐付けし、PUBLIC_APP_URL へリダイレクト

セッションは httpOnly Cookie (datacore_session) で、30日間有効なJWTです。

プラグイン掲載 (/api/v1/registry/plugins)

メソッド & パス認証説明
GET /plugins?q=&tag=一覧取得 (任意でフィルタ)
GET /plugins/{id}1件の掲載を取得
POST /plugins確認済みセッション{ name, description, version, repo_url, docker_image?, homepage_url?, tags? }author はログイン中のアカウントから導出され、送信されるものではない
DELETE /plugins/{id}確認済みセッション、所有者のみそれ以外は 403 NOT_OWNER

DataCoreバンドル (/api/v1/registry/bundles)

メソッド & パス認証説明
GET /bundles?q=&trigger_type=一覧取得 (任意でフィルタ。バンドルの pipelines[] のいずれかがその trigger_type を持てば一致)
GET /bundles/{id}1件のバンドルを取得。完全な pipelines[]resources[] を含む
POST /bundles確認済みセッション下記の形式を参照
DELETE /bundles/{id}確認済みセッション、所有者のみそれ以外は 403 NOT_OWNER

POST /bundles のボディ — バンドルはエクスポート元のローカルパイプライン一覧全体を運びます。 単一のパイプラインではありません:

json
{
  "name": "Full Warehouse Export",
  "description": "...",
  "pipelines": [
    {
      "name": "Standard Markdown Ingestion",
      "trigger_type": "MARKDOWN",
      "steps": [
        { "plugin_name": "Markdown Summarizer", "plugin_repo_url": "https://github.com/...", "max_attempts": 3 }
      ]
    },
    {
      "name": "GitHub Profile Analysis",
      "trigger_type": "GITHUB_REPO",
      "steps": [
        { "plugin_name": "GitHub Profile Scanner", "plugin_repo_url": "https://github.com/..." }
      ]
    }
  ],
  "resources": [
    { "name": "README", "type": "MARKDOWN", "source_uri": "https://raw.githubusercontent.com/..." },
    { "name": "My GitHub", "type": "GITHUB_REPO", "source_uri": "https://github.com/octocat" }
  ],
  "tags": ["starter"]
}

pipelines は空でない配列でなければならず (最大20件)、同じ trigger_type を持つエントリが2つ以上 あってはならず、各 steps[].plugin_repo_url は有効な http(s) URLでなければなりません。すべての resources[].type は、バンドルの pipelines のいずれかの trigger_type と一致する必要があります。 完全なユーザー向けフローについてはバンドルの共有とインポートを参照して ください。

共通のエラー形式

json
{ "error": { "code": "STRING_CODE", "message": "Human readable message" } }

主なコード: NOT_AUTHENTICATED (401、セッションなし)、EMAIL_NOT_VERIFIED (403)、NOT_OWNER (403)、RATE_LIMITED (429 — IPごとに20件の投稿/時間、または20回の認証試行/15分)、 INVALID_LISTING / INVALID_BUNDLE (400)。