Batas dan Kuota
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Batas dan kuota melindungi infrastruktur Google dari proses otomatis yang menggunakan Enterprise License Manager API dengan cara yang tidak tepat. Permintaan yang berlebihan dari API dapat disebabkan oleh kesalahan ketik yang tidak berbahaya, atau mungkin disebabkan oleh sistem yang tidak dirancang secara efisien yang membuat panggilan API yang tidak perlu. Apa pun penyebabnya, pemblokiran traffic dari sumber tertentu setelah mencapai tingkat tertentu diperlukan untuk kesehatan sistem Google Workspace secara keseluruhan. Mode Izin memastikan bahwa tindakan developer tertentu tidak dapat berdampak negatif pada komunitas yang lebih luas.
Jika permintaan API gagal, Anda akan menerima respons kode status HTTP. Kode status 403 memiliki informasi error tentang input yang salah, dan kode status HTTP 503 berisi informasi error yang menunjukkan kuota API yang telah terlampaui. Respons ini memungkinkan aplikasi kustom mendeteksi error ini dan mengambil tindakan yang tepat.
Jika permintaan Anda harus diselesaikan dalam jangka waktu tertentu, kirim permintaan Anda dalam batch. Bergantung pada tujuan API Anda dan jika jumlah permintaan terlalu tinggi, error kuota akan terjadi.
Jika Anda tidak dapat menggunakan fitur permintaan batch API yang direkomendasikan, gunakan algoritma backoff eksponensial. Untuk semua error yang berbasis waktu (maksimum N sesuatu selama X detik per thread), terutama error kode status 503, sebaiknya kode Anda menangkap pengecualian dan, menggunakan algoritma backoff eksponensial, tunggu sedikit penundaan sebelum mencoba kembali panggilan yang gagal. Contoh Enterprise License Manager 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 menskalakan kembali frekuensi permintaan hingga panggilan berhasil. Misalnya, tingkatkan penundaan 5 detik awal 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 penundaan yang berbeda sebelum aplikasi Anda menampilkan error kepada pengguna.
Kategori Kuota API |
Kuota |
Kueri per detik (QPS) |
Kuota QPS adalah 1. |
Kategori Batas API |
Batas |
String kueri maxResults |
Ukuran maksimum maxResults adalah 100. |
Jenis Batas Lainnya |
Batasan dan Pedoman |
Permintaan batch
|
API mendukung pengiriman permintaan batch.
|
Format data dalam respons API |
Format data respons adalah JavaScript Object Notation (JSON).
|
Mengaktifkan Enterprise License Manager API |
Provisioning API harus diaktifkan sebelum melakukan panggilan ke Enterprise License Manager API. Di panel kontrol Anda, buka halaman Setelan pada tab Pengguna dan grup, lalu aktifkan Provisioning API. Simpan perubahan Anda. Selain itu, layanan Google Grup harus diaktifkan dan diaktifkan.
|
Permintaan tidak sah |
API tidak menerima permintaan tidak sah. Permintaan dianggap tidak sah jika tidak ada token otorisasi yang diberikan. Untuk informasi selengkapnya, lihat Mengizinkan Permintaan.
|
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-04 UTC.
[null,null,["Terakhir diperbarui pada 2025-08-04 UTC."],[],[],null,["# Limits and Quotas\n\nLimits and quotas protect the Google infrastructure from an automated process that uses the Enterprise License Manager API in an inappropriate way. Excessive requests from an API might result from a harmless typo, or may result from an inefficiently designed system that makes needless API calls. Regardless of the cause, blocking traffic from a specific source once it reaches a certain level is necessary for the overall health of the Google Workspace system. It ensures that one developer's actions cannot negatively impact the larger community.\n\nIn the unlikely event that your API request fails, you'll receive an HTTP status code response. A status code of 403 has error information about incorrect input, and an HTTP status code of 503 has error information indicating which API quotas have been exceeded. These responses allow your custom application to detect these errors and take appropriate action.\n\nIf your requests need to be completed in a fixed period of time, send your requests [batched together](/workspace/admin/licensing/v1/how-tos/batch). Depending upon your API's purpose and if the number of requests gets too high, quota errors will occur.\n\nIf you are not able to use the recommended API batched requests feature, use the exponential backoff algorithm. For all errors that are time based (maximum of N things for X seconds per thread), especially the 503 status code errors, we recommend your code catch the exception and, using an [exponential backoff](http://wikipedia.org/wiki/Truncated_binary_exponential_backoff) algorithm, wait for a small delay before retrying the failed call. A Enterprise License Manager API example for one thread is to wait 5 seconds and retry the failed call. If the request is successful, repeat this pattern for the other threads. If the second request is not successful, your application should scale back on the frequency of the request until a call is successful. For example, increase the initial 5 second delay to 10 seconds and retry your failed call again. Also, decide on a retry limit. For example retry a request 5 to 7 times with different delay times before your application returns an error to the user.\n\n| API Quota Categories | Quotas |\n|--------------------------|---------------------|\n| Queries per second (QPS) | The QPS quota is 1. |\n\n| API Limit Categories | Limits |\n|-------------------------|------------------------------------------|\n| maxResults query string | The maximum size of a maxResults is 100. |\n\n| Other Types of Limits | Limitations and Guidelines |\n|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Batch requests | The API supports sending [batch requests](/workspace/admin/licensing/v1/how-tos/batch). |\n| Data format in API responses | The response's data format is Javascript Object Notation ([JSON](http://json.org/)). |\n| Enabling the Enterprise License Manager API | The Provisioning API has to be enabled before making calls to the Enterprise License Manager API. In your control panel, go to the Users and groups tab's Settings page and enable the Provisioning API. Save your changes. In addition, the Google Groups service must be enabled and activated. |\n| Unauthorized requests | The API does not accept any unauthorized requests. A request is considered unauthorized if no authorization token is provided. For more information, see [Authorizing Requests.](/workspace/admin/licensing/v1/how-tos/authorizing) |"]]