Syncplicity Support

Search our knowledgebase to get the help you need, today

Follow

Filter by size

Files can be filtered by their size via the filter_size filter type. The filter accepts three attributes: min, max, and type. The min and max attributes are both optional, but at least one must be defined. Define both attribute values to define a range of file sizes.

Filter by Size Attribute Table

Attribute

Description

minThe minimum file size in bytes. Files with a size less than this value match the filter.
maxThe maximum file size in bytes. Files with a size greater than this value match the filter.
typefilter_size or size are the only allowable values for this filter type. Both values signify the same filter.

Example 1 - DataHub API

The example below excludes any file over 1024 bytes in size transferred to the destination.

POST {{url}}v1/jobs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

{
    "name":"Sample Job | Do not transfer any file over 1024 bytes in size to the Destination",
    "kind": "transfer",
    "transfer": {
      "transfer_type": "copy",
      "audit_level": "trace",
      "batch_mode": "always",
      "conflict_resolution": "latest",
      "delete_propagation": "ignore_both",
      "failure_policy": "continue",
      "large_item": "skip",
      "lock_propagation": "ignore",
      "max_items_per_container": 10000,
      "performance": {
                "parallel_writes": {
                    "requested": 2
                }
      },         
      "permissions": {
            "policy": "add",
            "links": true,
            "failures": "exceptions"
      },
      "preserve_owners": true,
      "timestamps": true,
      "empty_containers": "create",
      "duplicate_names": "rename",
      "item_overwrite": "overwrite",
      "restricted_content": "convert",
      "segment_transform": true,
      "versioning": {
            "preserve": "native",
            "select": "all"
      },
         "group_map": {
         "id": "{{group_map_id}}",
         "type": "group_map"
      },
      "account_map": {
         "id": "{{account_map_id}}",
         "type": "account_map"
    },
        "filter":{
         "source":[
            {
               "action":"exclude",
               "rules":[
                  {
                  "rules": [{
                    "max": 1024,
                    "type": "filter_size"
                        }],
                     "type":"filter_size"
                  }
               ],
               "type":"filter_rule"
            }
         ]
        },       
        "source": {
            "connection": { "id": "{{cloud_connection_source}}" },
            "impersonate_as": { "email": "joe@smith.com" },
            "target": {
                "path": "/sourcePath"
            }
        },
        "destination": {
            "connection": { "id": "{{cloud_connection_destination}}" },
            "impersonate_as": { "email": "joe@smith.com" },
            "target": {
                "path": "/destinationPath"
            }
        },
        "simulation_mode": false
    },
    "schedule": {
        "mode": "manual"
    },
    "stop_policy": {
        "on_success": 5,
        "on_failure": 5,
        "on_execute": 25
    },
    "category": {
      "name": "Reports | Jobs with Exclude Size Filters"
    }
}

Powered by Zendesk