> ## 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. # 転送先カスタムコネクタ作成 > 転送先カスタムコネクタ定義を作成します。 ## OpenAPI ````json POST /api/custom_connector_outputs { "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/custom_connector_outputs": { "post": { "summary": "転送先カスタムコネクタ作成\n", "description": "転送先カスタムコネクタ定義を作成します。\n", "operationId": "createCustomConnectorOutput", "tags": [ "custom_connectors" ], "requestBody": { "content": { "application/json": { "schema": { "title": "CustomConnectorOutputRequest", "description": "転送先カスタムコネクタ定義の作成/更新リクエストです。", "type": "object", "properties": { "name": { "type": "string", "example": "My Output Connector" }, "description": { "type": "string", "example": "desc", "nullable": true }, "url": { "description": "ベースURLです。http/https のみ、プライベートIPは指定できません。", "type": "string", "example": "https://api.example.com" }, "auth_type": { "type": "string", "enum": [ "api_key", "oauth2" ], "example": "api_key" }, "auth_header_name": { "type": "string", "example": "Authorization" }, "auth_header_scheme": { "type": "string", "example": "Bearer", "nullable": true }, "grant_type": { "type": "string", "enum": [ "authorization_code", "client_credentials" ], "nullable": true }, "auth_uri": { "type": "string", "nullable": true }, "access_token_uri": { "type": "string", "nullable": true }, "endpoints": { "description": "転送先エンドポイント定義の一覧です。\n更新時は省略すると既存のエンドポイントを維持し(差分更新)、指定した場合は\n指定内容で洗い替えします(空配列を指定すると全削除)。\n", "type": "array", "items": { "title": "CustomConnectorOutputEndpointRequest", "description": "転送先エンドポイント定義(作成/更新リクエスト用)です。\n更新時に既存エンドポイントを温存する場合は id を指定します。id を省略すると新規作成されます。\n", "type": "object", "properties": { "id": { "description": "既存エンドポイントのIDです。更新時に温存対象を指定する場合のみ設定します。", "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "create_user" }, "request_type": { "type": "string", "enum": [ "single", "multiple" ], "example": "single" }, "batch_size": { "type": "integer", "example": 1 }, "method": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH" ], "example": "POST" }, "operation": { "type": "string", "enum": [ "create", "update" ], "example": "create" }, "path": { "type": "string", "example": "/users" }, "payload_type": { "type": "string", "enum": [ "json" ], "example": "json" }, "success_codes": { "type": "string", "example": "200,201,204" }, "not_retryable_codes": { "type": "string", "example": "400,401,403,404" }, "request_timeout_sec": { "type": "integer", "example": 30 }, "template": { "type": "string" }, "headers": { "type": "array", "items": { "title": "CustomConnectorEndpointFieldOption", "description": "エンドポイントのパラメータ・ヘッダーで共通のフィールド設定です。", "type": "object", "properties": { "name": { "description": "フィールド名です。", "type": "string", "example": "limit" }, "display_name": { "description": "画面表示名です。", "type": "string", "example": "Limit" }, "default_value": { "description": "デフォルト値です。is_editable が false の場合は必須です。", "type": "string", "example": "100", "nullable": true }, "is_editable": { "description": "転送設定側で編集可能かどうかです。", "type": "boolean", "example": true }, "is_required": { "description": "必須かどうかです。", "type": "boolean", "example": true } }, "required": [ "name", "display_name", "is_editable", "is_required" ] } }, "path_parameters": { "type": "array", "items": { "title": "CustomConnectorEndpointPathParameter", "description": "エンドポイントのパスパラメータです。", "type": "object", "properties": { "name": { "description": "パスパラメータ名です。", "type": "string", "example": "user_id" }, "value": { "description": "値です。エンドポイントの path 内に含まれている必要があります。", "type": "string", "example": "user_id" } }, "required": [ "name", "value" ] } }, "query_parameters": { "type": "array", "items": { "title": "CustomConnectorEndpointFieldOption", "description": "エンドポイントのパラメータ・ヘッダーで共通のフィールド設定です。", "type": "object", "properties": { "name": { "description": "フィールド名です。", "type": "string", "example": "limit" }, "display_name": { "description": "画面表示名です。", "type": "string", "example": "Limit" }, "default_value": { "description": "デフォルト値です。is_editable が false の場合は必須です。", "type": "string", "example": "100", "nullable": true }, "is_editable": { "description": "転送設定側で編集可能かどうかです。", "type": "boolean", "example": true }, "is_required": { "description": "必須かどうかです。", "type": "boolean", "example": true } }, "required": [ "name", "display_name", "is_editable", "is_required" ] } } }, "required": [ "name", "request_type", "method", "operation", "path", "payload_type", "success_codes", "not_retryable_codes", "request_timeout_sec", "template" ] } } }, "required": [ "name", "url", "auth_type" ] } } } }, "responses": { "201": { "description": "作成したカスタムコネクタ定義を返します。", "content": { "application/json": { "schema": { "title": "CustomConnectorOutput", "description": "転送先カスタムコネクタ定義(詳細)です。", "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "My Output Connector" }, "description": { "type": "string", "example": "desc", "nullable": true }, "url": { "type": "string", "example": "https://api.example.com" }, "auth_type": { "type": "string", "enum": [ "api_key", "oauth2" ], "example": "api_key" }, "auth_header_name": { "type": "string", "example": "Authorization" }, "auth_header_scheme": { "type": "string", "example": "Bearer", "nullable": true }, "transfer_type": { "type": "string", "enum": [ "input", "output" ], "example": "output" }, "grant_type": { "type": "string", "nullable": true }, "auth_uri": { "type": "string", "nullable": true }, "access_token_uri": { "type": "string", "nullable": true }, "endpoints": { "description": "転送先エンドポイント一覧です(id 昇順)。", "type": "array", "items": { "title": "CustomConnectorOutputEndpoint", "description": "転送先カスタムコネクタのエンドポイント定義です。", "type": "object", "properties": { "id": { "description": "エンドポイントIDです。更新時にこのIDを指定すると既存エンドポイントが温存されます。", "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "create_user" }, "request_type": { "description": "1レコードずつ送るか複数まとめて送るかです。", "type": "string", "enum": [ "single", "multiple" ], "example": "single" }, "batch_size": { "description": "multiple 時の1リクエストあたり件数(1〜100)です。", "type": "integer", "example": 1 }, "method": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH" ], "example": "POST" }, "operation": { "description": "追加(create)か更新(update)かです。", "type": "string", "enum": [ "create", "update" ], "example": "create" }, "path": { "type": "string", "example": "/users" }, "payload_type": { "type": "string", "enum": [ "json" ], "example": "json" }, "success_codes": { "type": "string", "example": "200,201,204" }, "not_retryable_codes": { "type": "string", "example": "400,401,403,404" }, "request_timeout_sec": { "description": "リクエストタイムアウト秒(1〜60)です。", "type": "integer", "example": 30 }, "template": { "description": "リクエストボディを生成する Liquid テンプレートです。", "type": "string" }, "headers": { "description": "ヘッダー一覧です(作成順)。", "type": "array", "items": { "title": "CustomConnectorEndpointFieldOption", "description": "エンドポイントのパラメータ・ヘッダーで共通のフィールド設定です。", "type": "object", "properties": { "name": { "description": "フィールド名です。", "type": "string", "example": "limit" }, "display_name": { "description": "画面表示名です。", "type": "string", "example": "Limit" }, "default_value": { "description": "デフォルト値です。is_editable が false の場合は必須です。", "type": "string", "example": "100", "nullable": true }, "is_editable": { "description": "転送設定側で編集可能かどうかです。", "type": "boolean", "example": true }, "is_required": { "description": "必須かどうかです。", "type": "boolean", "example": true } }, "required": [ "name", "display_name", "is_editable", "is_required" ] } }, "path_parameters": { "description": "パスパラメータ一覧です(作成順)。", "type": "array", "items": { "title": "CustomConnectorEndpointPathParameter", "description": "エンドポイントのパスパラメータです。", "type": "object", "properties": { "name": { "description": "パスパラメータ名です。", "type": "string", "example": "user_id" }, "value": { "description": "値です。エンドポイントの path 内に含まれている必要があります。", "type": "string", "example": "user_id" } }, "required": [ "name", "value" ] } }, "query_parameters": { "description": "クエリパラメータ一覧です(作成順)。", "type": "array", "items": { "title": "CustomConnectorEndpointFieldOption", "description": "エンドポイントのパラメータ・ヘッダーで共通のフィールド設定です。", "type": "object", "properties": { "name": { "description": "フィールド名です。", "type": "string", "example": "limit" }, "display_name": { "description": "画面表示名です。", "type": "string", "example": "Limit" }, "default_value": { "description": "デフォルト値です。is_editable が false の場合は必須です。", "type": "string", "example": "100", "nullable": true }, "is_editable": { "description": "転送設定側で編集可能かどうかです。", "type": "boolean", "example": true }, "is_required": { "description": "必須かどうかです。", "type": "boolean", "example": true } }, "required": [ "name", "display_name", "is_editable", "is_required" ] } } }, "required": [ "id", "name", "request_type", "method", "operation", "path", "payload_type", "success_codes", "not_retryable_codes", "request_timeout_sec", "template" ] } }, "created_at": { "type": "string", "example": "2023-08-22T18:00:00+00:00" }, "updated_at": { "type": "string", "example": "2023-08-22T18:00:00+00:00" } }, "required": [ "id", "name", "url", "auth_type", "transfer_type", "endpoints", "created_at", "updated_at" ] } } } }, "400": { "description": "Bad request.
\n不正なリクエストです。\n" }, "401": { "description": "Not authenticated.
\n認証エラーです。API KEYをご確認ください。\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" } } } } ````