מכסות ומגבלות שימוש
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
המגבלות והמכסות מגנות על התשתית של Google מפני תהליך אוטומטי שמשתמש ב-Reseller API בצורה לא הולמת. בקשות מוגזמות מ-API יכולות לנבוע משגיאת הקלדה תמימה, או ממערכת לא יעילה ששולחת קריאות מיותרות ל-API. לא משנה מה הסיבה, חסימת תנועה ממקור מסוים כשהיא מגיעה לרמה מסוימת היא הכרחית כדי לשמור על תקינות המערכת של Google Workspace. היא מבטיחה שפעולות של מפתח אחד לא ישפיעו לרעה על הקהילה הרחבה יותר.
בקשות API שנכשלו
במקרה הלא סביר שבקשת ה-API תיכשל, האפליקציה שלכם תקבל תגובה עם קוד סטטוס HTTP. קוד סטטוס 403
כולל מידע על שגיאה שקשורה לקלט שגוי, וקוד סטטוס 503
כולל מידע על שגיאה שמציין אילו מכסות של API חרגו. התשובות האלה מאפשרות לאפליקציה המותאמת אישית לזהות את השגיאות האלה ולבצע את הפעולה המתאימה.
שגיאות שקשורות לזמן
לכל השגיאות שמבוססות על זמן (מקסימום N פריטים למשך N שניות לכל שרשור), במיוחד שגיאות עם קוד סטטוס 503
, מומלץ שהקוד יתפוס את החריגה וימתין פרק זמן קצר לפני שינסה שוב לבצע את הקריאה שנכשלה, באמצעות אלגוריתם של השהיה מעריכית לפני ניסיון חוזר (exponential backoff). דוגמה ל-API של משווק עם thread אחד: צריך להמתין 5 שניות ולנסות שוב את הקריאה שנכשלה. אם הבקשה מצליחה, חוזרים על התהליך הזה עבור שאר השרשורים. אם הבקשה השנייה לא מצליחה, האפליקציה צריכה להקטין את תדירות הבקשות עד שהשיחה תצליח. לדוגמה, אפשר להגדיל את ההשהיה הראשונית של 5 שניות ל-10 שניות ולנסות שוב להתקשר. כמו כן, צריך להגדיר מגבלה על מספר הניסיונות החוזרים.
לדוגמה, אפשר לנסות לשלוח בקשה 5 עד 7 פעמים עם פרקי זמן שונים בין הניסיונות, לפני שהאפליקציה מחזירה שגיאה למשתמש.
מגבלות
קטגוריות של מגבלות על ממשקי API |
מגבלות |
מינוי purchaseOrderId |
אפשר להזין בנכס הזה עד 80 תווים של טקסט רגיל. |
מינוי maxResults |
מחרוזת השאילתה maxResults יכולה להכיל 1 עד 100 תוצאות.
ברירת המחדל היא 20 תוצאות.
|
טוקן העברה (customerAuthToken ) |
אסימון העברה של לקוח תקף למשך 30 יום אחרי שהוא נוצר.
|
מספר המשתמשים המקסימלי ללקוח |
בהתאם לחוזה שלכם, המספר המקסימלי של משתמשים יכול להיות 50,000 או המספר המקסימלי שמוגדר בחוזה שלכם עם המשווק.
|
בקשות לא מורשות |
Google לא מאפשרת בקשות לא מורשות ל-Reseller API.
בקשה נחשבת לא מורשית אם לא סופק טוקן הרשאה. מידע נוסף זמין במאמר מידע על אימות והרשאה.
|
סוגים אחרים של מגבלות
סוגים אחרים של מגבלות |
הגבלות והנחיות |
פורמט נתונים |
פורמט הנתונים הוא JavaScript Object Notation JSON.
JSON הוא פורמט אינטרנט נפוץ שמאפשר לייצג מבני נתונים שרירותיים. JSON הוא פורמט טקסט שלא תלוי בשפה, אבל הוא משתמש במוסכמות שמוכרות למתכנתים בשפות ממשפחת C, כולל C, C++, C#, Java, JavaScript, Perl ו-Python.
|
פורמט זמן |
כל התאריכים והשעות הם בפורמט Epoch converter
באלפיות השנייה. הפורמט הזה חל על הערכים של שעת יצירת המינוי, שעות ההתחלה והסיום של תקופת ההתחייבות של תוכנית ושעת הסיום של תקופת ניסיון בחינם למשך 30 יום.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-29 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]