...
align | center |
---|
...
On This Page
Table of Contents |
---|
Overview
There are two filters available that allow you to filter content by date range or age.
Filter by Date Range
This filter allows you to include or exclude items based on the “created on” and/or “modified on” date. Use the After and Before fields to specify the dates you want to use.
...
Age
This filter allows you to filter content based on the age of the “created on” and/or “modified on” date. Use the Within the last field to set the number of days that corresponds to the age you want to use as a filter.
...
Filter Using the REST API
Items may be filtered by dates using the filter_date
or date
rule type. Date filter rules have two attributes: targets
and range
. Date filters are applied based on either a fixed date range or a sliding range. The examples below show the difference between these two methods.
Attributes
Attribute | Description |
---|---|
| An array of date targets to which the filter applies. These targets include: |
| The
|
| filter_date or |
Example 1
The following example excludes files created between June 25, 2017 and August 25, 2017 from being transferred from the source.
Code Block |
---|
{
...
"transfer": {
...
"filter": {
"source": [{
"action": "exclude",
"rules": [{
"targets": "created_on",
"range": {
"type": "range",
"from": 1508457600,
"to": 1508544000
},
"type": "filter_date"
}
],
"type": "filter_rule"
}
]
}
}
...
} |
Example 2
The following example will only transfer files modified within the last five days.
Code Block |
---|
{
...
"transfer": {
...
"filter": {
"source": [{
"action": "include",
"rules": [{
"targets": "modified_on",
"range": {
"type": "day",
"value": 5
},
"type": "filter_date"
}
],
"type": "filter_rule"
}
]
}
}
...
} |