Limiti di utilizzo e quote
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
I limiti e le quote proteggono l'infrastruttura di Google da un processo automatizzato
che utilizza l'API Reseller in modo inappropriato. Un numero eccessivo di richieste da
un'API potrebbe essere il risultato di un errore di battitura innocuo o di un sistema progettato in modo inefficiente che effettua chiamate API inutili. Indipendentemente dalla causa,
il blocco del traffico proveniente da una fonte specifica quando raggiunge un determinato livello è
necessario per la salute generale del sistema Google Workspace. Garantisce che
le azioni di uno sviluppatore non possano avere un impatto negativo sulla community più ampia.
Errori di richiesta API
Nell'improbabile eventualità che la richiesta API non vada a buon fine, la tua applicazione riceve una risposta con codice di stato HTTP. Un codice di stato 403
contiene informazioni
sull'errore relativo all'input errato e un codice di stato HTTP 503
contiene informazioni sull'errore che indicano quali quote API sono state superate. Queste
risposte consentono alla tua applicazione personalizzata di rilevare questi errori e intraprendere l'azione
appropriata.
Errori basati sul tempo
Per tutti gli errori basati sul tempo (massimo N elementi per N secondi per thread), in particolare gli errori del codice di stato 503
, ti consigliamo di fare in modo che il codice rilevi l'eccezione e, utilizzando un algoritmo di backoff esponenziale, attenda un breve ritardo prima di riprovare la chiamata non riuscita. Un esempio di API Reseller per un thread consiste nell'attendere 5 secondi e riprovare la chiamata non riuscita. Se la richiesta ha esito positivo,
ripeti questo pattern per gli altri thread. Se la seconda richiesta non va a buon fine, l'applicazione deve ridurre la frequenza delle richieste
finché una chiamata non va a buon fine. Ad esempio, aumenta il ritardo iniziale di 5 secondi
a 10 secondi e riprova a effettuare la chiamata non riuscita. Inoltre, decidi un limite di tentativi.
Ad esempio, riprova una richiesta 5-7 volte con tempi di ritardo diversi prima che l'applicazione restituisca un errore all'utente.
Limiti
Categorie di limiti API |
Limiti |
Abbonamento purchaseOrderId |
Questa proprietà accetta fino a 80 caratteri di testo normale. |
Abbonamento maxResults |
La stringa di query maxResults può contenere da 1 a 100 risultati.
Il valore predefinito è 20 risultati.
|
Token di trasferimento (customerAuthToken ) |
Il token di trasferimento di un cliente è valido per 30 giorni dalla data di generazione.
|
Numero massimo di utenti per un cliente |
A seconda del contratto, il numero massimo di utenti può essere
50.000 o il massimo definito nel contratto
del rivenditore.
|
Richieste non autorizzate |
Google non consente richieste non autorizzate all'API Reseller.
Una richiesta viene considerata non autorizzata se non viene fornito alcun token di autorizzazione. Per ulteriori
informazioni, consulta
Informazioni su autenticazione e autorizzazione.
|
Altri tipi di limiti
Altri tipi di limiti |
Limitazioni e linee guida |
Formato dei dati |
Il formato dei dati è JavaScript Object Notation
JSON.
JSON è un formato internet comune che fornisce un metodo di
rappresentazione di strutture di dati arbitrarie. JSON è un
formato di testo completamente indipendente dalla lingua, ma utilizza convenzioni
familiari ai programmatori della famiglia di linguaggi C, tra cui
C, C++, C#, Java, JavaScript, Perl e Python.
|
Formato ora |
Tutte le date e gli orari sono nel convertitore di Epoch
in millisecondi. Questo formato si applica ai valori relativi all'ora di creazione dell'abbonamento, alle ore di inizio e di fine dell'impegno di un piano e all'ora di fine di una prova senza costi di 30 giorni.
|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-29 UTC.
[null,null,["Ultimo aggiornamento 2025-08-29 UTC."],[],[],null,["# Usage limits and quotas\n\n\u003cbr /\u003e\n\nLimits and quotas protect the Google infrastructure from an automated process\nthat uses the Reseller API in an inappropriate way. Excessive requests from\nan API might result from a harmless typo, or might result from an inefficiently\ndesigned system that makes needless API calls. Regardless of the cause,\nblocking traffic from a specific source when it reaches a certain level is\nnecessary for the overall health of the Google Workspace system. It ensures that\none developer's actions can not negatively impact the larger community.\n\nAPI request failures\n--------------------\n\nIn the unlikely event that your API request fails, your application receives an\nHTTP status code response. A status code of `403` has error\ninformation about incorrect input and an HTTP status code of `503`\nhas error information indicating which API quotas have been exceeded. These\nresponses let your custom application detect these errors and take appropriate\naction.\n\nTime-based errors\n-----------------\n\nFor all errors that are time based (maximum of N things for N seconds per\nthread), especially the `503` status code errors, we recommend that\nyour code catch the exception and by using\nan\n[exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff)\nalgorithm, wait for a small delay before retrying the failed call. A\nReseller API example for one thread\nis to wait 5 seconds and retry the failed call. If the request is successful,\nrepeat this pattern for the other threads. If the second request isn't\nsuccessful, your application should scale back on the frequency of the request\nuntil a call is successful. For example, increase the initial 5 second delay\nto 10 seconds and retry your failed call again. Also, decide on a retry limit.\nFor example retry a request 5 to 7 times with different delay times before\nyour application returns an error to the user.\n\nLimits\n------\n\n| API limit categories | Limits |\n|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Subscription `purchaseOrderId` | This property accepts up to 80 plain text characters. |\n| Subscription `maxResults` | The `maxResults` query string can be 1 - 100 results. The default is 20 results. |\n| Transfer Token (`customerAuthToken`) | A customer's transfer token is valid for 30 days after it's generated. |\n| Maximum number of users for a customer | Depending on your contract, the maximum number of users can either be 50,000 or the maximum defined in your reseller contract. |\n| Unauthorized requests | Google doesn't allow unauthorized requests to the Reseller API. A request is considered unauthorized if no authorization token is provided. For more information, see [Learn about authentication \\& authorization](/workspace/guides/auth-overview). |\n\nOther types of limits\n---------------------\n\n| Other types of limits | Limitations and guidelines |\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data format | The data format is in the JavaScript Object Notation [JSON](https://wikipedia.org/wiki/JSON). \u003cbr /\u003e \u003cbr /\u003e JSON is a common internet format that provides a method of representing arbitrary data structures. JSON is a text format that is completely language-independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, and Python. |\n| Time format | All date times are in the [Epoch converter](https://www.epochconverter.com/) in milliseconds. This format applies to the values for the subscription creation time, a plan's commitment start and end times, and a 30 day free trial's end time. |"]]