dbt Gitリポジトリ更新

Prev Next
Patch
/api/dbt_git_repositories/{dbt_git_repository_id}

dbt Gitリポジトリを更新します。
adapter_typeは作成時のみ指定可能で、後から変更できません。リクエストボディに含めると 400 が返ります(GETレスポンスをそのままPATCHに送り返す場合はadapter_typeを除外してください)。

Security
API Key: ApiKeyAuth
Header parameter nameAuthorization

認証キーとなるAPI KEYをAuthorization: Token {{API KEY}}の形式でヘッダーにセットします。
API KEYがabc123の場合は、Authorization: Token abc123とします。
API KEYの作成方法は、TROCCO API KEYの作成を参照ください。

Path parameters
dbt_git_repository_id
integer (int64) Required

dbt Gitリポジトリ ID

Body parameters
object
name
string
Examplesample_repository
description
string
Exampleサンプルリポジトリ
dbt_version
string
Valid values[ "1.8", "1.9", "1.10", "1.11" ]
Example1.11
url
string
Examplegit@github.com:trocco-io/dbt-sample.git
ref_type
string

参照タイプ。branch / tag / commit_hash のいずれか。
指定した ref_type に対応する値(branch / tag / commit_hash)も合わせて指定してください。

Valid values[ "branch", "tag", "commit_hash" ]
Examplebranch
branch
string
Examplemain
tag
string
Examplev1.0.0
commit_hash
string
Example0123456789abcdef0123456789abcdef01234567
subdirectory
string
Exampledbt/
resource_group_id
integer (int64) | null

リソースグループID。null を指定すると所属リソースグループを解除します。

Example1
Responses
200

更新したdbt Gitリポジトリの詳細を返します。

object
id
integer (int64)

dbt Gitリポジトリ ID

Example1
name
string

dbt Gitリポジトリ名

Examplesample_repository
description
string | null

説明

Exampleサンプルリポジトリ
adapter_type
string

アダプタータイプ。作成時にのみ指定可能で、後から変更できません。

Valid values[ "bigquery", "snowflake", "redshift" ]
Examplebigquery
dbt_version
string

dbtバージョン

Valid values[ "1.8", "1.9", "1.10", "1.11" ]
Example1.11
url
string

GitリポジトリのURL

Examplegit@github.com:trocco-io/dbt-sample.git
ref_type
string

参照タイプ。branch の場合は branchtag の場合は tagcommit_hash の場合は commit_hash の値を使用します。

Valid values[ "branch", "tag", "commit_hash" ]
Examplebranch
branch
string | null

同期対象のブランチ名(ref_typebranch の場合に使用)

Examplemain
tag
string | null

同期対象のタグ名(ref_typetag の場合に使用)

Examplev1.0.0
commit_hash
string | null

同期対象のコミットハッシュ(ref_typecommit_hash の場合に使用、40桁の16進数)

Example0123456789abcdef0123456789abcdef01234567
subdirectory
string | null

Gitリポジトリ内でdbtプロジェクトが配置されているサブディレクトリ

Exampledbt/
resource_group_id
integer (int64) | null

リソースグループID

Example1
public_deploy_key
string | null

TROCCOが生成した公開デプロイキー(SSH公開鍵)。
Gitホスト側にデプロイキーとして登録することで、TROCCOがリポジトリにアクセスできるようになります。

Examplessh-rsa AAAAB3NzaC1yc2E... trocco_dbt_git_repository
deploy_key_fingerprint
string | null

公開デプロイキーのSHA256フィンガープリント。

ExampleSHA256:abc123...
created_at
string

作成日時

Example2023-08-22T18:00:00+00:00
updated_at
string

更新日時

Example2023-08-22T18:00:00+00:00
400

不正なリクエストです。
リクエストボディにadapter_typeが含まれている場合、adapter_type cannot be modified after creation が返ります。

401

API KEYが不正です。

403

dbt Gitリポジトリ更新権限がありません。

404

指定したdbt Gitリポジトリ、または指定したresource_group_idが存在しません。