レシピ

このページは機械翻訳により提供されています。翻訳内容と英語版に相違がある場合は、英語版が優先されます。

このリソースを使用して、プログラムでレシピを管理します。

レート制限

レシピリソースには、次のレート制限があります:

タイプリソース制限
POSTForce an on-demand run of a recipe:
/api/recipes/:recipe_id/force_run
1秒あたり1リクエスト
POSTレシピを作成:
/api/recipes
1秒あたり1リクエスト
POSTレシピ健全性の分析を開始:
/api/recipes/:recipe_id/health
1分あたり20リクエスト
すべてその他すべてのレシピエンドポイント1分あたり60リクエスト

クイックリファレンス

プライベートベータ

次のエンドポイントはプライベートベータ版です:

プライベートベータ機能はプロダクションで利用できますが、選定されたお客様のみが対象です。 お客様はオプトインし、ベータへの参加を承認される必要があります。

プライベートベータ期間中、Workatoは事前の通知なしに機能を更新したり、提供状況を変更したりする場合があります。

タイプリソース説明
GET/api/recipes/:idレシピの詳細を取得します。
POST/api/recipesレシピを作成します。
POST/api/recipes/:id/copyレシピをコピーします。
PUT/api/recipes/:idレシピを更新します。
GET/api/recipesユーザーに属するレシピを一覧表示します。
PUT/api/recipes/:id/startスタートレシピ。
PUT/api/recipes/:id/stopレシピを停止します。
DELETE/api/recipes/:idレシピを削除します。
POST/api/recipes/:recipe_id/reset_triggerレシピトリガーをリセットします。
PUT/api/recipes/:recipe_id/connect停止中のレシピ内のアプリケーションのコネクションを更新します。
POST/api/recipes/:recipe_id/poll_nowレシピのポーリングトリガーをアクティブ化します。
GET/api/recipes/:recipe_id/versionsレシピのバージョンを取得します。
GET/api/recipes/:recipe_id/versions/:idレシピバージョンの詳細を取得します。
PATCH/PUT/api/recipes/:recipe_id/versions/:idレシピバージョンのコメントを更新します。
GET/api/recipes/:recipe_id/healthレシピの最新の最適化レポートを取得します。
POST/api/recipes/:recipe_id/healthPerformance Copilotを使用してパフォーマンススキャンをキューに追加します。

レシピの詳細を取得

レシピオブジェクトの詳細を返します。 ライフタイムタスク数には、2021年03月19日以降のタスクデータが含まれます。

shell
GET /api/recipes/:id

URLパラメーター

名前タイプ説明
idinteger
required
レシピID。

クエリパラメーター

名前タイプ説明
includes[]array of strings
optional
レスポンスに含める追加フィールドを指定します。 値としてtagsを受け入れます。 リクエストでtagsを指定すると、レスポンスにはレシピのtagsフィールドが含まれます。 このフィールドには、0個以上のタグハンドル(文字列)の配列が含まれます。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/recipes/12389?includes[]=tags' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
    "id": 12389,
    "user_id": 4848,
    "name": "新しいWebhook呼び出しがJIRAチケット情報を取得します",
    "created_at": "2016-08-03T11:06:23.950-07:00",
    "updated_at": "2021-11-29T23:31:58.735-08:00",
    "copy_count": 3,
    "trigger_application": "workato_webhooks",
    "action_applications": [
        "jira"
    ],
    "applications": [
        "workato_webhooks",
        "jira"
    ],
    "description": "新しいWebhook呼び出しがJIRAチケット情報を取得します",
    "project_id": 13595198,
    "parameters_schema": [],
    "parameters": {},
    "folder_id": 4724,
    "running": false,
    "job_succeeded_count": 0,
    "job_failed_count": 0,
    "lifetime_task_count": 0,
    "last_run_at": "2016-08-03T11:06:51.481-07:00",
    "last_job_started_at": "2016-08-03T11:06:45.000-07:00",
    "stopped_at": "2016-08-03T11:22:57.285-07:00",
    "webhook_url": "https://www.workato.com/webhooks/rest/51b6a38f-0102-494d-8290-9d550aeeab3c/webhook_recipe",
    "stop_cause": null,
    "config": [
        {
            "keyword": "application",
            "name": "jira",
            "provider": "jira",
            "skip_validation": false,
            "account_id": null
        },
        {
            "keyword": "application",
            "name": "workato_webhooks",
            "provider": "workato_webhooks",
            "skip_validation": false,
            "account_id": null
        }
    ],
    "trigger_closure": null,
    "code": "...truncated...",
    "version_no": 2,
    "version_author_name": "Jennifer Diaz",
    "version_author_email": "[email protected]",
    "version_comment": "エラー処理を改善するためにWebhookロジックをリファクタリングし、カスタムJIRAフィールドのサポートを追加しました",
    "author_name": "Kevin Smith",
    "tags": [
        "tag-ANMNxAz9-oYDJRm",
        "tag-ANgeffPL-3gxQwA"
    ]
}

