REST Resource: properties
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משאב: נכס
צמד מפתח/ערך שמצורף לקובץ שהוא ציבורי או פרטי לאפליקציה.
המגבלות הבאות חלות על מאפייני הקובץ:
- אפשר להעלות עד 100 נכסים בכל קובץ
- עד 30 נכסים פרטיים לכל אפליקציה
- עד 30 נכסים ציבוריים
- מגבלת גודל של 124 בייטים לכל היותר למחרוזת (מפתח + ערך) בקידוד UTF-8 במאפיין יחיד
כדי להשתמש בחלק מהשיטות של המשאבים (כמו properties.update
), נדרש propertyKey
. משתמשים ב-method properties.list
כדי לאחזר את המפתח של נכס.
ייצוג ב-JSON |
{
"selfLink": string,
"value": string,
"visibility": string,
"kind": string,
"etag": string,
"key": string
} |
שדות |
selfLink |
string
פלט בלבד. הקישור חזרה לנכס הזה.
|
value |
string
הערך של המאפיין הזה.
|
visibility |
string
רמת החשיפה של הנכס הזה. הערכים המותרים הם PRIVATE (ברירת המחדל) ו-PUBLIC. אפשר לאחזר נכסים פרטיים רק באמצעות בקשה מאומתת. בבקשה מאומתת נעשה שימוש באסימון גישה שהתקבל באמצעות מזהה לקוח ב-OAuth 2. אי אפשר להשתמש במפתח API כדי לאחזר נכסים פרטיים.
|
kind |
string
פלט בלבד. הערך הזה הוא תמיד drive#property .
|
etag |
string
פלט בלבד. ה-ETag של הנכס.
|
key |
string
המפתח של הנכס הזה.
|
Methods |
|
מחיקה של נכס. |
|
אחזור נכס לפי המפתח שלו. |
|
הוספה של מאפיין לקובץ, או עדכון שלו אם הוא כבר קיים. |
|
הצגת רשימה של מאפייני הקובץ. |
|
עדכון נכס. |
|
עדכון נכס. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# REST Resource: properties\n\n- [Resource: Property](#Property)\n - [JSON representation](#Property.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Property\n------------------\n\nA key-value pair attached to a file that is either public or private to an application.\n\nThe following limits apply to file properties:\n\n- Maximum of 100 properties total per file\n- Maximum of 30 private properties per app\n- Maximum of 30 public properties\n- Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property\n\nSome resource methods (such as `properties.update`) require a `propertyKey`. Use the `properties.list` method to retrieve the key for a property.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------|\n| ``` { \"selfLink\": string, \"value\": string, \"visibility\": string, \"kind\": string, \"etag\": string, \"key\": string } ``` |\n\n| Fields ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `selfLink` | `string` Output only. The link back to this property. |\n| `value` | `string` The value of this property. |\n| `visibility` | `string` The visibility of this property. Allowed values are PRIVATE (default) and PUBLIC. Private properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties. |\n| `kind` | `string` Output only. This is always `drive#property`. |\n| `etag` | `string` Output only. ETag of the property. |\n| `key` | `string` The key of this property. |\n\n| Methods ------- ||\n|------------------------------------------------------------------------|----------------------------------------------------------------|\n| ### [delete](/workspace/drive/api/reference/rest/v2/properties/delete) | Deletes a property. |\n| ### [get](/workspace/drive/api/reference/rest/v2/properties/get) | Gets a property by its key. |\n| ### [insert](/workspace/drive/api/reference/rest/v2/properties/insert) | Adds a property to a file, or updates it if it already exists. |\n| ### [list](/workspace/drive/api/reference/rest/v2/properties/list) | Lists a file's properties. |\n| ### [patch](/workspace/drive/api/reference/rest/v2/properties/patch) | Updates a property. |\n| ### [update](/workspace/drive/api/reference/rest/v2/properties/update) | Updates a property. |"]]