リポジトリ接続を作成する
POST /api/v1/repository-connections
リポジトリ接続管理のプレビューです。接続の保存はプロバイダーアクセスを検証せず、スキャンを開始しません。ホスト型リポジトリ実行は公開リポジトリでもプロバイダー認証が必要です。スキャン前にアクセス検査エンドポイントを使用してください。公開認証は未設定の下書きを表し、アクセス検査やスキャンは実行できません。GitHub アカウント認可にはプラットフォームの GitHub App 登録とユーザー同意が必要で、PAT アクセスにも対応します。トークンは書き込み専用で、テナント/接続/リビジョンごとに暗号化し、切断時に削除します。読み取り専用でリポジトリ範囲に限定した認証情報を取得し、アカウント全体の書き込み権限は使用しないでください。初期作成は public または token を受け付けます。GitHub 許可は、ブラウザー認可を通じて既存接続に付与します。
許可されるロール: admin.
認証
以下の OpenAPI の選択肢は、受け付ける認証方式を示します。ブラウザーからの変更には、正規の Origin ヘッダーも必要です。
[
{
"organizationCredential": []
},
{
"browserSession": []
}
]
パラメーター
[]
リクエスト本文
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryConnectionCreateInput"
}
}
}
}
レスポンス
{
"201": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RepositoryConnection"
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Missing/expired/revoked credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Insufficient role",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "State or idempotency conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "Body too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported media type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Request budget exhausted; respect Retry-After",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"Retry-After": {
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Seconds until sufficient budget is expected; concurrent traffic may consume replenished capacity."
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
#/components/schemas/Asset などの参照は、共有スキーマで解決されます。クライアント生成には OpenAPI コントラクトをダウンロードしてください。このページは生成されたもので、計画中のエンドポイントではなく、実装済みの開発 API を説明します。