レスポンスフィールド

last_run_atフィールドは、レシピが直近に開始されたときのタイムスタンプを返します。 last_job_started_atフィールドは、レシピの最新ジョブが開始されたときのタイムスタンプを返します。 stopped_atフィールドは、レシピが直近に停止されたときのタイムスタンプを返します。

これらのフィールドは、レシピまたはその最新ジョブがいつ開始または停止したかを示します。 以前のジョブのタイムスタンプは含まれません。

codeフィールドは、各レシピステップの設定を記述するJSON文字列を返します。 codeは、Create recipeおよびUpdate recipeエンドポイントの入力として使用できます。

レシピを作成

リクエスト内のパラメータに基づいて、Workatoでレシピを作成します。

shell
POST /api/recipes

ペイロード

名前タイプ説明
recipeobject
required
レシピオブジェクト。
recipe[name]string
任意
レシピの名前。
recipe[code]string
必須
レシピ行を表すJSON文字列。 既存のレシピのcodeは、レシピの詳細を取得またはユーザーに属するレシピを一覧表示エンドポイントを使用して取得できます。
recipe[config]string
任意
コネクション行を表すJSON文字列。
recipe[folder_id]string
必須
レシピのフォルダ
recipe[description]string
任意
レシピの説明。

2026年05月07日以降、FOLDER_IDが必須

2026年05月07日以降、このエンドポイントではfolder_idパラメータが必須です。 値は、Home assetsフォルダ以外のプロジェクトまたはフォルダを参照する必要があります。 folder_idを省略したリクエスト、またはHome assetsフォルダをターゲットとするリクエストは、エラーを返します。

サンプルリクエスト

shell
curl  -X POST https://www.workato.com/api/recipes \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
             "recipe": {
               "name":"メールを送信",
               "code":"{\"number\":0,\"provider\":\"clock\",\"name\":\"scheduled_event\",\"as\":\"timer\",\"title\":null,\"description\":\"<span class=\\\"provider\\\">トリガー</span>を<span class=\\\"provider\\\">指定したスケジュール</span>で実行\",\"keyword\":\"trigger\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{\"time_unit\":\"minutes\",\"trigger_every\":\"5\"},\"extended_input_schema\":[{\"type\":\"string\",\"name\":\"trigger_every\",\"control_type\":\"integer\",\"label\":\"トリガー間隔\",\"hint\":\"繰り返しスケジュールを定義します。整数のみ入力してください。\\n                        このフィールドは最小5分に設定できます。\",\"default\":\"5\",\"optional\":false,\"extends_schema\":true},{\"type\":\"date_time\",\"name\":\"start_after\",\"control_type\":\"date_time\",\"label\":\"開始日時\",\"hint\":\"開始する日時を設定します。または空白のままにするとすぐに開始します。 <b>レシピが実行またはテストされると、値は変更できません。</b>\",\"optional\":true,\"extends_schema\":true,\"since_field\":true,\"render_input\":\"date_time_conversion\",\"parse_output\":\"date_time_conversion\"}],\"block\":[{\"number\":1,\"provider\":\"email\",\"name\":\"send_mail\",\"as\":\"send_mail\",\"keyword\":\"action\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{\"email_type\":\"html\"},\"uuid\":\"cd865246-ece7-4188-845e-33d021664be3\"}],\"uuid\":\"c4b0778d-5a23-4c52-a5bb-4a99ae5d25ae\"}",
               "config":"[{\"keyword\":\"application\",\"name\":\"clock\",\"provider\":\"clock\"},{\"keyword\":\"application\",\"name\":\"email\",\"provider\":\"email\"}]",
               "folder_id": "17254"
            }
          }'

