Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Per effettuare qualsiasi richiesta all'API Maps Datasets, devi includere:
Il numero o l'ID del tuo progetto Google Cloud nell'X-Goog-User-Project intestazione della richiesta. Questo valore determina il progetto utilizzato per i calcoli delle quote di fatturazione e utilizzo.
Un token OAuth nell'intestazione Authorization della richiesta. Per ulteriori informazioni sull'utilizzo di OAuth con l'API Maps Datasets, consulta Utilizzare OAuth.
Un numero o un ID progetto Google Cloud nell'URL della richiesta. Questo valore
specifica il progetto contenente il set di dati. Sebbene in genere questo progetto sia uguale a quello specificato nell'intestazione X-Goog-User-Project, non è obbligatorio che lo sia.
L'ID del set di dati nell'URL della richiesta. Ogni volta che esegui un'azione su un insieme di dati specifico, devi passare l'ID del set di dati nell'URL della richiesta.
Il Numero progetto e l'ID progetto vengono visualizzati nell'area Informazioni sul progetto della schermata di panoramica.
Ottenere un token OAuth
Per l'autenticazione, la richiesta API deve contenere un token OAuth nell'Authorization intestazione. Per saperne di più, consulta l'articolo Utilizzare OAuth.
Ad esempio, utilizza il seguente comando gcloud per generare il token:
Puoi includere il comando gcloud direttamente nell'intestazione Authorization di un
comando cURL per generare un nuovo token per ogni richiesta, come mostrato nell'esempio
sopra.
In alternativa, puoi impostare una variabile di ambiente contenente il token e poi passarla come parte della richiesta:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-05-13 UTC."],[[["All Maps Datasets API requests require a Google Cloud project number or ID for billing and usage quota, specified in the `X-Goog-User-Project` header or using a service account."],["An OAuth token is necessary for authentication and should be included in the `Authorization` header of each request."],["The request URL must contain the Google Cloud project number or ID and the dataset ID to specify the location of the dataset."],["Additional parameters may be required for certain requests, as detailed in the specific request documentation."],["You can obtain your Google Cloud project number or ID from the project's Overview page in the Cloud Console and generate an OAuth token using the `gcloud` command."]]],["To interact with the Maps Datasets API, requests must include: the Google Cloud project number or ID in the `X-Goog-User-Project` header for billing and quota (unless using a service account); an OAuth token in the `Authorization` header; the project number or ID in the URL; and the dataset ID in the URL. The project number and ID can be found on the project's overview page. An OAuth token can be generated using the `gcloud auth application-default print-access-token` command.\n"]]