סקירה כללית של התוויות
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תוויות הן מטא-נתונים שאתם מגדירים כדי לעזור למשתמשים לארגן ולמצוא קבצים ב-Google Drive, וגם להוסיף להם כללי מדיניות. Drive API מאפשר למפתחים להחיל תוויות על קבצים ותיקיות, להגדיר ערכים בשדות של תוויות, לקרוא תוויות וערכים בשדות של קבצים ולחפש קבצים באמצעות מונחים של מטא-נתונים שמוגדרים על ידי טקסונומיה של תוויות בהתאמה אישית.
תוויות ב-Drive יכולות לתמוך בתהליכים עסקיים על ידי צירוף מטא-נתונים לקבצים ולתיקיות. שימושים נפוצים בתוויות:
סיווג תוכן בהתאם לאסטרטגיה לניהול מדיניות לגבי מידע – אפשר ליצור תווית כדי לזהות תוכן רגיש או נתונים שדורשים טיפול מיוחד.
לדוגמה, אפשר ליצור תווית עם סמל (תווית עם ערכי אפשרויות מקודדים בצבע) בשם 'רגישות' עם הערכים 'סודי ביותר', 'סודי' ו'ציבורי'.
החלת מדיניות על פריטים ב-Drive – יצירת תוויות לניהול תוכן ב-Drive לאורך מחזור החיים שלו, כדי לוודא שהוא עומד בדרישות של שיטות ניהול הרשומות של הארגון. לדוגמה, אפשר להשתמש בתוויות כדי לנהל מדיניות למניעת אובדן נתונים (DLP), כך שהמשתמשים לא יוכלו להוריד קבצים עם התווית 'רגישות' שהוגדרה כ'סודי ביותר'.
ארגון קבצים וחיפוש שלהם – אתם יכולים ליצור תוויות כדי לשפר את יכולת החיפוש של התוכן בחברה. כך אנשים בארגון יוכלו למצוא פריטים לפי תוויות והשדות שלהן. לדוגמה, אפשר להחיל את קבוצת התוויות 'סטטוס החתימה' על 'ממתין לחתימה' לכל החוזים שממתינים לחתימה עד לתאריך מסוים. אחרי זה, אם מישהו יחפש ב-Drive את המילים "צריך לחתום", החוזים האלה יופיעו בתוצאות.
ריכזנו כאן רשימה של מונחים נפוצים שקשורים לתוויות ב-Drive:
- הוספת תווית
מטא-נתונים מובְנים שמוצבים בקובץ ב-Drive.
משתמשים ב-Drive יכולים להקצות תוויות ולהגדיר ערכים בשדות של תוויות בקבצים. התוויות מורכבות מ:
- שם התווית
- שם המשאב של התווית. מזהה התווית הוא חלק משם התווית. בהתאם לבקשה, השם הוא באחת מהצורות הבאות:
labels/{id}
או labels/{id}@{revisionId}
. מידע נוסף זמין בקטע שינוי תוויות שבהמשך.
- מזהה התווית
- מזהה ייחודי גלובלי של התווית. המזהה הוא חלק משם התווית, אבל בניגוד לשם, הוא זהה בכל הגרסאות.
- שדה
רכיב שניתן להקלדה ולהגדרה בתווית. תווית יכולה לכלול אפס שדות או יותר. אפשר להגדיר שדות בחירה ושדות משתמש עם כמה ערכים אם השדה מוגדר עם ListOptions
ב-Google Drive Labels API.
- סוג השדה
- סוג הנתונים של הערך שמשויך לשדה. אפשר להגדיר את הערך בתור מספר שלם, מחרוזת תאריך, טקסט, משתמש או בחירה. הסוג שתבחרו ישפיע על הערכים התקפים שרלוונטיים לפריטים ב-Drive וגם על אפשרויות שאילתות החיפוש שיהיו זמינות.
- טקסונומיה של תוויות
שדות התוויות שהוגדרו וזמינים למשתמשים להוספה לקבצים ב-Drive. Readable and writable through the
Drive Labels API. נקרא גם סכימת התוויות.
- Label revision
מופע של התווית. בכל פעם שיוצרים, מעדכנים, מפרסמים או מוציאים משימוש תווית, מספר הגרסה של התווית עולה.
- Draft revision
- מספר הגרסה של מופע הטיוטה הנוכחי של התווית. אתם יכולים לבצע כמה עדכונים בתווית, וכל עדכון יגדיל את מספר הטיוטה שלה, בלי להשפיע על הגרסה שפורסמה. האפשרות ליצור תוויות בטיוטה מאפשרת לכם לבדוק עדכונים של תוויות לפני הפרסום.
- גרסה קודמת שפורסמה
- מספר הגרסה של התווית שפורסמה. התווית שפורסמה היא המופע של התווית שזמין למשתמשים.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-04 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-04 (שעון UTC)."],[],[],null,["# Labels overview\n\n*Labels* are metadata that you define to help users organize, find, and apply\npolicy to files in Google Drive. The Drive API allows developers to\napply labels to files and folders, set label field values, read labels and field\nvalues on files, and search for files using metadata terms defined by the custom\nlabel taxonomy.\n\nDrive labels can support business processes by attaching metadata\nto files and folders. Common uses for labels are:\n\n- **Classify content to follow an information governance strategy**---Create a\n label to identify sensitive content or data that requires special handling.\n For example, you might create a badged label (a label with color-coded\n option values) titled \"Sensitivity\" with the values of \"Top Secret,\"\n \"Confidential,\" and \"Public.\"\n\n- **Apply policy to items in Drive**---Create labels to manage\n Drive content throughout its lifecycle and ensure it adheres\n to your organization's record keeping practices. For example, use labels to\n manage a data loss policy (DLP) whereby users can't download files with a\n \"Sensitivity\" label set to \"Top Secret\".\n\n- **Curate and find files**---Create labels to increase searchability of your\n company's content by letting people in your organization find items based on\n labels and their fields. For example, apply a \"Signature Status\" label set\n to \"Awaiting Signature\" to all contracts awaiting signature by a specific\n date. Drive search can then return these contracts when\n someone searches \"awaiting signature\".\n\nBelow is a list of common terms used by Drive labels:\n\n*Label*\n\n: Structured metadata placed on a Drive file.\n Drive users can assign labels and set label field values\n for files. Labels are composed of:\n\n *Label name*\n : The resource name of the label. The *label ID* is part of the\n Label name. Depending on the request, the name is in the form of either:\n `labels/{id}` or `labels/{id}@{revisionId}`. For more information, see\n [Label revision](#revision) below.\n\n *Label ID*\n : A globally unique identifier for the label. The ID is part of the\n label name, but unlike the name, it's consistent between revisions.\n\n*Field*\n\n: An individual typed, settable component of a label. A label can have zero or\n more fields associated with it. Selection and user fields can be set with\n multiple values if the field is configured with\n [`ListOptions`](/workspace/drive/labels/reference/rest/v2/labels#listoptions) in the\n [Google Drive Labels API](/workspace/drive/labels/guides/overview).\n\n *Field type*\n : The data type of the value associated with the *field*. Configurable as\n integer, dateString, text, user, or selection. The type chosen impacts\n both the valid values applicable to Drive items and the\n search query options available.\n\n*Label taxonomy*\n\n: The configured label fields available to users for application to\n Drive files. Readable and writable through the\n Drive Labels API. Also known as the label schema.\n\n*Label revision*\n\n: An instance of the label. Anytime a label is created, updated, published, or\n deprecated, the label revision increments.\n\n *Draft revision*\n : The revision number of the current draft instance of the label. You can\n make several updates to a label, each incrementing its draft revision\n number, without affecting the published revision. The ability to have\n draft labels lets you test label updates before publishing.\n\n *Published revision*\n : The revision number of the published version of a label. The published\n label is the instance of the label available to users.\n\nRelated topics\n--------------\n\n- To learn about using labels in Drive, see [Set a label field\n on a file](/workspace/drive/api/guides/set-label).\n- Learn more about the [Drive Labels API](/workspace/drive/labels/guides/overview)."]]