Maintenant que vous avez configuré Google Cloud et l'UI Apigee, et que vous avez installé et configuré l'environnement d'exécution, vous êtes prêt à voir comment ils fonctionnent ensemble.
1. Créer un proxy d'API à l'aide de l'interface utilisateur Apigee
Cette section explique comment créer un proxy d'API dans l'interface utilisateur à l'aide de l'assistant de création de proxy d'API.
Pour créer un proxy d'API simple à l'aide de l'assistant de proxy d'API :
Sélectionnez votre organisation dans le menu déroulant situé dans l'angle supérieur gauche.
Sélectionnez Développer > Proxys d'API dans la vue principale.
Cliquez sur Créer. L'assistant de proxy d'API démarre.
Sélectionnez Proxy inverse (solution la plus courante).
La vue Informations sur le proxy s'affiche.
Configurez votre proxy avec les paramètres suivants :
Nom du proxy : saisissez "myproxy". Dans les étapes suivantes de cette section, nous partons du principe qu'il s'agit de l'ID de votre proxy.
Chemin de base du proxy : défini automatiquement sur "/myproxy". Le chemin de base du proxy fait partie de l'URL utilisée pour envoyer des requêtes à votre API. Edge utilise l'URL pour mettre en correspondance et acheminer les requêtes entrantes vers le proxy d'API approprié.
(Facultatif) Description : saisissez une description de votre nouveau proxy d'API, par exemple "Test Apigee hybride avec un simple proxy".
Cible (API existante) : saisissez "https://mocktarget.apigee.net". Cela définit l'URL cible qu'Apigee appelle pour une requête adressée au proxy d'API. Le service "mocktarget" est hébergé sur Apigee et renvoie des données simples. Il ne nécessite aucune clé d'API ni jeton d'accès.
Les détails de votre proxy API doivent se présenter comme suit :
Cliquez sur Suivant.
Sur l'écran Règles, sélectionnez l'option de sécurité Direct (sans autorisation).
Cliquez sur Suivant.
Sur l'écran Résumé, sélectionnez un environnement sur lequel déployer votre proxy, puis cliquez sur Créer et déployer.
Le mode hybride génère le proxy (parfois appelé groupe de proxy) :
Cliquez sur Accéder à la liste des proxys.
Apigee affiche la vue Proxy, qui affiche une liste de proxys d'API. Votre nouveau proxy doit apparaître avec un indicateur d'état vert, ce qui signifie qu'il a été déployé.
2. Appeler le proxy d'API
Lorsque l'interface indique que votre proxy est déployé, vous pouvez essayer de l'appeler à l'aide de cURL ou du client REST de votre choix.
Exemple :
Recherchez l'adresse IP externe et le port de la passerelle d'entrée Apigee à l'aide de la commande suivante:
kubectl get svc -n apigee -l app=apigee-ingressgateway
Le résultat doit se présenter sous la forme suivante :
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
apigee-ingressgateway-prod-hybrid-37a39bd LoadBalancer 192.0.2.123 233.252.0.123 15021:32049/TCP,80:31624/TCP,443:30723/TCP 16h
Exportez votre adresse IP externe et votre port vers des variables:
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis documentation version (1.8) is end-of-life and users should upgrade to a newer version for continued support.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a new API proxy using the Apigee UI's API Proxy Wizard by configuring settings like the proxy name, base path, and target API.\u003c/p\u003e\n"],["\u003cp\u003eThe newly created API proxy can be tested by calling it with cURL or another REST client once it has been deployed.\u003c/p\u003e\n"],["\u003cp\u003eAfter setting up an environment group, you can use the command line to find the external IP and port of the Apigee ingress gateway to target requests.\u003c/p\u003e\n"]]],[],null,["# Step 10: Deploy an API proxy\n\n| You are currently viewing version 1.8 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nNow that you've configured and the Apigee UI, and installed and configured the\nruntime, you're ready to see how it all works together.\n\n1. Create a new API proxy using the Apigee UI\n---------------------------------------------\n\nThis section describes how to create a new API proxy in the UI by using the API Proxy Wizard.\n\n**To create a simple API proxy using the API Proxy Wizard:**\n\n1. Open [Apigee UI](https://apigee.google.com) in a browser.\n2. Select your organization from the dropdown menu in the upper left corner.\n3. Select **Develop \\\u003e API Proxies** in the main view.\n4. Click **Create New**.The API Proxy Wizard starts.\n5. Select **Reverse proxy** (most common).\n\n The **Proxy details** view is displayed.\n6. Configure your proxy with the following settings:\n - **Proxy Name:** Enter \"myproxy\". The remaining steps in this section assume that this is your proxy's ID.\n - **Proxy Base Path:** Automatically set to \"/myproxy\". The **Proxy Base\n Path** is part of the URL used to make requests to your API. Edge uses the URL to match and route incoming requests to the proper API proxy.\n - (Optional)**Description:** Enter a description for your new API proxy, such as \"Testing Apigee hybrid with a simple proxy\".\n - **Target (Existing API):** Enter \"https://mocktarget.apigee.net\". This defines the target URL that Apigee invokes on a request to the API proxy. The mocktarget service is hosted at Apigee and returns simple data. It requires no API key or access token.\n\n Your API proxy's details should look like the following:\n\n7. Click **Next**.\n8. On the **Policies** screen, select **Pass through (no authorization)** as the security option.\n9. Click **Next**.\n10. On the **Summary** screen, select an environment to deploy your proxy to and click **Create and Deploy** .\n\n Hybrid generates the proxy (sometimes referred to as *the proxy bundle*):\n\n11. Click **Go to proxy list** .\n\n Apigee displays the **Proxies** view, which displays a list of API proxies. Your\n new proxy should display with a green status indicator, meaning that it has been deployed.\n\n2. Call the API proxy\n---------------------\n\nWhen the UI indicates your proxy is deployed, you can try calling it using cURL or the REST\nclient of your choice.\nFor example:\n\n1. Make sure your `DOMAIN` environment variable is set to the domain name you used for the hostname for your environment group in [Project and org\n setup - Step 3: Create an environment group](/apigee/docs/hybrid/v1.8/precog-add-environment). \n\n ```\n echo $DOMAIN\n ```\n2. Find the external IP address and port of the Apigee ingress gateway with the following command:\n\n ```\n kubectl get svc -n apigee -l app=apigee-ingressgateway\n ```\n\n\n Your output should look something like: \n\n ```\n NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n apigee-ingressgateway-prod-hybrid-37a39bd LoadBalancer 192.0.2.123 233.252.0.123 15021:32049/TCP,80:31624/TCP,443:30723/TCP 16h\n ```\n3. Export your external IP and port to variables: \n\n export INGRESS_IP_ADDRESS=EXTERNAL_IP_ADDRESS\n export INGRESS_PORT=\u003cvar translate=\"no\"\u003ePORT_NUMBER\u003c/var\u003e\n\n4. Call the API proxy: \n\n ```\n curl -H Host:$DOMAIN --resolve \\\n $DOMAIN:$INGRESS_PORT:$INGRESS_IP_ADDRESS \\\n https://$DOMAIN:$INGRESS_PORT/myproxy -k\n ```\n\n\n For example: \n\n ```\n curl -H Host:example.com --resolve example.com:443:233.252.0.123 https://example.com:443/myproxy -k\n ```\n\n\nTo learn more about building and deploying API proxies, see [Build your first proxy overview](/apigee/docs/api-platform/get-started/get-started).\n| **Congratulations!**\n|\n| You've successfully installed Apigee hybrid. To learn more about building and deploying\n| API proxies, see [Introduction to API proxy building](/apigee/docs/api-platform/fundamentals/build-simple-api-proxy).\n\n*[Google Cloud]: Google Cloud"]]