レスポンス

json
{
  "success": true,
  "id": 116
}

レシピを更新

レシピIDに基づいて指定されたWorkato内の既存のレシピを更新します。 レシピの詳細は、リクエスト内のパラメータに基づいて定義されます。

shell
PUT /api/recipes/:id

URLパラメータ

名前タイプ説明
idinteger
required
レシピID。

ペイロード

名前タイプ説明
recipeobject
optional
レシピオブジェクト。
recipe[name]string
任意
レシピの名前。
recipe[code]string
任意
レシピ行を表すJSON文字列。 既存のレシピのcodeは、レシピの詳細を取得またはユーザーに属するレシピを一覧表示エンドポイントを使用して取得できます。
recipe[config]string
任意
コネクション行を表すJSON文字列。
recipe[folder_id]string
任意
レシピのフォルダ
recipe[description]string
任意
レシピの説明。

サンプルリクエスト

shell
curl  -X PUT 'https://www.workato.com/api/recipes/123421' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
             "recipe": {
               "name":"メールを送信",
               "code":"{\"number\":0,\"provider\":\"clock\",\"name\":\"scheduled_event\",\"as\":\"timer\",\"title\":null,\"description\":\"<span class=\\\"provider\\\">トリガー</span>を<span class=\\\"provider\\\">指定したスケジュール</span>で実行\",\"keyword\":\"trigger\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{\"time_unit\":\"minutes\",\"trigger_every\":\"5\"},\"extended_input_schema\":[{\"type\":\"string\",\"name\":\"trigger_every\",\"control_type\":\"integer\",\"label\":\"トリガー間隔\",\"hint\":\"繰り返しスケジュールを定義します。整数のみ入力してください。\\n                        このフィールドは最小5分に設定できます。\",\"default\":\"5\",\"optional\":false,\"extends_schema\":true},{\"type\":\"date_time\",\"name\":\"start_after\",\"control_type\":\"date_time\",\"label\":\"開始日時\",\"hint\":\"開始する日時を設定します。または空白のままにするとすぐに開始します。 <b>レシピが実行またはテストされると、値は変更できません。</b>\",\"optional\":true,\"extends_schema\":true,\"since_field\":true,\"render_input\":\"date_time_conversion\",\"parse_output\":\"date_time_conversion\"}],\"block\":[{\"number\":1,\"provider\":\"email\",\"name\":\"send_mail\",\"as\":\"send_mail\",\"keyword\":\"action\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{\"email_type\":\"html\"},\"uuid\":\"cd865246-ece7-4188-845e-33d021664be3\"}],\"uuid\":\"c4b0778d-5a23-4c52-a5bb-4a99ae5d25ae\"}",
               "config":"[{\"keyword\":\"application\",\"name\":\"clock\",\"provider\":\"clock\"},{\"keyword\":\"application\",\"name\":\"email\",\"provider\":\"email\"}]",
               "folder_id": "17254"
             }
          }'

レスポンス

json
{
  "success": true
}

実行中のレシピの更新は禁止されています

実行中のレシピへの更新呼び出しはエラーを返します。

レシピをコピー

レシピIDに基づいて指定されたWorkato内の既存のレシピをコピーします。

shell
POST /api/recipes/:id/copy

URLパラメータ

名前タイプ説明
idinteger
required
レシピID。

ペイロード

名前タイプ説明
folder_idstring
必須
コピーされたレシピのフォルダID

2026年05月07日以降、FOLDER_IDが必須

2026年05月07日以降、このエンドポイントではfolder_idパラメータが必須です。 値は、Home assetsフォルダ以外のプロジェクトまたはフォルダを参照する必要があります。 folder_idを省略したリクエスト、またはHome assetsフォルダをターゲットとするリクエストは、エラーを返します。

サンプルリクエスト

shell
curl  -X POST 'https://www.workato.com/api/recipes/123421/copy' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d '{"folder_id": "17254"}'

レスポンス

json
{
  "success": true,
  "new_flow_id": 39404
}

ユーザーに属するレシピを一覧表示

認証済みユーザーに属するレシピの一覧を返します。 レシピはIDの降順で返されます。

shell
GET /api/recipes

クエリパラメータ

