You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/models/Sync.md
+68-46Lines changed: 68 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@
14
14
"dest_path": "example",
15
15
"src_remote_server_id": 1,
16
16
"dest_remote_server_id": 1,
17
+
"src_site_id": 1,
18
+
"dest_site_id": 1,
17
19
"two_way": true,
18
20
"keep_after_copy": true,
19
21
"delete_empty_folders": true,
@@ -81,6 +83,8 @@
81
83
*`dest_path` (string): Absolute destination path for the sync
82
84
*`src_remote_server_id` (int64): Remote server ID for the source (if remote)
83
85
*`dest_remote_server_id` (int64): Remote server ID for the destination (if remote)
86
+
*`src_site_id` (int64): Source site ID if syncing from a child or partner site
87
+
*`dest_site_id` (int64): Destination site ID if syncing to a child or partner site
84
88
*`two_way` (boolean): Is this a two-way sync?
85
89
*`keep_after_copy` (boolean): Keep files after copying?
86
90
*`delete_empty_folders` (boolean): Delete empty folders after sync?
@@ -135,49 +139,57 @@ await Sync.find(id)
135
139
136
140
```
137
141
await Sync.create({
138
-
'name': "example",
142
+
'delete_empty_folders': true,
139
143
'description': "example",
140
-
'src_path': "example",
141
144
'dest_path': "example",
142
-
'src_remote_server_id': 1,
143
145
'dest_remote_server_id': 1,
144
-
'keep_after_copy': false,
145
-
'delete_empty_folders': false,
146
-
'disabled': false,
147
-
'interval': "week",
148
-
'trigger': "example",
149
-
'trigger_file': "example",
146
+
'dest_site_id': 1,
147
+
'disabled': true,
148
+
'exclude_patterns': ["example"],
150
149
'holiday_region': "us_dc",
151
-
'sync_interval_minutes': 1,
150
+
'include_patterns': ["example"],
151
+
'interval': "week",
152
+
'keep_after_copy': true,
153
+
'name': "example",
152
154
'recurring_day': 25,
153
-
'schedule_time_zone': "Eastern Time (US & Canada)",
154
155
'schedule_days_of_week': [0,2,4],
156
+
'schedule_time_zone': "Eastern Time (US & Canada)",
155
157
'schedule_times_of_day': ["06:30","14:30"],
158
+
'src_path': "example",
159
+
'src_remote_server_id': 1,
160
+
'src_site_id': 1,
161
+
'sync_interval_minutes': 1,
162
+
'trigger': "example",
163
+
'trigger_file': "example",
156
164
'workspace_id': 1,
157
165
})
158
166
```
159
167
160
168
161
169
### Parameters
162
170
163
-
*`name` (string): Name for this sync job
164
-
*`description` (string): Description for this sync job
165
-
*`src_path` (string): Absolute source path
166
-
*`dest_path` (string): Absolute destination path
167
-
*`src_remote_server_id` (int64): Remote server ID for the source
168
-
*`dest_remote_server_id` (int64): Remote server ID for the destination
169
-
*`keep_after_copy` (boolean): Keep files after copying?
170
171
*`delete_empty_folders` (boolean): Delete empty folders after sync?
172
+
*`description` (string): Description for this sync job
173
+
*`dest_path` (string): Absolute destination path for the sync
174
+
*`dest_remote_server_id` (int64): Remote server ID for the destination (if remote)
175
+
*`dest_site_id` (int64): Destination site ID if syncing to a child or partner site
171
176
*`disabled` (boolean): Is this sync disabled?
172
-
*`interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
173
-
*`trigger` (string): Trigger type: daily, custom_schedule, or manual
174
-
*`trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
177
+
*`exclude_patterns` (array(string)): Array of glob patterns to exclude
175
178
*`holiday_region` (string): If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
176
-
*`sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
179
+
*`include_patterns` (array(string)): Array of glob patterns to include
180
+
*`interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
181
+
*`keep_after_copy` (boolean): Keep files after copying?
182
+
*`name` (string): Name for this sync job
177
183
*`recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
178
-
*`schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
179
184
*`schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
185
+
*`schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
180
186
*`schedule_times_of_day` (array(string)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. Times of day in HH:MM format.
187
+
*`src_path` (string): Absolute source path for the sync
188
+
*`src_remote_server_id` (int64): Remote server ID for the source (if remote)
189
+
*`src_site_id` (int64): Source site ID if syncing from a child or partner site
190
+
*`sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
191
+
*`trigger` (string): Trigger type: daily, custom_schedule, or manual
192
+
*`trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
181
193
*`workspace_id` (int64): Workspace ID this sync belongs to
182
194
183
195
---
@@ -218,48 +230,56 @@ await sync.manual_run()
218
230
const sync = await Sync.find(id)
219
231
220
232
await sync.update({
221
-
'name': "example",
233
+
'delete_empty_folders': true,
222
234
'description': "example",
223
-
'src_path': "example",
224
235
'dest_path': "example",
225
-
'src_remote_server_id': 1,
226
236
'dest_remote_server_id': 1,
227
-
'keep_after_copy': false,
228
-
'delete_empty_folders': false,
229
-
'disabled': false,
230
-
'interval': "week",
231
-
'trigger': "example",
232
-
'trigger_file': "example",
237
+
'dest_site_id': 1,
238
+
'disabled': true,
239
+
'exclude_patterns': ["example"],
233
240
'holiday_region': "us_dc",
234
-
'sync_interval_minutes': 1,
241
+
'include_patterns': ["example"],
242
+
'interval': "week",
243
+
'keep_after_copy': true,
244
+
'name': "example",
235
245
'recurring_day': 25,
236
-
'schedule_time_zone': "Eastern Time (US & Canada)",
237
246
'schedule_days_of_week': [0,2,4],
247
+
'schedule_time_zone': "Eastern Time (US & Canada)",
238
248
'schedule_times_of_day': ["06:30","14:30"],
249
+
'src_path': "example",
250
+
'src_remote_server_id': 1,
251
+
'src_site_id': 1,
252
+
'sync_interval_minutes': 1,
253
+
'trigger': "example",
254
+
'trigger_file': "example",
239
255
})
240
256
```
241
257
242
258
### Parameters
243
259
244
260
*`id` (int64): Required - Sync ID.
245
-
*`name` (string): Name for this sync job
246
-
*`description` (string): Description for this sync job
247
-
*`src_path` (string): Absolute source path
248
-
*`dest_path` (string): Absolute destination path
249
-
*`src_remote_server_id` (int64): Remote server ID for the source
250
-
*`dest_remote_server_id` (int64): Remote server ID for the destination
251
-
*`keep_after_copy` (boolean): Keep files after copying?
252
261
*`delete_empty_folders` (boolean): Delete empty folders after sync?
262
+
*`description` (string): Description for this sync job
263
+
*`dest_path` (string): Absolute destination path for the sync
264
+
*`dest_remote_server_id` (int64): Remote server ID for the destination (if remote)
265
+
*`dest_site_id` (int64): Destination site ID if syncing to a child or partner site
253
266
*`disabled` (boolean): Is this sync disabled?
254
-
*`interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
255
-
*`trigger` (string): Trigger type: daily, custom_schedule, or manual
256
-
*`trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
267
+
*`exclude_patterns` (array(string)): Array of glob patterns to exclude
257
268
*`holiday_region` (string): If trigger is `custom_schedule`, the sync will check if there is a formal, observed holiday for the region, and if so, it will not run.
258
-
*`sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
269
+
*`include_patterns` (array(string)): Array of glob patterns to include
270
+
*`interval` (string): If trigger is `daily`, this specifies how often to run this sync. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
271
+
*`keep_after_copy` (boolean): Keep files after copying?
272
+
*`name` (string): Name for this sync job
259
273
*`recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
260
-
*`schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
261
274
*`schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
275
+
*`schedule_time_zone` (string): If trigger is `custom_schedule`, Custom schedule Time Zone for when the sync should be run.
262
276
*`schedule_times_of_day` (array(string)): If trigger is `custom_schedule`, Custom schedule description for when the sync should be run. Times of day in HH:MM format.
277
+
*`src_path` (string): Absolute source path for the sync
278
+
*`src_remote_server_id` (int64): Remote server ID for the source (if remote)
279
+
*`src_site_id` (int64): Source site ID if syncing from a child or partner site
280
+
*`sync_interval_minutes` (int64): Frequency in minutes between syncs. If set, this value must be greater than or equal to the `remote_sync_interval` value for the site's plan. If left blank, the plan's `remote_sync_interval` will be used. This setting is only used if `trigger` is empty.
281
+
*`trigger` (string): Trigger type: daily, custom_schedule, or manual
282
+
*`trigger_file` (string): Some MFT services request an empty file (known as a trigger file) to signal the sync is complete and they can begin further processing. If trigger_file is set, a zero-byte file will be sent at the end of the sync.
0 commit comments