סנכרון של סביבת עבודה עם גרסת הקונטיינר האחרונה על ידי עדכון כל הישויות של סביבת העבודה שלא בוצעו בהן שינויים, והצגת התנגשויות עבור ישויות שהשתנו. רוצים לנסות עכשיו?
בקשה
בקשת HTTP
POST https://www.googleapis.com/tagmanager/v2/+path:sync
פרמטרים
שם הפרמטר | Value | התיאור |
---|---|---|
פרמטרים של נתיב | ||
path |
string |
הנתיב היחסי ל-API של GTM Workspace. דוגמה: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id} |
הרשאות
בקשה זו מחייבת הרשאה בהיקף הבא:
היקף |
---|
https://www.googleapis.com/auth/tagmanager.edit.containers |
מידע נוסף זמין בדף אימות והרשאה.
גוף הבקשה
אל תספקו גוף הבקשה בשיטה הזו.
תשובה
אם הפעולה בוצעה ללא שגיאות, השיטה הזו מחזירה גוף תגובה במבנה הבא:
{ "syncStatus": { "mergeConflict": boolean, "syncError": boolean }, "mergeConflict": [ { "entityInWorkspace": { "tag": accounts.containers.workspaces.tags Resource, "trigger": accounts.containers.workspaces.triggers Resource, "variable": accounts.containers.workspaces.variables Resource, "folder": accounts.containers.workspaces.folders Resource, "client": accounts.containers.workspaces.clients Resource, "transformation": accounts.containers.workspaces.transformations Resource, "changeStatus": string }, "entityInBaseVersion": { "tag": accounts.containers.workspaces.tags Resource, "trigger": accounts.containers.workspaces.triggers Resource, "variable": accounts.containers.workspaces.variables Resource, "folder": accounts.containers.workspaces.folders Resource, "client": accounts.containers.workspaces.clients Resource, "transformation": accounts.containers.workspaces.transformations Resource, "changeStatus": string } } ] }
שם הנכס | Value | התיאור | הערות |
---|---|---|---|
syncStatus |
nested object |
מציין אם הסנכרון גרם להתנגשות במיזוג או לשגיאה בסנכרון. | |
syncStatus.mergeConflict |
boolean |
פעולת הסנכרון זוהתה התנגשות מיזוג. | |
syncStatus.syncError |
boolean |
אירעה שגיאה במהלך פעולת הסנכרון. | |
mergeConflict[] |
list |
התנגשות המיזוג אחרי הסנכרון. אם השדה הזה לא ריק, הסנכרון עדיין יטופל כבוצע בהצלחה. עם זאת, אי אפשר ליצור גרסה לפני שכל ההתנגשויות ייפתרו. | |
mergeConflict[].entityInWorkspace |
nested object |
ישות סביבת העבודה שיש בה שינויים מתנגשים בהשוואה לגרסת הבסיס. אם ישות נמחקת בסביבת עבודה, היא עדיין תופיע עם סטטוס השינוי שנמחק. | |
mergeConflict[].entityInWorkspace.tag |
nested object |
התג שמיוצג על ידי הישות. | |
mergeConflict[].entityInWorkspace.trigger |
nested object |
הטריגר שמיוצג על ידי הישות. | |
mergeConflict[].entityInWorkspace.variable |
nested object |
המשתנה שמיוצג על ידי הישות. | |
mergeConflict[].entityInWorkspace.folder |
nested object |
התיקייה המיוצגת על ידי הישות. | |
mergeConflict[].entityInWorkspace.changeStatus |
string |
מייצג את שינוי הישות בסביבת העבודה.
הערכים הקבילים הם:
|
|
mergeConflict[].entityInBaseVersion |
nested object |
הישות של גרסת הבסיס (מאז פעולת הסנכרון האחרונה) שיש בה שינויים מתנגשים בהשוואה לסביבת העבודה. אם השדה הזה חסר, המשמעות היא שהישות של סביבת העבודה נמחקת מגרסת הבסיס. | |
mergeConflict[].entityInBaseVersion.tag |
nested object |
התג שמיוצג על ידי הישות. | |
mergeConflict[].entityInBaseVersion.trigger |
nested object |
הטריגר שמיוצג על ידי הישות. | |
mergeConflict[].entityInBaseVersion.variable |
nested object |
המשתנה שמיוצג על ידי הישות. | |
mergeConflict[].entityInBaseVersion.folder |
nested object |
התיקייה המיוצגת על ידי הישות. | |
mergeConflict[].entityInBaseVersion.changeStatus |
string |
מייצג את שינוי הישות בסביבת העבודה.
הערכים הקבילים הם:
|
|
mergeConflict[].entityInWorkspace.client |
nested object |
הלקוח המיוצג על ידי הישות. | |
mergeConflict[].entityInBaseVersion.client |
nested object |
הלקוח המיוצג על ידי הישות. | |
mergeConflict[].entityInWorkspace.transformation |
nested object |
הטרנספורמציה שמיוצגת על ידי הישות. | |
mergeConflict[].entityInBaseVersion.transformation |
nested object |
הטרנספורמציה שמיוצגת על ידי הישות. |
רוצה לנסות?
ניתן להשתמש ב-APIs Explorer שבהמשך כדי לקרוא לשיטה הזו בנתונים בזמן אמת ולראות את התגובה.