Batas penggunaan dan kuota
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Batas dan kuota melindungi infrastruktur Google dari proses otomatis yang menggunakan Reseller API dengan cara yang tidak tepat. Permintaan yang berlebihan dari
API mungkin disebabkan oleh kesalahan ketik yang tidak berbahaya, atau mungkin disebabkan oleh sistem yang dirancang secara tidak efisien yang melakukan panggilan API yang tidak perlu. Terlepas dari penyebabnya, memblokir traffic dari sumber tertentu saat mencapai tingkat tertentu diperlukan untuk menjaga kesehatan keseluruhan sistem Google Workspace. Hal ini memastikan bahwa
tindakan satu developer tidak dapat berdampak negatif pada komunitas yang lebih besar.
Kegagalan permintaan API
Jika permintaan API Anda gagal, aplikasi Anda akan menerima respons kode status HTTP. Kode status 403
memiliki informasi error tentang input yang salah dan kode status HTTP 503
memiliki informasi error yang menunjukkan kuota API mana yang telah terlampaui. Respons
ini memungkinkan aplikasi kustom Anda mendeteksi error ini dan mengambil tindakan yang
sesuai.
Error berbasis waktu
Untuk semua error berbasis waktu (maksimum N hal untuk N detik per thread), terutama error kode status 503
, sebaiknya kode Anda menangkap pengecualian dan menggunakan algoritma penundaan eksponensial, tunggu penundaan singkat sebelum mencoba lagi panggilan yang gagal. Contoh Reseller API untuk satu thread adalah menunggu 5 detik dan mencoba lagi panggilan yang gagal. Jika permintaan berhasil,
ulangi pola ini untuk thread lainnya. Jika permintaan kedua tidak berhasil, aplikasi Anda harus mengurangi frekuensi permintaan hingga panggilan berhasil. Misalnya, tingkatkan penundaan awal 5 detik
menjadi 10 detik dan coba lagi panggilan yang gagal. Selain itu, tentukan batas percobaan ulang.
Misalnya, coba lagi permintaan 5 hingga 7 kali dengan waktu tunda yang berbeda sebelum
aplikasi Anda menampilkan error kepada pengguna.
Batas
Kategori batas API |
Batas |
Langganan purchaseOrderId |
Properti ini menerima hingga 80 karakter teks biasa. |
Langganan maxResults |
String kueri maxResults dapat berupa 1 - 100 hasil.
Defaultnya adalah 20 hasil.
|
Token Transfer (customerAuthToken ) |
Masa berlaku token transfer pelanggan adalah 30 hari setelah dibuat.
|
Jumlah maksimum pengguna untuk pelanggan |
Bergantung pada kontrak Anda, jumlah maksimum pengguna dapat berupa
50.000 atau jumlah maksimum yang ditentukan dalam kontrak reseller Anda.
|
Permintaan tidak sah |
Google tidak mengizinkan permintaan yang tidak sah ke Reseller API.
Permintaan dianggap tidak sah jika tidak ada token otorisasi yang diberikan. Untuk mengetahui informasi selengkapnya, lihat Mempelajari autentikasi & otorisasi.
|
Jenis batas lainnya
Jenis batas lainnya |
Batasan dan panduan |
Format data |
Format data adalah JavaScript Object Notation
JSON.
JSON adalah format internet umum yang menyediakan metode untuk
merepresentasikan struktur data arbitrer. JSON adalah
format teks yang sepenuhnya independen dari bahasa, tetapi menggunakan konvensi
yang familier bagi programmer bahasa keluarga C, termasuk
C, C++, C#, Java, JavaScript, Perl, dan Python.
|
Format waktu |
Semua waktu tanggal ada di Pengonversi epoch
dalam milidetik. Format ini berlaku untuk nilai waktu pembuatan langganan, waktu mulai dan berakhir komitmen paket, serta waktu berakhir uji coba gratis 30 hari.
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-29 UTC.
[null,null,["Terakhir diperbarui pada 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. |"]]