[[["容易理解","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-09-03 (世界標準時間)。"],[[["\u003cp\u003eThis guide explains how to develop and manage API proxies in Apigee and Apigee hybrid using Cloud Code, which helps decouple app-facing APIs from backend services.\u003c/p\u003e\n"],["\u003cp\u003eAPI proxies can be created through the Cloud Code command palette or by navigating to the \u003ccode\u003eapiproxies\u003c/code\u003e folder, with options for various types, such as \u003ccode\u003eAccess token-based authentication\u003c/code\u003e, \u003ccode\u003eAPI key-based authentication\u003c/code\u003e, \u003ccode\u003eEcho request\u003c/code\u003e, \u003ccode\u003eSimple reverse proxy\u003c/code\u003e, and \u003ccode\u003eOpenAPI 3.0 spec\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUploading existing API proxy bundles is supported, as long as they follow the specified directory structure, and upon upload, they will be integrated into the workspace.\u003c/p\u003e\n"],["\u003cp\u003eProxy endpoints control how clients access APIs and target endpoints manage the API proxy's interaction with backend services; both can be created, configured, and customized with various options, including security, quota, and rate-limiting.\u003c/p\u003e\n"],["\u003cp\u003eThe default configuration for API proxies varies depending on the selected type and authentication method, including options like quota enforcement, API key verification, and OAuth V2 token validation.\u003c/p\u003e\n"]]],[],null,["# Developing API proxies\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n\u003cbr /\u003e\n\nExpose APIs on Apigee by implementing API proxies. API proxies decouple the app-facing API from your backend services, shielding those apps from backend code changes.\n\nDevelop your API proxies using Apigee in Cloud Code as described in the following sections. See also [Managing folders and files in an Apigee workspace](/apigee/docs/api-platform/local-development/vscode/manage-apigee-workspace#manage-folders-files).\n| **Before you begin** : Familiarize yourself with the concepts described in the following topics:\n|\n| - [Understanding APIs and API proxies](/apigee/docs/api-platform/fundamentals/understanding-apis-and-api-proxies)\n| - [Key points of API proxy development](/apigee/docs/api-platform/fundamentals/structure-api-proxies)\n\nCreating an API proxy\n---------------------\n\nTo create an API proxy using Apigee in Cloud Code, make sure you've created a\n[local development workspace](/apigee/docs/api-platform/local-development/vscode/manage-apigee-workspace)\nand then:\n\n1. Perform one of the following actions:\n\n - In your workspace, position your cursor over the **apiproxies** folder and click .\n\n - Select **View \\\u003e Command Palette** to open the Command palette and select **Cloud Code: Create Apigee proxy bundle**.\n\n The **Create proxy** wizard opens.\n2. Select one of the following options:\n\n3. See [API proxy primary fields](/apigee/docs/api-platform/develop/ui-create-proxy#api-proxy-primary-fields) for information on the fields, such as the base path, needed to create each proxy type. Respond to each of the prompts and press **\u003ckbd\u003eEnter\u003c/kbd\u003e** to confirm and proceed, or **\u003ckbd\u003eEsc\u003c/kbd\u003e** to cancel the wizard.\n\nAfter you complete the steps in the wizard, the new \u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e folder is added under `apiproxies` in the Apigee section. Each API proxy folder is structured as described in [API proxy configuration directory structure](/apigee/docs/api-platform/reference/api-proxy-configuration-reference#apiproxystructure).\n\nThe following provides an example of the default configuration created for a API proxy created with type `API key-based authentication`.\n\nFor a description of the default configuration, see [Exploring the default API proxy configuration](#default).\n\n### Exploring the default API proxy configuration\n\nThe following table summarizes the contents included in the default configuration when you create an API proxy based on the API proxy type and authentication options selected.\n\nUploading an API proxy bundle\n-----------------------------\n\nTo upload an API proxy bundle to Apigee in Cloud Code:\n\n1. Perform one of the following actions:\n\n - In your Apigee workspace, position your cursor over the **apiproxies** folder and click .\n\n - Select **View \\\u003e Command Palette** to open the Command palette and select **Cloud Code: Import Apigee proxy bundle**.\n\n2. Navigate to the API proxy bundle that you want to upload and click **Select** .\n The API proxy bundle must be structured as described in [API proxy configuration directory structure](/apigee/docs/api-platform/reference/api-proxy-configuration-reference#apiproxystructure).\n\n3. (Optional) By default, the name of the zip file minus its extension is used for the name of the API proxy. If this name is not unique, you are prompted to enter a unique name.\n\nThe uploaded \u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e folder is added under `apiproxies` in your workspace.\n\nManaging proxy endpoints\n------------------------\n\nAs described in [What is an API proxy?](/apigee/docs/api-platform/fundamentals/understanding-apis-and-api-proxies#whatisanapiproxy), a **proxy endpoint (ProxyEndpoint)** defines the way client apps consume your APIs. You\nconfigure the proxy endpoint to define the URL of your API proxy. The proxy endpoint also\ndetermines whether apps access the API proxy over HTTP or HTTPS. You can [attach policies](/apigee/docs/api-platform/local-development/vscode/manage-policies)\nto the proxy endpoint to enforce security, quota checks, and other types of\naccess control and rate-limiting.\n\nCreate and configure proxy endpoints as described in the following sections.\n\n### Creating proxy endpoints\n\nWhen you [create an API proxy](#create-proxy), a default proxy endpoint is added to the API proxy configuration. For more information, see [Exploring the default API proxy configuration](#default). You can create additional proxy endpoints, as required.\n| **Note** : Before adding multiple proxy endpoints, review the following topic [Antipattern: Define multiple ProxyEndpoints in an API proxy](/apigee/docs/api-platform/antipatterns/multiple-proxyendpoints).\n\nTo create a proxy endpoint using Apigee in Cloud Code:\n\n1. In your Apigee workspace, perform one of the following actions:\n\n - Position your cursor over one of the following folders, click , and select **Create proxy endpoint** :\n - \u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e proxy bundle\n - \u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e`/apiproxy`\n - Position your cursor over the **\u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e`/apiproxy/proxies`** folder and click .\n\n The **Create proxy endpoint** wizard opens.\n2. Enter the values for the next set of prompts. Press **\u003ckbd\u003eEnter\u003c/kbd\u003e** after each to confirm and proceed or **\u003ckbd\u003eEsc\u003c/kbd\u003e** to cancel.\n\nThe endpoint is created and added to the **\u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e`/apiproxy/proxies`** folder in the Apigee section and opened in the editor. Configure the proxy endpoint, as described in the following section.\n\n### Configuring proxy endpoints\n\nTo configure proxy endpoints, refer to the following sections:\n\n- [Controlling how a proxy executes with flows](/apigee/docs/api-platform/fundamentals/what-are-flows)\n- [Determining the URL of the API proxy endpoint](/apigee/docs/api-platform/fundamentals/understanding-routes#determiningtheurloftheapiproxyendpoint)\n- [Adding features using policies](/apigee/docs/api-platform/local-development/vscode/manage-policies)\n- [Managing resources](/apigee/docs/api-platform/local-development/vscode/manage-resources)\n- [ProxyEndpoint configuration](/apigee/docs/api-platform/reference/api-proxy-configuration-reference#proxyendpoint-apiproxyproxiesdefaultxml)\n- [Flow configuration reference](/apigee/docs/api-platform/reference/flow-configuration-reference)\n- [Endpoint properties reference](/apigee/docs/api-platform/reference/endpoint-properties-reference)\n\nManaging target endpoints\n-------------------------\n\nAs described in [What is an API proxy?](/apigee/docs/api-platform/fundamentals/understanding-apis-and-api-proxies#whatisanapiproxy), a **target endpoint (TargetEndpoint)** defines the way the API proxy interacts with your backend services. You configure the target endpoint to forward requests to the proper backend service, and define any security settings, HTTP or HTTPS protocol, and other connection information. You can [attach policies](/apigee/docs/api-platform/local-development/vscode/manage-policies) to the target endpoint to ensure that response messages are properly formatted for the app that made the initial request.\n\nCreate and configure target endpoints as described in this section.\n\n### Creating target endpoints\n\nWhen you create a reverse API proxy, a default target endpoint is added to the API proxy configuration. When creating an API proxy with no backend target, only the default proxy endpoint is added to the API proxy configuration, no target endpoint is added. For more information, see [Exploring the default API proxy configuration](#default).\n\nCreate target endpoints, as required.\n| **Note**: An API proxy does not need a target endpoint. Proxy endpoints can be configured to call URLs directly. An API proxy with no target endpoints usually contains a proxy endpoint that either directly calls a backend service or is configured to call a service using Java or JavaScript.\n\nTo create a target endpoint using Apigee in Cloud Code:\n\n1. In your Apigee workspace, perform one of the following actions:\n\n - Position your cursor over one of the following folders, click , and select **Create target endpoint** :\n - \u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e proxy bundle\n - \u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e`/apiproxy`\n - Position your cursor over the **\u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e`/apiproxy/targets`** folder and click .\n\n The **Create target endpoint** wizard opens.\n2. Perform the following steps based on the type of target endpoint you want to create:\n\nThe target endpoint is created and added to the **\u003cvar translate=\"no\"\u003eapiproxy-name\u003c/var\u003e`/apiproxy/targets`** folder and opened in the editor. Configure the target endpoint, as described in the following section.\n\n### Configuring target endpoints\n\nConfigure target endpoints, as described in the following topics.\n\n- [Load balancing across backend servers](/apigee/docs/api-platform/deploy/load-balancing-across-backend-servers)\n- [Controlling how a proxy executes with flows](/apigee/docs/api-platform/fundamentals/what-are-flows)\n- [Chaining API proxies together](/apigee/docs/api-platform/fundamentals/connecting-proxies-other-proxies)\n- [Determining the URL of the target endpoint](/apigee/docs/api-platform/fundamentals/understanding-routes#determiningtheurlofthetargetendpoint)\n- [Adding features using policies](/apigee/docs/api-platform/local-development/vscode/manage-policies)\n- [Managing resources](/apigee/docs/api-platform/local-development/vscode/manage-resources)\n- [TargetEndpoint configuration](/apigee/docs/api-platform/reference/api-proxy-configuration-reference#targetendpoint-targetendpointconfiguration)\n- [Flow configuration reference](/apigee/docs/api-platform/reference/flow-configuration-reference)\n- [Endpoint properties reference](/apigee/docs/api-platform/reference/endpoint-properties-reference)\n\n\u003cbr /\u003e"]]