> ## 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ジョブ実行結果取得 > dbtジョブを指定してdbtジョブの実行結果を取得します。
実行されたdbtコマンドやモデル単位の実行結果は、本APIのレスポンスには含まれません。dbtジョブの実行ログを参照ください。
dbtジョブ設定の内容は[dbtジョブ設定詳細取得](#tag/dbt_job_definitions/operation/getDbtJobDefinition)で取得できます。 ## OpenAPI ````json GET /api/dbt_jobs/{dbt_job_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_jobs/{dbt_job_id}": { "get": { "summary": "dbtジョブ実行結果取得", "description": "dbtジョブを指定してdbtジョブの実行結果を取得します。
\n実行されたdbtコマンドやモデル単位の実行結果は、本APIのレスポンスには含まれません。dbtジョブの実行ログを参照ください。
\ndbtジョブ設定の内容は[dbtジョブ設定詳細取得](#tag/dbt_job_definitions/operation/getDbtJobDefinition)で取得できます。\n", "operationId": "getDbtJob", "tags": [ "dbt_jobs" ], "parameters": [ { "name": "dbt_job_id", "description": "dbtジョブIDを指定します。
\nTROCCO画面からIDを確認する場合は、dbtジョブ詳細画面のURL末尾の数値を参照ください。\n", "required": true, "in": "path", "schema": { "type": "integer", "format": "int64" }, "example": 123 } ], "responses": { "200": { "description": "dbtジョブの実行結果を返します。", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "description": "dbtジョブIDです。", "type": "integer", "format": "int64", "example": 123 }, "dbt_job_definition_id": { "description": "dbtジョブ設定IDです。", "type": "integer", "format": "int64", "example": 45 }, "dbt_job_definition_name": { "description": "dbtジョブ設定名です。", "type": "string", "example": "sample-dbt-job-definition-name" }, "dbt_job_definition_revision_id": { "description": "dbtジョブの実行時に使用されたdbtジョブ設定のリビジョンIDです。
\nリビジョン単体を取得するAPIはありません。複数のdbtジョブ間で値を比較することで、dbtジョブ設定が変更されたかどうかを判別するための識別子です。\n", "type": "integer", "format": "int64", "nullable": true, "example": 678 }, "status": { "title": "DbtJobStatus", "description": "dbtジョブのステータスです。\n- `queued` - 実行待機\n- `setting_up` - 実行準備\n- `executing` - 実行中\n- `interrupting` - 実行中断\n- `succeeded` - 実行完了(成功)\n- `error` - 実行完了(エラー)\n- `canceled` - 実行完了(キャンセル)\n- `skipped` - 実行完了(スキップ)\n", "type": "string", "enum": [ "queued", "setting_up", "executing", "interrupting", "succeeded", "error", "canceled", "skipped" ], "example": "succeeded" }, "executor_type": { "description": "dbtジョブの実行経路です。\n- `manual` - 手動実行\n- `scheduler` - スケジュール実行\n- `workflow` - ワークフロー経由の実行\n", "type": "string", "enum": [ "manual", "scheduler", "workflow" ], "example": "workflow" }, "context_time": { "description": "カスタム変数の展開基準となる日時です。手動実行ではdbtジョブの作成日時、ワークフロー経由の実行ではワークフロージョブの基準日時です。
\nタイムゾーンはJST 日本時間(GMT+9)です。\n", "type": "string", "example": "2023-05-19T10:00:00+00:00" }, "started_at": { "description": "dbtジョブのステータスが**実行中**になった日時です。タイムゾーンはJST 日本時間(GMT+9)です。", "type": "string", "nullable": true, "example": "2023-05-19T10:15:00+00:00" }, "finished_at": { "description": "dbtジョブのステータスが**実行完了**になった日時です。タイムゾーンはJST 日本時間(GMT+9)です。", "type": "string", "nullable": true, "example": "2023-05-19T10:20:00+00:00" }, "created_at": { "description": "dbtジョブの作成日時です。タイムゾーンはJST 日本時間(GMT+9)です。", "type": "string", "example": "2023-05-19T10:14:00+00:00" } }, "required": [ "id", "dbt_job_definition_id", "dbt_job_definition_name", "dbt_job_definition_revision_id", "status", "executor_type", "context_time", "started_at", "finished_at", "created_at" ] } } } }, "400": { "description": "/api系の共通エラーレスポンス", "content": { "application/json": { "schema": { "title": "ApiErrorResponse", "type": "object", "properties": { "message": { "type": "string", "example": "不正なリクエストです。" }, "errors": { "type": "array", "description": "400エラー時のみ含まれる。エラーの詳細。", "items": { "type": "object", "properties": { "attribute": { "type": "string", "description": "属性名" }, "message": { "type": "string", "description": "エラーメッセージ" } } } } } } } } }, "401": { "description": "認証エラー", "content": { "application/json": { "schema": { "title": "ErrorResponse401", "type": "object", "properties": { "message": { "type": "string", "example": "アカウント登録もしくはログインしてください。" } } } } } }, "403": { "description": "Forbidden.
\nAPI KEYが不正か、dbtジョブを利用できないアカウントです。\n" }, "404": { "description": "Not found.
\n指定したdbtジョブが存在しません。\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" } } } } ````