名前タイプ説明
adapter_names_allstring
任意
カンマ区切りのアダプター名の一覧。 結果のレシピは、指定されたすべてのアダプターを使用する必要があります。
adapter_names_anystring
任意
カンマ区切りのアダプター名の一覧。 結果のレシピは、指定されたアダプターの少なくとも1つを使用する必要があります。
folder_idstring
任意
指定されたフォルダ内のレシピを返します。
with_subfoldersboolean
optional
trueの場合、folder_idで指定されたフォルダのサブフォルダにあるレシピを含めます。 デフォルトはfalseです。
orderstring
任意
順序付け方法を設定します。 使用可能なオプション: activity、default。
pageinteger
optional
ページ番号(デフォルトは1)。
per_pageinteger
optional
ページごとに含めるレシピ数を指定します。 デフォルトは100です。 最大値は100です。
runningboolean
optional
trueの場合、実行中のレシピを返します。
since_idinteger
optional
リクエストで指定されたIDより小さいIDを持つレシピを取得するには、このパラメータを使用します。 たとえば、since_id=15500の場合、Workatoは15500より小さいID(0-14999)を持つすべてのレシピを返します。
stopped_afterstring
任意
指定した日時より後に停止されたもののみを除外するように、レシピの一覧をフィルタします。 日時は、次のパターンに従ってISO 8601形式で指定する必要があります: YYYY-MM-DDTHH:MM:SSZ
stop_causestring
任意
レシピが停止した理由。 考えられる理由は次のとおりです:
trigger_errors_limit:連続するトリガーエラーによりレシピが停止されました
action_quota_limit:顧客がプランのタスク制限を超過しました
trial_expired:顧客のトライアル期間が終了しました
txn_quota_limit:顧客がプランのジョブ制限を超過しました
updated_afterstring
任意
指定した日時より後に更新されたもののみを含めるように、レシピの一覧をフィルタします。 日時は、次のパターンに従ってISO 8601形式で指定する必要があります: YYYY-MM-DDTHH:MM:SSZ
includes[]array of strings
optional
レスポンスに含める追加フィールドを指定します。 値としてtagsを受け入れます。 リクエストでtagsを指定すると、レスポンスには各レシピのtagsフィールドが含まれます。 このフィールドには、0個以上のタグハンドル(文字列)の配列が含まれます。
exclude_codeboolean
optional
レスポンスからレシピのコードを除外するかどうかを示します。 これにより、レシピに複雑または長いコードがある場合のタイムアウトや500エラーを回避できます。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/recipes?folder_id=27180380&with_subfolders=true&includes[]=tags' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
    "items": [
        {
            "id": 66876978,
            "user_id": 6471278,
            "name": "HubSpotからMailchimpへ新規連絡先を同期",
            "created_at": "2025-10-15T13:41:05.207-07:00",
            "updated_at": "2025-10-15T13:41:05.207-07:00",
            "copy_count": 1,
            "trigger_application": "hubspot",
            "action_applications": [
                "mailchimp"
            ],
            "applications": [
                "hubspot",
                "mailchimp"
            ],
            "description": "HubSpotで新しい連絡先が作成されたら、Mailchimpのニュースレターリストに追加します。",
            "project_id": 13595198,
            "parameters_schema": [],
            "parameters": {},
            "webhook_url": null,
            "folder_id": 27180381,
            "running": false,
            "job_succeeded_count": 0,
            "job_failed_count": 0,
            "lifetime_task_count": 0,
            "last_run_at": null,
            "stopped_at": null,
            "version_no": 1,
            "stop_cause": null,
            "config": [
                {
                    "keyword": "application",
                    "name": "hubspot",
                    "provider": "hubspot",
                    "account_id": 18253670,
                    "skip_validation": false
                },
                {
                    "keyword": "application",
                    "name": "mailchimp",
                    "provider": "mailchimp",
                    "account_id": 18253671,
                    "skip_validation": false
                }
            ],
            "trigger_closure": null,
            "code": "...truncated...",
            "author_name": "Sales",
            "version_author_name": "Alex",
            "version_author_email": "[email protected]",
            "version_comment": null,
            "tags": [
                "tag-BNgeffPL-4hxRwB"
            ]
        },
        {
            "id": 66870000,
            "user_id": 6471278,
            "name": "Salesforceで新しいリードが作成されたらSlack通知を投稿",
            "created_at": "2025-10-15T10:47:45.142-07:00",
            "updated_at": "2025-10-15T10:57:36.857-07:00",
            "copy_count": 1,
            "trigger_application": "salesforce",
            "action_applications": [
                "slack"
            ],
            "applications": [
                "salesforce",
                "slack"
            ],
            "description": "1. Salesforceで新しいリードが作成されます。\n2. Workatoがリードの詳細を含むメッセージをSlackに投稿します。",
            "project_id": 13595198,
            "parameters_schema": [],
            "parameters": {},
            "webhook_url": null,
            "folder_id": 27180380,
            "running": false,
            "job_succeeded_count": 1,
            "job_failed_count": 0,
            "lifetime_task_count": 3,
            "last_run_at": "2025-10-15T10:51:29.528-07:00",
            "last_job_started_at": "2025-10-15T10:50:00.000-07:00"
            "stopped_at": "2025-10-15T10:54:29.298-07:00",
            "version_no": 6,
            "stop_cause": null,
            "config": [
                {
                    "keyword": "application",
                    "name": "salesforce",
                    "provider": "salesforce",
                    "account_id": 18253669,
                    "skip_validation": false
                },
                {
                    "keyword": "application",
                    "name": "slack",
                    "provider": "slack",
                    "account_id": 18253665,
                    "skip_validation": false
                }
            ],
            "trigger_closure": null,
            "code": "...truncated...",
            "author_name": "Sales",
            "version_author_name": "Alex",
            "version_author_email": "[email protected]",
            "version_comment": null,
            "tags": [
                "tag-ANMNxAz9-oYDJRm",
                "tag-ANgeffPL-3gxQwA"
            ]
        }
    ],
    "count": 2,
    "page": 1,
    "per_page": 100
}

