レシピ

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

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

レート制限

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

タイプリソース制限
POSTForce an on-demand run of a recipe:
/api/managed_users/:managed_user_id
/recipes/:recipe_id/force_run
1秒あたり1リクエスト
GET顧客ワークスペース内のレシピを一覧表示:
/api/managed_users/:id/recipes
1分あたり2,000リクエスト
GET顧客ワークスペース内のレシピを取得:
/api/managed_users/:id/recipes
/:recipe_id
1分あたり2,000リクエスト
すべてすべてのレシピバージョンエンドポイント1分あたり60リクエスト
すべてその他すべてのレシピエンドポイント1分あたり1,000リクエスト

クイックリファレンス

タイプリソース説明
GET/api/managed_users/:id/recipes顧客に属するレシピを一覧表示します。
GET/api/managed_users/:id/recipes/:recipe_id顧客に属するレシピの詳細を取得します。
POST/api/managed_users/:managed_user_id/recipes顧客ワークスペース内にレシピを作成します。
PUT/api/managed_users/:id/recipes/:recipe_id顧客ワークスペース内のレシピを更新します。
POST/api/managed_users/:id/recipes/:recipe_id/copy顧客ワークスペース内のレシピをコピーします。
DELETE/api/managed_users/:id/recipes/:recipe_id顧客ワークスペース内のレシピを削除します。
PUT/api/managed_users/:id/recipes/:recipe_id/start顧客ワークスペース内のレシピを開始します。
PUT/api/managed_users/:managed_user_id/recipes/
:recipe_id/stop
顧客ワークスペース内のレシピを停止します。
POST/api/managed_users/:managed_user_id/recipes/
:recipe_id/reset_trigger
レシピトリガーをリセットします。
POST/api/managed_users/:managed_user_id/recipes/
:recipe_id/poll_now
poll-nowレシピを開始します。
GET/api/v2/managed_users/:managed_user_id/recipes/
:recipe_id/versions
顧客に属するレシピのバージョンを取得します。
GET/api/v2/managed_users/:managed_user_id/recipes/
:recipe_id/versions/:id
顧客に属するレシピバージョンの詳細を取得します。
PATCH/PUT/api/v2/managed_users/:managed_user_id/recipes/
:recipe_id/versions/:id
顧客ワークスペース内のレシピバージョンコメントを更新します。

顧客ワークスペース内のレシピの一覧表示

認証済みユーザーに属するレシピの一覧を返します。 レシピはIDの降順で返されます。 ライフタイムタスク数には、2021年03月19日以降のタスクデータが含まれます。

レシピは状態(running/stopped)でフィルタリングし、その後、停止日と理由でフィルタリングできます。

GET /api/managed_users/:id/recipes

URLパラメーター

名前タイプ説明
idstring
必須
Embedded顧客ID/外部ID。 外部IDにはEをプレフィックスとして付け、URLエンコードする必要があります。 例: EA2300

クエリパラメーター

名前タイプ説明
adapter_names_allstring
任意
カンマで区切られたアダプター名のリスト。 結果のレシピは、指定されたすべてのアダプターを使用する必要があります。
adapter_names_anystring
任意
カンマで区切られたアダプター名のリスト。 結果のレシピは、指定されたアダプターの少なくとも1つを使用する必要があります。
folder_idstring
任意
指定されたフォルダ内のレシピを返します。
with_subfoldersboolean
optional
trueの場合、folder_idで指定されたフォルダのサブフォルダにあるレシピを含めます。 デフォルトはfalseです。
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個以上のタグハンドル(文字列)の配列が含まれます。
project_idstring
任意
特定のプロジェクトのID。

サンプルリクエスト

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

レスポンス

