Führen Sie die folgenden Schritte aus, um einen Test-API-Proxy zu erstellen und bereitzustellen. Testen Sie schließlich den API-Proxy, indem Sie eine HTTP-Anfrage an ihn senden.
API-Proxy erstellen und bereitstellen
Erforderliche Berechtigungen für diese Aufgabe
Zum Erstellen und Bereitstellen von Proxys ist ein Mindestsatz an Berechtigungen erforderlich.
Wenn Sie die Rolle „Apigee-Organisationsadministrator“ haben, können Sie diese Aufgabe ausführen.
Weitere Informationen zu anderen Rollen, die Sie verwenden können, finden Sie unter Apigee-Rollen.
Beim Bereitstellungsprozess für Apigee wird nicht automatisch ein API-Proxy für Sie erstellt und bereitgestellt. Sie müssen einen Proxy manuell erstellen und bereitstellen.
Apigee-UI in der Cloud Console
So erstellen Sie Ihren ersten Proxy und stellen ihn bereit:
Achten Sie darauf, dass der Name Ihrer Organisation im Drop-down-Menü links oben in der Benutzeroberfläche ausgewählt ist. Der Name der Organisation entspricht dem Namen Ihres Google Cloud-Projekts.
Klicken Sie im linken Navigationsbereich auf Proxy-Entwicklung > API-Proxys.
Klicken Sie auf + Erstellen.
Die Seite Proxy erstellen wird geöffnet.
Wählen Sie im Feld Proxyvorlage die Option Reverse-Proxy (am häufigsten) aus.
Konfigurieren Sie den Proxy in Schritt 1: Proxydetails mit den folgenden Werten:
Parametername
Wert
Proxy-Name
hello-world
Basispfad
/hello-world
Ziel (vorhandene API)
mocktarget.apigee.net
Klicken Sie auf Weiter.
In Schritt 2: Bereitstellen (optional):
Bereitstellungsumgebungen: Optional. Wählen Sie durch die Kästchen eine oder mehrere Umgebungen aus, in denen Sie Ihren Proxy bereitstellen möchten.
Wenn Sie den Proxy zu diesem Zeitpunkt nicht bereitstellen möchten, lassen Sie das Feld Bereitstellungsumgebungen leer. Sie können den Proxy später jederzeit bereitstellen.
Dienstkonto: (optional) Hängen Sie ein Dienstkonto an Ihre Bereitstellung an, damit der Proxy auf Google Cloud-Dienste zugreifen kann, wie in der Rolle und den Berechtigungen des Dienstkontos angegeben.
Klicken Sie auf Erstellen.
Der neue API-Proxy wird erstellt und in der ausgewählten Umgebung bereitgestellt.
Die Seite Proxy-Zusammenfassung für den neu erstellten Proxy wird geöffnet.
Mit einem grünen Häkchen unter Status wird angezeigt, dass der Proxy erfolgreich bereitgestellt wurde. Wenn der Proxy nicht bereitgestellt wird, finden Sie weitere Informationen unter API-Proxy bereitstellen. Folgen Sie den Schritten, um ihn manuell bereitzustellen.
Wählen Sie im linken Navigationsbereich Verwaltung > Umgebungen > Umgebungsgruppen aus.
Kopieren Sie den Hostnamen für Ihre Umgebungsgruppe. Mit diesem Hostnamen rufen Sie in den nächsten Schritten den API-Proxy auf.
Apigee-Benutzeroberfläche
So erstellen Sie Ihren ersten Proxy und stellen ihn bereit:
Achten Sie darauf, dass der Name Ihrer Organisation im Drop-down-Menü links oben in der Benutzeroberfläche ausgewählt ist. Der Name der Organisation entspricht dem Namen Ihres Google Cloud-Projekts.
Klicken Sie in der Hauptansicht auf API-Proxys.
Wählen Sie in der Drop-down-Liste Umgebung auswählen eine Umgebung aus.
Klicken Sie auf Neu erstellen.
Klicken Sie auf Proxy umkehren (am häufigsten).
Konfigurieren Sie den Proxy auf der Seite Proxydetails mit den folgenden Einstellungen:
Parametername
Wert
Name
hello-world
Basispfad
/hello-world
Ziel (vorhandene API)
https://mocktarget.apigee.net
Klicken Sie auf Weiter.
Wählen Sie auf der Seite Allgemeine Richtlinien unter Sicherheit: Autorisierung die Option Passthrough (keine Autorisierung) aus.
Klicken Sie auf Weiter.
Wählen Sie auf der Seite Zusammenfassung unter Optionale Bereitstellung die Umgebung aus, in der der Proxy bereitgestellt werden soll.
Klicken Sie auf Erstellen und bereitstellen.
Der neue API-Proxy wird erstellt und in der ausgewählten Umgebung bereitgestellt.
Klicken Sie auf Zur Proxyliste. Mit einem grünen Häkchen unter Status wird angezeigt, dass der Proxy erfolgreich bereitgestellt wurde. Wenn der Proxy nicht bereitgestellt wird, finden Sie weitere Informationen unter API-Proxy bereitstellen. Folgen Sie den Schritten, um ihn manuell bereitzustellen.
Wählen Sie im linken Navigationsbereich Admin > Umgebungen > Gruppen aus.
Klicken Sie auf In der Google Cloud Console ansehen.
Kopieren Sie den Hostnamen für Ihre Umgebungsgruppe. Mit diesem Hostnamen rufen Sie in den nächsten Schritten den API-Proxy auf.
Richten Sie einen DNS-Eintrag für Ihren Host ein. Es gibt zwei Möglichkeiten, um diese Aufgabe auszuführen:
Erstellen Sie bei Ihrem Registrator einen A-Eintrag, der den Hostnamen Ihrer Umgebungsgruppe auf die IP-Adresse verweist, die auf der Seite des Assistenten unter DNS konfigurieren angezeigt wird. Wenn Ihr Hostname beispielsweise sales.example.com und die IP-Adresse 10.23.0.2 lautet, verweisen Sie den Eintrag für sales.example.com auf die Adresse 10.23.0.2.
Verwenden Sie Google Cloud DNS, um einer IP-Adresse eine URL zuzuordnen.
Testen Sie den API-Proxy, indem Sie die folgende Anfrage in einem Terminalfenster senden:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis page provides instructions for creating and deploying a test API proxy in Apigee or Apigee hybrid environments, which can be done using either the Apigee UI in the Cloud console or the classic Apigee UI.\u003c/p\u003e\n"],["\u003cp\u003eCreating and deploying API proxies requires specific permissions, notably the Apigee Org Admin role, but alternative roles are detailed in the Apigee roles documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves configuring a reverse proxy with a specified name, base path, and target API, then optionally deploying it to selected environments, with the created proxy being displayed in the Proxy Summary page.\u003c/p\u003e\n"],["\u003cp\u003eAfter deployment, you can test the API proxy by sending an HTTP request to it, either with internal or external access, by setting up a DNS entry and using the provided \u003ccode\u003ecurl\u003c/code\u003e command with the correct environment group hostname.\u003c/p\u003e\n"],["\u003cp\u003eThe page also suggests several next steps, such as taking a tour of Apigee tutorials for learning about guarding against traffic spikes and getting a detailed view of the request/response flow.\u003c/p\u003e\n"]]],[],null,["# Recommended next steps\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\nWhat you're doing in this step\n------------------------------\n\n\nFollow the steps below to create and deploy a test API proxy. Finally,\ntest the API proxy by sending an HTTP request to it.\n\nCreate and deploy an API proxy\n------------------------------\n\n#### Permissions required for this task\n\n\nCreating and deploying proxies requires a minimum set of permissions.\nIf you have the Apigee Org Admin role, you can complete this task.\nTo learn about other roles you can employ, see\n[Apigee roles](/apigee/docs/api-platform/system-administration/apigee-roles).\n\nThe provisioning process for Apigee does not automatically create\nand deploy an API proxy for you. You must create and deploy a proxy manually. \n\n### Apigee UI in the Cloud console\n\nTo create and deploy your first proxy:\n\n1. In the Google Cloud console, go to the **Proxy development \\\u003e API proxies** page.\n\n [Go to API proxies](https://console.cloud.google.com/apigee/proxies)\n2. Be sure that your organization name is selected from the project picker in the **Google Cloud** pane. The organization name is the same as your Google Cloud project name.\n3. Click **+ Create** .\n\n The **Create a proxy** page opens.\n4. In the **Proxy template** box, select **Reverse proxy (most common)**.\n5. In **Step 1: Proxy details** , configure your proxy with the following values:\n\n6. Click **Next**.\n7. In **Step 2: Deploy (optional)** :\n - **Deployment environments** : Optional. Use the checkboxes to select one or more environments in which to deploy your proxy. If you prefer not to deploy the proxy at this point, leave the **Deployment environments** field empty. You can always deploy the proxy later.\n - **Service Account**: Optional. Attach a service account to your deployment to enable your proxy to access Google Cloud services, as specified in the service account's role and permissions.\n8. Click **Create** .\n\n Your new API proxy is created and deployed in the selected environment.\n | **Note:**The proxy is not fully deployed instantaneously. It can take up to a minute for the proxy to deploy.\n9. The **Proxy summary** page for your newly created proxy opens. A green check mark under **Status** indicates that the proxy was successfully deployed. If the proxy is not deployed, see [Deploying an API proxy](/apigee/docs/api-platform/deploy/ui-deploy-new) and follow the steps to deploy it manually.\n10. In the left navigation pane, select **Management \\\u003e Environments \\\u003e Environment Groups**.\n11. Copy the hostname for your environment group. You'll use this hostname to call the API proxy in the next steps.\n\n### Classic Apigee\n\nTo create and deploy your first proxy:\n\n1. Sign in to the [Apigee UI](https://apigee.google.com).\n2. Be sure that your organization name is selected from the drop-down menu in the upper left corner of the UI. The organization name is the same as your Google Cloud project name.\n3. Click **API Proxies** in the main view.\n4. From the **Select Environment** drop-down list, select an environment.\n5. Click **Create new**.\n6. Click **Reverse proxy (most common)**.\n7. In the **Proxy details** page, configure your proxy with the following values:\n\n8. Click **Next**.\n9. In the **Common policies** page, under **Security:\n Authorization** select **Pass through (no authorization)**.\n10. Click **Next**.\n11. On the **Summary** page, under **Optional Deployment**, select the environment in which to deploy the proxy.\n12. Click **Create and deploy** .\n\n Your new API proxy is created\n and deployed in the selected environment.\n | **Note:**The proxy is not fully deployed instantaneously. It can take up to a minute for the proxy to deploy.\n13. Click **Go to proxy list** . A green check mark under **Status** indicates that the proxy was successfully deployed. If the proxy is not deployed, see [Deploying an API proxy](/apigee/docs/api-platform/deploy/ui-deploy-new) and follow the steps to deploy it manually.\n14. In the left navigation pane, select **Admin \\\u003e Environments \\\u003e Groups**.\n15. Click **View in Google Cloud console**.\n16. Copy the hostname for your environment group. You'll use this hostname to call the API proxy in the next steps.\n17. Close the Google Cloud console.\n\nCall the proxy with internal access\n-----------------------------------\n\nIf you allowed *internal* access in\n[Step 4: Customize access routing](/apigee/docs/api-platform/get-started/configure-routing), follow the instructions in:\n[Calling an API proxy with internal-only access](/apigee/docs/api-platform/get-started/accessing-internal-proxies).\n\nCall the proxy with external access\n-----------------------------------\n\n\nIf you allowed *external* access in\n[Step 4: Customize access routing](/apigee/docs/api-platform/get-started/configure-routing), follow these steps:\n\n1. Set up a DNS entry for your host. Here are two ways to accomplish this task:\n - At your registrar, create an A record pointing your environment group hostname to the IP shown on the wizard page under **Configure DNS** . For example, if your hostname is `sales.example.com` and the IP is 10.23.0.2, then point the record for `sales.example.com` to the address `10.23.0.2`.\n - Use Google [Cloud DNS](/dns/docs) to map a URL to an IP address.\n 2. Test the API proxy by sending the following request in a terminal window: **Note:** DNS changes are published immediately, but may take time to propagate. Because of this delay, you may have to wait up to an hour before you can call the sample proxy. \n\n ```\n curl -v -H \"Host:YOUR_ENV_GROUP_HOSTNAME\" \\\n https://YOUR_INSTANCE_IP_OR_DNS/hello-world\n ```\n\n Where:\n - The value of the `Host` header (\u003cvar translate=\"no\"\u003eYOUR_ENV_GROUP_HOSTNAME\u003c/var\u003e) is the hostname from the **Environments \\\u003e Environment Groups** page.\n\n A successful request returns the string: `Hello, Guest!`.\n If your request is not successful, see [Troubleshooting](/apigee/docs/api-platform/get-started/troubleshooting-install).\n\nNext steps\n----------\n\n- [Take a tour](/apigee/docs/api-platform/get-started/tutorials) of the Apigee tutorials, including:\n - [Guarding against sudden\n traffic spikes](/apigee/docs/api-platform/tutorials/add-spike-arrest).\n - [Getting a detailed view of\n the request/response flow](/apigee/docs/api-platform/tutorials/view-with-trace)."]]