レスポンスフィールド

last_run_atフィールドは、レシピが直近に開始されたときのタイムスタンプを返します。 last_job_started_atフィールドは、レシピの最新ジョブが開始されたときのタイムスタンプを返します。 stopped_atフィールドは、レシピが直近に停止されたときのタイムスタンプを返します。

これらのフィールドは、レシピまたはその最新ジョブがいつ開始または停止したかを示します。 以前のジョブのタイムスタンプは含まれません。

codeフィールドは、各レシピステップの設定を記述するJSON文字列を返します。 codeは、Create recipeおよびUpdate recipeエンドポイントの入力として使用できます。

レシピを開始

レシピIDで指定されたレシピを開始します。

shell
PUT /api/recipes/:id/start

URLパラメータ

名前タイプ説明
idinteger
optional
レシピID。

サンプルリクエスト

shell
curl  -X PUT https://www.workato.com/api/recipes/<recipe_id>/start \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
  "success": true
}

レシピを停止

レシピIDで指定されたレシピを停止します。

shell
PUT /api/recipes/:id/stop

URLパラメータ

名前タイプ説明
idinteger
optional
レシピID。

サンプルリクエスト

shell
curl  -X PUT https://www.workato.com/api/recipes/<recipe_id>/stop \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
  "success": true
}

レシピを削除

IDで指定されたレシピを削除します。

shell
DELETE /api/recipes/:id

URLパラメータ

名前タイプ説明
idinteger
optional
レシピID。

サンプルリクエスト

shell
curl  -X DELETE https://www.workato.com/api/recipes/<recipe_id> \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
  "success": true
}

レシピトリガーをリセット

レシピIDでレシピトリガーカーソルをリセットします。 このエンドポイントを使用して、ソースアプリケーションからデータを再同期します。 再同期ではすべてのレコードが再度処理されるため、レシピは重複レコードを処理できるように設計する必要があります。 データオーケストレーションシナリオ以外でこのエンドポイントを使用すると、データの損失や破損などの意図しない動作が発生する可能性があります。 レシピトリガーをリセットしてもジョブ履歴は保持され、レシピの活動監査ログにイベントが記録されます。

アクティブなレシピのトリガーをリセットすると、Workatoはまずrunning、deferred、またはpendingステータスのすべてのジョブを完了します。 その後、リセットトリガーによって作成された新しいジョブに進みます。

トリガーの互換性

このエンドポイントは、ポーリングトリガーおよびスケジュールトリガーとのみ互換性があります。 他のトリガーをリセットしても効果がない場合や、意図しない動作を引き起こす場合があります。 これらのトリガーには次が含まれます:

  • フォルダ内の新しいCSVファイルトリガー
  • 関数トリガー
  • APIトリガー
  • レシピOpsトリガー
  • Workbotトリガー
  • 非推奨のKafkaトリガー(最新のトリガーと互換性あり)
