Job Filters: Filter By Size
On This Page
Overview
This filter allows you to filter content based on its size. You can filter all files greater than or less than a specified size. You can also use a combination of both. Note that the size is in bytes.
Filter Using REST API
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.
Attributes
Attribute | Description |
---|---|
| The minimum file size in bytes. Files with a size less than this value match the filter. |
| The maximum file size in bytes. Files with a size greater than this value match the filter. |
|
|
Example
The example below excludes any file over 1024 bytes in size transferred to the destination.
{
"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"
}
}