[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-25(UTC)"],[[["\u003cp\u003eAPI triggers allow direct invocation of integration executions, enabling you to set request and response payloads via trigger-specific variables.\u003c/p\u003e\n"],["\u003cp\u003eYou can generate and view an OpenAPI Specification (OAS) for your integration when using an API trigger.\u003c/p\u003e\n"],["\u003cp\u003eAPI triggers can be invoked either synchronously or asynchronously, offering flexibility in how integrations are executed.\u003c/p\u003e\n"],["\u003cp\u003eEach API trigger is assigned a unique Trigger ID and supports customizable input and output variables for managing request and response data.\u003c/p\u003e\n"],["\u003cp\u003eAfter publishing an integration with an API trigger, you can invoke it using the \u003ccode\u003eprojects.locations.integrations.execute\u003c/code\u003e method, enabling triggering from any application, with the cumulative size of all input variables limited to 8 MB.\u003c/p\u003e\n"]]],[],null,["# API trigger\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nAPI trigger\n===========\n\nAPI triggers are used to directly invoke executions for integrations.\n\nConfiguring an API trigger in your integration enables you to do the following:\n\n- Set request and response payload using trigger specific input and output variables.\n- [Generate and view the OpenAPI Specification (OAS)](#view-openapi-spec) for your integration.\n- Invoke an integration [synchronously](/application-integration/docs/error-handling-strategy#synchronous-and-asynchronous-error-handling) or [asynchronously](/application-integration/docs/error-handling-strategy#synchronous-and-asynchronous-error-handling).\n\nTo help you get started with API triggers, see the [API fulfillment](/application-integration/docs/api-fulfilment) tutorial. The tutorial shows you how to create an integration with an API trigger that receives API requests for retrieving customer information.\n\n\u003cbr /\u003e\n\nAdd an API trigger\n------------------\n\nTo add an **API trigger** to your integration, perform the following steps:\n\n1. In the Google Cloud console, go to the **Application Integration** page.\n\n [Go to Application Integration](https://console.cloud.google.com/integrations)\n2. In the navigation menu, click **Integrations**\n\n\n The **Integrations List** page appears listing all the integrations available in the Google Cloud project.\n3. Select an existing integration or click **Create integration** to create a new one.\n\n\n If you are creating a new integration:\n 1. Enter a name and description in the **Create Integration** pane.\n 2. Select a region for the integration. **Note:** The **Regions** dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, Click **Enable Region** . See [Enable new region](/application-integration/docs/enable-new-region) for more information.\n 3. Select a service account for the integration. You can change or update the service account details of an integration any time from the info **Integration summary** pane in the integration toolbar. **Note:** The option to select a service account is displayed only if you have enabled integration governance for the selected region.\n 4. Click **Create**.\n\n\n The newly created integration opens in the *integration editor*.\n4. In the *integration editor* navigation bar, click **Triggers** to view the list of available triggers.\n5. Click and place the **API trigger** element to the designer.\n\nConfigure an API trigger\n------------------------\n\nTo configure an API trigger, click the **API trigger** element in the integration editor. The API trigger configuration pane appears showing the following fields:\n\n- **Label:** The visible name of the API trigger in your integration. You can change the label to a name of your choice.\n- **Notes:** You can add notes to the API trigger to provide additional information about the trigger.\n- **Trigger ID:** A unique ID that is assigned to the API trigger in the format `api_trigger/`\u003cvar translate=\"no\"\u003eTRIGGER_NAME\u003c/var\u003e. **Note** : You can have more than one API trigger in your integration. Each API trigger is assigned a unique **Trigger ID**.\n- **Input variables:** Trigger specific input variables that you can use to set the request payload for the API trigger.\n - To add or remove existing integration variables to the API trigger, click **Modify** and select the required variables from the **API trigger input variables** pane.\n - To add a new variable, specifically for the selected API trigger, click **Modify** and select **+ Add new variable** from the **API trigger input variables** pane. For information about the supported data types, see [Supported variable data types](/application-integration/docs/variables#datatype).\n- **Output variables:** Trigger specific output variables that you can use to set the response payload for the API trigger.\n - To add or remove existing integration variables to the API trigger, click **Modify** and select the required variables from the **API trigger output variables** pane.\n - To add a new variable, specifically for the selected API trigger, click **Modify** and select **+ Add new variable** from the **API trigger output variables** pane. For information about the supported data types, see [Supported variable data types](/application-integration/docs/variables#datatype).\n| **Note** : You can create input and output variables from both the [Variables pane](/application-integration/docs/variables#create-a-variable) and the API trigger configuration pane.\n|\n| - Application Integration automatically adds variables created from the API trigger configuration pane to that specific trigger as input or output variables.\n| - You can manually add variables from one API trigger to another as input or output variables.\n| - By default, all elements in your integration can access variables created from the Variables pane.\n| - Changing the **Variable type** of a variable affects all the elements in your integration that use that variable.\n\nView OpenAPI Specification for your API trigger\n-----------------------------------------------\n\nApplication Integration provides the ability to dynamically generate and view the OpenAPI Specifications of your published integrations that are configured with one or more API triggers. For information about how to view the OpenAPI Specification, see [View OpenAPI Specification for your integration](/application-integration/docs/view-openapi-spec).\n\nInvoke an API trigger using an API call\n---------------------------------------\n\nAfter you have published an integration that has an **API trigger** configured, you can use the [`projects.locations.integrations.execute`](/application-integration/docs/reference/rest/v1/projects.locations.integrations/execute) method to invoke that trigger from any application. This method triggers the execution in the [synchronous mode](/application-integration/docs/error-handling#error-handling-methods).\n\n### Syntax\n\n```\ncurl -X POST \\\n -H \"authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json\" \\\n -H \"X-Server-Timeout: TIMEOUT_SECONDS\" \\\n -d '{\"trigger_id\":\"api_trigger/TRIGGER_NAME\"}' \\\n \"https://LOCATION-integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/-:execute\"\n```\n\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eTIMEOUT_SECONDS\u003c/var\u003e: The timeout in seconds for the API call. By default, the timeout is 120 seconds. For a list of pre-defined set of request parameters, see [System parameters](/apis/docs/system-parameters).\n- \u003cvar translate=\"no\"\u003eTRIGGER_NAME\u003c/var\u003e: The name of the **API trigger** in your integration.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of your Google Cloud project.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The location of your Google Cloud project.\n\n### Example\n\nThe following example invokes an integration in `us-east1` region containing the `test_API_1` API trigger in the `demo-project` Google Cloud project: \n\n```\ncurl -X POST \\\n -H \"authorization: Bearer $(gcloud auth print-access-token)\"\n -H \"Content-Type: application/json\" \\\n -H \"X-Server-Timeout: 300\"\n -d '{\"trigger_id\":\"api_trigger/test_API_1\"}' \\\n \"https://us-east1-integrations.googleapis.com/v1/projects/demo-project/locations/us-central1/integrations/-:execute\"\n```\n\nConsiderations\n--------------\n\nWhen using the API trigger, the cumulative size of all the input variables can\nbe a maximum of 8 MB. If the size exceeds 8 MB, Application Integration doesn't run the\nintegration and you will get an error.\n\nQuotas and limits\n-----------------\n\nFor information about quotas and limits, see [Quotas and limits](/application-integration/docs/quotas).\n\nWhat's next\n-----------\n\n- Learn about [all tasks and triggers](/application-integration/docs/all-triggers-tasks).\n- Learn how to [test and publish an integration](/application-integration/docs/test-publish-integrations).\n\n- Learn about [error handling](/application-integration/docs/error-handling-strategy).\n- Learn about [integration execution logs](/application-integration/docs/introduction-logs)."]]