shell
POST /api/recipes/:recipe_id/reset_trigger

URLパラメータ

名前タイプ説明
recipe_idinteger
required
リセットするレシピのID。

サンプルリクエスト

shell
curl  -X POST 'https://www.workato.com/api/recipes/91929/reset_trigger' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
    "success": true
}

レシピのコネクションを更新

停止中のレシピ内の特定のコネクターについて、選択したコネクションを更新します。

shell
PUT /api/recipes/:recipe_id/connect

URLパラメータ

名前タイプ説明
recipe_idinteger
required
レシピのID。

ペイロード

名前タイプ説明
adapter_namestring
必須
コネクターの内部名。 例: salesforce
connection_idinteger
required
既存のコネクションを置き換えるコネクションのID。

サンプルリクエスト

shell
curl  -X PUT 'https://www.workato.com/api/recipes/123421/connect' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
          "adapter_name": "salesforce",
          "connection_id": 772461
      }'

レスポンス

json
{
    "success": true
}

レシピのポーリングトリガーをアクティブ化

レシピIDを指定して、ポーリングトリガーを持つレシピのポーリング機能を開始します。 このアクションにより、レシピのポーリングトリガーが即座に実行されます。

特定のレシピのステータスを確認するには、ジョブAPIを使用します。

shell
POST /api/recipes/:recipe_id/poll_now

パスパラメーター

名前タイプ説明
recipe_idinteger
required
開始する予定のレシピのID。

サンプルリクエスト

shell
curl  -X POST https://www.workato.com/api/recipes/12345/poll_now \
      -H 'Authorization: Bearer <api_token>'

レスポンス

ジョブが開始されました

json
{
    "success": true
}

ジョブはすでに進行中です

json
{
    "message": "Recipe is currently in trigger back off mode till 2023-06-23T23:02" }
}

エラーコード

名前説明サンプル返信
404見つかりません{"success": false, "message": "Not Found"}
429リクエストが多すぎます。 Retry-Afterヘッダーは、新しいリクエストを行う前に待機する時間を指定します。{"message": "Recipe is currently in trigger back off mode till 2023-06-23T11:02"}、または{"message": "Not enough transaction credit"},、または{"message": "Not enough action quota"}
400不正なリクエスト{"message":"Trial has expired"}

レシピバージョンを取得

指定されたレシピのすべてのバージョンに関する詳細情報を取得します。

shell
GET /api/recipes/:recipe_id/versions

URLパラメータ

名前タイプ説明
recipe_idstring
必須
バージョン詳細を取得する予定のレシピのID。

クエリパラメータ

名前タイプ説明
pageinteger
optional
ページ番号。 デフォルトは1です。
per_pageinteger
optional
ページサイズ。 デフォルトは100です。 最大値は100です。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/recipes/12389/versions' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

json
{
    "data": [
        {
            "id": 397103,
            "comment": "役割に基づいて新入社員のオンボーディング用の新しいSlackチャンネルを含めるようにレシピを更新しました",
            "version_no": 2,
            "author_name": "Alex",
            "author_email": "[email protected]",
            "created_at": "2024-08-03T11:06:23.950-07:00",
            "updated_at": "2024-08-04T23:31:58.735-07:00"
        },
        {
            "id": 392814,
            "comment": "部門と役割に基づくチャンネル作成を含む、新入社員のオンボーディング用Slackチャンネルの初期設定",
            "version_no": 1,
            "author_name": "Alex",
            "author_email": "[email protected]",
            "created_at": "2024-08-03T11:06:23.950-07:00",
            "updated_at": "2024-08-03T11:06:23.950-07:00"
        }
    ]
}

特定のレシピバージョンを取得

特定のレシピバージョンに関する詳細情報を取得します。

shell
GET /api/recipes/:recipe_id/versions/:id

URLパラメータ

名前タイプ説明
recipe_idstring
必須
バージョン詳細を取得する予定のレシピのID。
idstring
必須
詳細を取得する予定のレシピバージョンのID。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/recipes/12389/versions/397103' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

200 OK

成功した場合、APIは200 OKステータスと、レシピバージョンの詳細を含むJSONレスポンスを返します:

