dbt Gitリポジトリ作成

Prev Next
Post
/api/dbt_git_repositories

dbt Gitリポジトリを作成します。
作成時にTROCCOが自動でSSH鍵ペアを生成します。レスポンスに含まれるpublic_deploy_keyをGitホストにデプロイキーとして登録してください。

Security
API Key: ApiKeyAuth
Header parameter nameAuthorization

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

Body parameters
object
name
string Required

dbt Gitリポジトリ名

Examplesample_repository
description
string

説明

Exampleサンプルリポジトリ
adapter_type
string Required
Valid values[ "bigquery", "snowflake", "redshift" ]
Examplebigquery
dbt_version
string Required
Valid values[ "1.8", "1.9", "1.10", "1.11" ]
Example1.11
url
string Required

GitリポジトリのURL

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

参照タイプ。省略時は branch
branch の場合は branchtag の場合は tagcommit_hash の場合は commit_hash を必ず指定してください。

Valid values[ "branch", "tag", "commit_hash" ]
Default"branch"
Examplebranch
branch
string

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

Examplemain
tag
string

同期対象のタグ名(ref_typetag の場合に必須)

Examplev1.0.0
commit_hash
string

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

Example0123456789abcdef0123456789abcdef01234567
subdirectory
string

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

Exampledbt/
resource_group_id
integer (int64)

リソースグループID

Example1
Responses
201

作成した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

不正なリクエストです。

401

API KEYが不正です。

403

dbt Gitリポジトリ作成権限がありません。

404

指定したresource_group_idが存在しません。