Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Deux options sont disponibles pour tester l'API Admin : OAuth 2.0 Playground ou APIs Explorer.
OAuth 2.0 Playground
Utilisez OAuth 2.0 Playground pour prévisualiser un flux d'authentification, obtenir des jetons d'accès et envoyer des requêtes HTTP. Pour utiliser OAuth 2.0 Playground :
À l'étape 1, le champ d'application https://www.googleapis.com/auth/cloud-platform est présélectionné. Cliquez sur Autoriser les API pour lancer le processus d'authentification.
Suivez le "flux d'authentification implicite" en cliquant sur Autoriser pour permettre à Google OAuth 2.0 Playground d'accéder à vos services Google Cloud.
À l'étape 2, cliquez sur Exchange authorization code for tokens (Échanger le code d'autorisation contre des jetons).
À l'étape 3, le champ URI de la demande est prérempli avec l'exemple d'URI suivant :
Vous devez remplacer {appsId} par l'ID de votre projet Google Cloud Platform, puis cliquer sur Send the request pour afficher les détails du service default de votre projet.
Utilisez ce champ URI pour envoyer des requêtes HTTP sur les ressources spécifiées dans votre projet. Pour en savoir plus sur la spécification des ressources dans les URI de requêtes, consultez la section REST dans l'API Admin.
API Explorer
Utilisez APIs Explorer pour afficher une liste de toutes les méthodes, tous les champs et toutes les descriptions de l'API Admin. Cliquez ensuite sur les éléments de la liste pour générer des URI et envoyer des requêtes HTTP sur les ressources spécifiées.
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 2024/12/22 (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 2024/12/22 (UTC)."],[[["\u003cp\u003eThe Admin API can be explored using either the OAuth 2.0 Playground or the APIs Explorer.\u003c/p\u003e\n"],["\u003cp\u003eThe OAuth 2.0 Playground allows you to preview authentication flows, get access tokens, and send HTTP requests.\u003c/p\u003e\n"],["\u003cp\u003eThe APIs Explorer provides a comprehensive list of Admin API methods and fields, enabling you to generate URIs and send HTTP requests.\u003c/p\u003e\n"],["\u003cp\u003eUsing the OAuth 2.0 Playground, you will need to authorize API access, exchange an authorization code for tokens, and replace placeholders in the request URI with your Google Cloud project details.\u003c/p\u003e\n"]]],[],null,["# Trying Out the Admin API\n\nThere are two options for trying out the Admin API, either the\n**OAuth 2.0 Playground** or the **APIs Explorer**.\n\nOAuth 2.0 Playground\n--------------------\n\nUse the **OAuth 2.0 Playground** to preview an authentication flow, obtain\naccess tokens, and also send HTTP requests. To use the OAuth 2.0 Playground:\n\n1. Open the [OAuth 2.0 Playground](https://developers.google.com/oauthplayground/#step1&scopes=https%3A//www.googleapis.com/auth/cloud-platform&url=https%3A//appengine.googleapis.com/v1/apps/%7BappsId%7D/services/default&content_type=application/json&http_method=GET&useDefaultOauthCred=unchecked&oauthEndpointSelect=Google&oauthAuthEndpointValue=https%3A//accounts.google.com/o/oauth2/v2/auth&oauthTokenEndpointValue=https%3A//oauth2.googleapis.com/token&includeCredentials=unchecked&accessTokenType=bearer&autoRefreshToken=unchecked&accessType=offline&forceAprovalPrompt=checked&response_type=code).\n2. In Step 1, the **https://www.googleapis.com/auth/cloud-platform** scope is pre-selected for you. Click **Authorize APIs** to start the authentication flow.\n3. Follow the \"implicit authentication flow\" by clicking **Allow** to authorize the Google OAuth 2.0 Playground access to your Google Cloud services.\n4. In Step 2, click **Exchange authorization code for tokens** to receive an\n access token.\n\n | **Note:** You can use these access tokens in HTTP requests that you want to run from the command line, as long as you do so prior to their expiration time. For example, use these access tokens to run cURL commands.\n5. In Step 3, the **Request URI** field is pre-populated with the example URI:\n\n https://appengine.googleapis.com/v1/apps/{appsId}/services/default\n\n You must replace `{appsId}` with your Google Cloud Platform project ID\n and then click `Send the request` to view the details about the\n `default` service of your project.\n\n Use this URI field to send HTTP requests against the resources that you\n specify in your project. For more information about specifying resources in\n request URIs, see\n [REST in the Admin API](/appengine/docs/admin-api/rest-in-the-api).\n | **Tip:** You can also click **List possible operations** and then scroll to the **App Engine Admin API** section to view a list of HTTP request. If you select an operation, it will populate the **Request URI** field with a template URI, in which you must specify the IDs of your resources before sending the request.\n\nAPIs Explorer\n-------------\n\nUse the **APIs Explorer** to view a list of all the Admin API\nmethods, fields, and their descriptions. You can then click the items in the\nlist to generate URIs and send HTTP requests against the resources that you\nspecify.\n| **Tip:** You can also use the APIs Explorer widgets in each of the API methods, for example [`apps.get`](/appengine/docs/admin-api/reference/rest/v1/apps/get#try-it).\n\nTo use the APIs Explorer:\n\n1. Open the [APIs Explorer](http://developers.google.com/apis-explorer/#p/appengine/v1/).\n2. Select the method that you want to try out.\n3. Specify the IDs of the resources in your project as well as any supported fields.\n4. Click **Execute** to send the HTTP request against your project and then view both the generated request URI and HTTP response.\n\nWhat's next\n-----------\n\n- [Accessing the API](/appengine/docs/admin-api/accessing-the-api)"]]