json
{
    "data": [
        {
            "id": 397103,
            "comment": "役割に基づいて新入社員のオンボーディング用の新しいSlackチャンネルを含めるようにレシピを更新しました",
            "version_no": 2,
            "author_name": "Alex",
            "author_email": "[email protected]",
            "created_at": "2024-08-04T23:31:58.735-07:00",
            "updated_at": "2024-08-04T23:31:58.735-07:00"
        }
    ]
}
404 NOT FOUND

存在しない値や一致しない値(不正なレシピIDまたはバージョンIDなど)を指定すると、APIは404 Not Foundエラーを返します:

json
{
    "message": "Not found"
}

レシピバージョンのコメントを更新

特定のレシピバージョンのコメントを更新します。 このエンドポイントは、バージョン自体ではなく、バージョンに関連付けられたコメントのみを変更します。

shell
PATCH/PUT /api/recipes/:recipe_id/versions/:id

URLパラメータ

名前タイプ説明
recipe_idstring
必須
バージョン詳細を取得する予定のレシピのID。
idstring
必須
コメントを更新する予定のレシピバージョンのID。

ペイロード

名前タイプ説明
commentstring
必須
レシピバージョンの新しいコメント。 255文字以下である必要があります。

サンプルリクエスト

shell
curl  -X PATCH 'https://www.workato.com/api/recipes/12389/versions/397103' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
                "comment": "Refined the Slack channel setup for onboarding to ensure channels are created accurately based on employee roles and departments"
           }'

レスポンス

200 OK

成功した場合、APIは200 OKステータスと、更新されたレシピバージョンの詳細を含むJSONレスポンスを返します:

json
{
    "data": [
        {
            "id": 397103,
            "comment": "従業員の役割と部門に基づいてチャンネルが正確に作成されるように、オンボーディング用Slackチャンネルの設定を改善しました",
            "version_no": 2,
            "author_name": "Alex",
            "author_email": "[email protected]",
            "created_at": "2024-08-04T23:31:58.735-07:00",
            "updated_at": "2024-08-07T23:31:58.735-07:00"
        }
    ]
}
404 NOT FOUND

存在しない値や一致しない値(不正なレシピIDまたはバージョンIDなど)を指定すると、APIは404 Not Foundエラーを返します:

json
{
    "message": "Not found"
}
422 UNPROCESSABLE ENTITY

APIは、次のシナリオで422 Unprocessable Entityエラーを返します:

コメントが255文字を超えています

このエラーは、レシピバージョンのコメントが255文字を超える場合に発生します:

json
{
  "errors": [
        {
            "code": "validation_error",
            "title": "Comment is too long (maximum is 255 characters)",
            "detail": null
        }
    ]
}

コメントがありません

このエラーは、リクエストペイロードにレシピバージョンのコメントがない場合に発生します:

json
{
  "errors": [
        {
            "code": "validation_error",
            "title": "Missing parameter comment",
            "detail": null
        }
    ]
}

レシピヘルスを取得

このエンドポイントは、レシピの最新の最適化レポートを取得します。 レポートには、Performance Copilotによって実行されたチェック、ルール違反、合計スコアが含まれます。

shell
GET /api/recipes/:recipe_id/health

最適化データがありません

パフォーマンスレポートを生成するには、レシピエディターまたはAPIを使用してスキャンを実行する必要があります。 スキャンを実行しない場合、このエンドポイントはnullを返します。

URLパラメータ

名前タイプ説明
recipe_idinteger
required
パフォーマンスデータを取得するレシピのID。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/recipes/12389/health' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

このエンドポイントは、レシピの最新のパフォーマンスレポートを返します。 レポートには次の情報が含まれます:

  • 関連するルールを持つチェックの一覧
  • 説明と提案を含むルール違反
  • 合計スコアと影響の内訳を含むサマリーレポート

レスポンスでは、各ruleにそれを一意に識別するuuidが含まれ、各violationには特定のインスタンスを識別する独自のuuidがあります。 空のviolations配列は、そのルールで問題が見つからなかったことを意味します。 空でない配列は、1つ以上の違反を示します。