json
{
    "result": [
        {
            "id": 66876978,
            "user_id": 6471278,
            "name": "Sync new contacts from HubSpot to 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": "When a new contact is created in HubSpot, add them to the newsletter list in 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": "Post Slack notifications when new leads are created in Salesforce",
            "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. New lead is created in Salesforce.\n2. Workato posts a message in Slack with the lead details.",
            "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エンドポイントの入力として使用できます。

顧客ワークスペース内のレシピの取得

指定したレシピの詳細を返します。

GET /api/managed_users/:id/recipes/:recipe_id

URLパラメータ

名前タイプ説明
idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idinteger
required
レシピID。

クエリパラメータ

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

サンプルリクエスト

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

レスポンス

json
{
    "result": [
      {
          "id": 281302,
          "user_id": 4848,
          "name": "New webhook call will get JIRA ticket information",
          "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": "New webhook call will get JIRA ticket information",
          "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": [
              {
                  "name": "jira",
                  "provider": "jira",
                  "keyword": "application",
                  "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": "Refactored webhook logic to improve error handling and added support for custom JIRA fields",
          "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でレシピを作成します。

POST /api/managed_users/:id/recipes

URLパラメータ

名前タイプ説明
idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。

ペイロード

名前タイプ説明
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/managed_users/17829/recipes \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
             "recipe": {
               "name":"Send mail",
               "code":"{\"number\":0,\"provider\":\"clock\",\"name\":\"scheduled_event\",\"as\":\"timer\",\"title\":null,\"description\":\"<span class=\\\"provider\\\">Trigger</span> on a <span class=\\\"provider\\\">specified schedule</span>\",\"keyword\":\"trigger\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{\"time_unit\":\"minutes\",\"trigger_every\":\"5\"},\"extended_input_schema\":[{\"type\":\"string\",\"name\":\"trigger_every\",\"control_type\":\"integer\",\"label\":\"Trigger every\",\"hint\":\"Define repeating schedule. Enter whole numbers only.\\n                        This field can be set to a minimum of 5 minutes.\",\"default\":\"5\",\"optional\":false,\"extends_schema\":true},{\"type\":\"date_time\",\"name\":\"start_after\",\"control_type\":\"date_time\",\"label\":\"Start after\",\"hint\":\"Set date and time to start or leave blank to start immediately. <b>Once recipe has been run or tested, value cannot be changed.</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": 11613
}

顧客ワークスペース内のレシピの更新

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

PUT /api/managed_users/:id/recipes/:recipe_id

URLパラメータ

名前タイプ説明
idstring
必須
Embedded顧客ID/外部ID。
外部IDにはE(例:EA2300)をプレフィックスとして付け、生成されたIDをURLエンコードする必要があります。
recipe_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/managed_users/17829/recipes/1389' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
            "recipe": {
              "name": "Send mail",
              "code": "{\"number\":0,\"provider\":\"clock\",\"name\":\"timer\",\"as\":\"timer\",\"keyword\":\"trigger\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{\"interval\":\"5\",\"start_at\":\"\"},\"block\":[{\"number\":1,\"provider\":\"email\",\"name\":\"send_mail\",\"as\":\"send_mail\",\"keyword\":\"action\",\"dynamicPickListSelection\":{},\"toggleCfg\":{},\"input\":{},\"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内の既存のレシピをコピーします。

POST /api/managed_users/:id/recipes/:recipe_id/copy

URLパラメータ

名前タイプ説明
idstring
必須
Embedded顧客ID/外部ID。
External IDはURLエンコードし、Eをプレフィックスとして付ける必要があります(例: EA2300)。
recipe_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/managed_users/12345/recipes/234567/copy' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d '{"folder_id": "98765"}'

レスポンス

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

顧客ワークスペース内のレシピの削除

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

DELETE /api/managed_users/:id/recipes/:recipe_id

URLパラメータ

名前タイプ説明
idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idinteger
required
レシピID。

サンプルリクエスト

shell
curl  -X DELETE 'https://www.workato.com/api/managed_users/17829/recipes/1389' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json'

レスポンス

json
{
  "success": true
}

顧客ワークスペース内のスタートレシピ

レシピIDで指定された顧客ワークスペース内のレシピを開始します。

PUT /api/managed_users/:managed_user_id/recipes/:recipe_id/start

URLパラメータ

名前タイプ説明
managed_user_idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idinteger
required
開始する予定のレシピのID。

サンプルリクエスト

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

レスポンス

リクエストが成功すると、APIは以下を返します。

json
{
  "success": true
}

エラーが原因でレシピを開始できない場合、APIは"success": falseで応答し、code_errorsまたはconfig_errors配列に詳細を含めます。

  • code_errors: 必須フィールドの欠落や無効な属性値など、レシピロジックで見つかった問題。
  • config_errors: 欠落または削除されたコネクションなど、レシピ設定の問題。

たとえば、次のレシピは必須フィールドの欠落(code_errors)と未確立のコネクション(config_errors)が原因で開始できません。

json
{
    "success": false,
    "code_errors": [
        [
            1,
            [
                [
                    "Hire Date",
                    null,
                    "can't be blank",
                    "jobOffer_offerTerms_expectedStartDate"
                ],
                [
                    "Last Name",
                    null,
                    "can't be blank",
                    "applicant_person_legalName_familyName1"
                ]
            ]
        ]
    ],
    "config_errors": [
        [
            1,
            [
                [
                    "account_id",
                    null,
                    "can't be blank"
                ]
            ]
        ]
    ]
}

顧客ワークスペース内のレシピの停止

レシピIDで指定された顧客ワークスペース内のレシピを停止します。

PUT /api/managed_users/:managed_user_id/recipes/:recipe_id/stop

URLパラメータ

名前タイプ説明
managed_user_idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idinteger
required
停止する予定のレシピのID。

サンプルリクエスト

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

レスポンス

json
{
  "success": true
}

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

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

アクティブなレシピでトリガーをリセットすると、実行中、延期中、保留中のジョブが実行されて完了した後、リセットトリガーによって作成された新しいジョブに進みます。

トリガー互換性

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

  • フォルダ内の新しいCSVファイルトリガー
  • 関数トリガー
  • APIトリガー
  • レシピOpsトリガー
  • Workbotトリガー
  • Kafkaトリガー
POST /api/managed_users/:managed_user_id/recipes/:recipe_id/reset_trigger

パスパラメーター

名前タイプ説明
managed_user_idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idinteger
required
リセットするレシピのID。

サンプルリクエスト

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

レスポンス

json
{
    "success": true
}

poll-nowレシピの開始

レシピIDを指定して、poll-nowレシピをリアルタイムで開始します。

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

POST /api/managed_users/:managed_user_id/recipes/:recipe_id/poll_now

パスパラメータ

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

サンプルリクエスト

shell
curl  -X POST https://www.workato.com/api/managed_users/E1234/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/v2/managed_users/:managed_user_id/recipes/:recipe_id/versions

URLパラメータ

名前タイプ説明
managed_user_idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idstring
必須
バージョン詳細を取得する予定のレシピのID。

クエリパラメータ

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

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/v2/managed_users/91929/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/v2/managed_users/:managed_user_id/recipes/:recipe_id/versions/:id

URLパラメータ

名前タイプ説明
managed_user_idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idstring
必須
バージョン詳細を取得する予定のレシピのID。
idstring
必須
詳細を取得する予定のレシピバージョンのID。

サンプルリクエスト

shell
curl  -X GET 'https://www.workato.com/api/v2/managed_users/91929/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/v2/managed_users/:managed_user_id/recipes/:recipe_id/versions/:id

URLパラメータ

名前タイプ説明
managed_user_idstring
必須
Embedded顧客ID/外部ID。
外部IDにはEのプレフィックスを付ける必要があり(例: EA2300)、結果のIDはURLエンコードする必要があります。
recipe_idstring
必須
バージョン詳細を取得する予定のレシピのID。
idstring
必須
コメントを更新する予定のレシピバージョンのID。

ペイロード

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

サンプルリクエスト

shell
curl  -X PATCH 'https://www.workato.com/api/v2/managed_users/91929/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
        }
    ]
}

Last updated: