> ## Documentation Index
> Fetch the complete documentation index at: https://documents.trocco.io/llms.txt
> Use this file to discover all available pages before exploring further.
# dbt Gitリポジトリ更新
> dbt Gitリポジトリを更新します。
`adapter_type`は作成時のみ指定可能で、後から変更できません。リクエストボディに含めると 400 が返ります(GETレスポンスをそのままPATCHに送り返す場合は`adapter_type`を除外してください)。
## OpenAPI
````json PATCH /api/dbt_git_repositories/{dbt_git_repository_id}
{
"openapi": "3.0.3",
"info": {
"title": "trocco APIリファレンス",
"description": "trocco APIリファレンス",
"version": "0.0.1"
},
"servers": [
{
"url": "https://trocco.io"
}
],
"security": [
{
"ApiKeyAuth": []
}
],
"tags": [
{
"name": "users",
"description": "ユーザー",
"externalDocs": {
"url": "https://documents.trocco.io/docs/about-account-user"
}
},
{
"name": "teams",
"description": "チーム",
"externalDocs": {
"url": "https://documents.trocco.io/docs/team"
}
},
{
"name": "connections",
"description": "接続情報",
"externalDocs": {
"url": "https://documents.trocco.io/docs/connection-configurations"
}
},
{
"name": "custom_connectors",
"description": "カスタムコネクタ定義"
},
{
"name": "datamart_definitions",
"description": "データマート定義",
"externalDocs": {
"url": "https://documents.trocco.io/docs/data-mart"
}
},
{
"name": "environment_groups",
"description": "環境グループ"
},
{
"name": "environments",
"description": "環境"
},
{
"name": "jobs",
"description": "転送ジョブ",
"externalDocs": {
"url": "https://documents.trocco.io/docs/etl-configuration"
}
},
{
"name": "pipeline_jobs",
"description": "ワークフロージョブ",
"externalDocs": {
"url": "https://documents.trocco.io/docs/about-workflow"
}
},
{
"name": "resource_groups",
"description": "リソースグループ",
"externalDocs": {
"url": "https://documents.trocco.io/docs/resource-group"
}
},
{
"name": "dbt_git_repositories",
"description": "dbt Gitリポジトリ"
},
{
"name": "dbt_job_definitions",
"description": "dbtジョブ設定",
"externalDocs": {
"url": "https://documents.trocco.io/docs/dbt-job-configuration"
}
},
{
"name": "dbt_jobs",
"description": "dbtジョブ",
"externalDocs": {
"url": "https://documents.trocco.io/docs/dbt-job-configuration"
}
},
{
"name": "notification_destinations",
"description": "通知先",
"externalDocs": {
"url": "https://documents.trocco.io/docs/trocco-tutorial-additional-settings"
}
}
],
"externalDocs": {
"description": "trocco APIについて",
"url": "https://documents.trocco.io/docs/trocco-api"
},
"paths": {
"/api/dbt_git_repositories/{dbt_git_repository_id}": {
"patch": {
"summary": "dbt Gitリポジトリ更新",
"description": "dbt Gitリポジトリを更新します。
\n`adapter_type`は作成時のみ指定可能で、後から変更できません。リクエストボディに含めると 400 が返ります(GETレスポンスをそのままPATCHに送り返す場合は`adapter_type`を除外してください)。\n",
"operationId": "updateDbtGitRepository",
"tags": [
"dbt_git_repositories"
],
"parameters": [
{
"name": "dbt_git_repository_id",
"in": "path",
"description": "dbt Gitリポジトリ ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "sample_repository"
},
"description": {
"type": "string",
"example": "サンプルリポジトリ"
},
"dbt_version": {
"type": "string",
"enum": [
"1.8",
"1.9",
"1.10",
"1.11",
"1.12"
],
"example": "1.12"
},
"url": {
"type": "string",
"example": "git@github.com:trocco-io/dbt-sample.git"
},
"ref_type": {
"description": "参照タイプ。`branch` / `tag` / `commit_hash` のいずれか。
\n指定した `ref_type` に対応する値(`branch` / `tag` / `commit_hash`)も合わせて指定してください。\n",
"type": "string",
"enum": [
"branch",
"tag",
"commit_hash"
],
"example": "branch"
},
"branch": {
"type": "string",
"example": "main"
},
"tag": {
"type": "string",
"example": "v1.0.0"
},
"commit_hash": {
"type": "string",
"example": "0123456789abcdef0123456789abcdef01234567"
},
"subdirectory": {
"type": "string",
"example": "dbt/"
},
"resource_group_id": {
"description": "リソースグループID。`null` を指定すると所属リソースグループを解除します。\n",
"type": "integer",
"format": "int64",
"nullable": true,
"example": 1
}
}
}
}
}
},
"responses": {
"200": {
"description": "更新したdbt Gitリポジトリの詳細を返します。",
"content": {
"application/json": {
"schema": {
"title": "DbtGitRepository",
"type": "object",
"properties": {
"id": {
"description": "dbt Gitリポジトリ ID",
"type": "integer",
"format": "int64",
"example": 1
},
"name": {
"description": "dbt Gitリポジトリ名",
"type": "string",
"example": "sample_repository"
},
"description": {
"description": "説明",
"type": "string",
"nullable": true,
"example": "サンプルリポジトリ"
},
"adapter_type": {
"description": "アダプタータイプ。作成時にのみ指定可能で、後から変更できません。\n",
"type": "string",
"enum": [
"bigquery",
"snowflake",
"redshift"
],
"example": "bigquery"
},
"dbt_version": {
"description": "dbtバージョン",
"type": "string",
"enum": [
"1.8",
"1.9",
"1.10",
"1.11",
"1.12"
],
"example": "1.12"
},
"url": {
"description": "GitリポジトリのURL",
"type": "string",
"example": "git@github.com:trocco-io/dbt-sample.git"
},
"ref_type": {
"description": "参照タイプ。`branch` の場合は `branch`、`tag` の場合は `tag`、`commit_hash` の場合は `commit_hash` の値を使用します。\n",
"type": "string",
"enum": [
"branch",
"tag",
"commit_hash"
],
"example": "branch"
},
"branch": {
"description": "同期対象のブランチ名(`ref_type` が `branch` の場合に使用)",
"type": "string",
"nullable": true,
"example": "main"
},
"tag": {
"description": "同期対象のタグ名(`ref_type` が `tag` の場合に使用)",
"type": "string",
"nullable": true,
"example": "v1.0.0"
},
"commit_hash": {
"description": "同期対象のコミットハッシュ(`ref_type` が `commit_hash` の場合に使用、40桁の16進数)",
"type": "string",
"nullable": true,
"example": "0123456789abcdef0123456789abcdef01234567"
},
"subdirectory": {
"description": "Gitリポジトリ内でdbtプロジェクトが配置されているサブディレクトリ",
"type": "string",
"nullable": true,
"example": "dbt/"
},
"resource_group_id": {
"description": "リソースグループID",
"type": "integer",
"format": "int64",
"nullable": true,
"example": 1
},
"public_deploy_key": {
"description": "TROCCOが生成した公開デプロイキー(SSH公開鍵)。
\nGitホスト側にデプロイキーとして登録することで、TROCCOがリポジトリにアクセスできるようになります。\n",
"type": "string",
"nullable": true,
"example": "ssh-rsa AAAAB3NzaC1yc2E... trocco_dbt_git_repository"
},
"deploy_key_fingerprint": {
"description": "公開デプロイキーのSHA256フィンガープリント。",
"type": "string",
"nullable": true,
"example": "SHA256:abc123..."
},
"created_at": {
"description": "作成日時",
"type": "string",
"example": "2023-08-22T18:00:00+00:00"
},
"updated_at": {
"description": "更新日時",
"type": "string",
"example": "2023-08-22T18:00:00+00:00"
}
},
"required": [
"id",
"name",
"adapter_type",
"dbt_version",
"url",
"ref_type",
"created_at",
"updated_at"
]
}
}
}
},
"400": {
"description": "不正なリクエストです。
\nリクエストボディに`adapter_type`が含まれている場合、`adapter_type cannot be modified after creation` が返ります。\n"
},
"401": {
"description": "API KEYが不正です。\n"
},
"403": {
"description": "dbt Gitリポジトリ更新権限がありません。\n"
},
"404": {
"description": "指定したdbt Gitリポジトリ、または指定した`resource_group_id`が存在しません。\n"
}
}
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "認証キーとなるAPI KEYをAuthorization: Token {{API KEY}}の形式でヘッダーにセットします。
\nAPI KEYがabc123の場合は、Authorization: Token abc123とします。
\nAPI KEYの作成方法は、TROCCO API KEYの作成を参照ください。\n"
}
}
}
}
````