json
{
    "data": {
        "checks": [
            {
                "rule": {
                    "uuid": "067e2484-fe30-76b3-8000-2434f39f5b38",
                    "title": "冗長なログ記録",
                    "category": "cost",
                    "impact": "low",
                    "effort": "low",
                    "level": "single_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "01960e61-71ec-77d1-bd0f-6cbe8c830a28",
                    "title": "非推奨のトリガーの使用",
                    "category": "performance",
                    "impact": "high",
                    "effort": "medium",
                    "level": "single_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "01963843-d38b-7563-b55e-743ab422f523",
                    "title": "エラー処理の欠落",
                    "category": "quality",
                    "impact": "medium",
                    "effort": "low",
                    "level": "multi_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "067e2486-e64b-704a-8000-dc8b1345d458",
                    "title": "未使用変数の検出",
                    "category": "cost",
                    "impact": "low",
                    "effort": "low",
                    "level": "single_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "067e247e-0feb-7e9c-8000-3ebb0e739bcb",
                    "title": "アクションのないエラー処理ブロック",
                    "category": "quality",
                    "impact": "medium",
                    "effort": "low",
                    "level": "single_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "067e2483-75cd-7df8-8000-f5d2b6b8c29c",
                    "title": "レシピが長すぎます",
                    "category": "quality",
                    "impact": "medium",
                    "effort": "medium",
                    "level": "recipe",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "067e2485-f748-7ecd-8000-f11fdbb50534",
                    "title": "非推奨のアクションの使用",
                    "category": "performance",
                    "impact": "high",
                    "effort": "medium",
                    "level": "single_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "019623c4-ce85-7952-93c2-3236982732a7",
                    "title": "レシピ説明の欠落",
                    "category": "quality",
                    "impact": "low",
                    "effort": "low",
                    "level": "recipe",
                    "is_copilot_reparable": false
                },
                "violations": [
                    {
                        "uuid": "572d474c-e775-488b-b4ac-339642bf6c5f",
                        "explanation": "明確な説明がないレシピは、チームメンバーが理解、保守、トラブルシューティングを行うことが難しく、ナレッジサイロが発生し、サポートのオーバーヘッドが増加します。",
                        "suggestion": "将来の保守担当者に向けて、レシピの目的、ビジネスコンテキスト、依存関係、特別な考慮事項を概説した包括的な説明を追加します。",
                        "level": "recipe",
                        "locations": []
                    }
                ]
            },
            {
                "rule": {
                    "uuid": "067e2482-44d1-7697-8000-d7d3acaf92ab",
                    "title": "非効率なジョブフィルタリング",
                    "category": "performance",
                    "impact": "medium",
                    "effort": "low",
                    "level": "multi_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            },
            {
                "rule": {
                    "uuid": "067e2465-6330-75c8-8000-90900aaf09c1",
                    "title": "連続する変数宣言",
                    "category": "cost",
                    "impact": "medium",
                    "effort": "low",
                    "level": "multi_step",
                    "is_copilot_reparable": false
                },
                "violations": []
            }
        ],
        "report": {
            "total_score": 95,
            "impact": {
                "low": {
                    "total": 3,
                    "broken_rules": 1,
                    "violations": 1,
                    "weight": 2
                },
                "medium": {
                    "total": 5,
                    "broken_rules": 0,
                    "violations": 0,
                    "weight": 5
                },
                "high": {
                    "total": 2,
                    "broken_rules": 0,
                    "violations": 0,
                    "weight": 8
                },
                "critical": {
                    "total": 0,
                    "broken_rules": 0,
                    "violations": 0,
                    "weight": 10
                }
            },
            "completed_at": "2025-04-25T15:42:55.279Z"
        },
        "version": 1
    }
}

レシピヘルスの分析を開始

このエンドポイントは、Performance Copilotによる分析のためにレシピをキューに追加します。 レシピに変更を加えた後、新しいパフォーマンススキャンをリクエストするには、このエンドポイントを使用します。

shell
POST /api/recipes/:recipe_id/health

URLパラメータ

名前タイプ説明
recipe_idinteger
required
パフォーマンスの問題についてスキャンするレシピのID。

サンプルリクエスト

shell
curl  -X POST 'https://www.workato.com/api/recipes/12389/health' \
      -H 'Authorization: Bearer <api_token>'

レスポンス

レスポンスは、レシピが分析のキューに正常に追加されたことを確認します。

json
{
    "status": "enqueued"
}

分析が完了した後にパフォーマンスレポートを取得するには、レシピヘルスを取得エンドポイントを使用します。

Last updated: