Filtering data is possible by two types of criteria: properties of the article (author, section, topic...) or properties of traffic (campaign_source, referrer, reader type...). The availability of these filtering options are dependant on parameter cpi_perspective.
In the traffic perspective (cpi_perspective = 0) all filtering options are possible.
In the article perspective (cpi_perspective = 1) only properties of articles are available.
See this article for an explanation of how different CPI perspectives work.
Filtering is given in JSON format, where each criterion consists of three parts:
- field
- operator
- value
Example where we are asking for all articles writen by author with ID 97 published in section with ID 9:
[
{
"field":"author",
"operator":"IN",
"value":"97"
},
{
"field":"section",
"operator":"IN",
"value":"9"
}
]
Available fields:
Fields with green names are properties of articles and can be used always. Fields with orange names are properties of traffic and can be used only with traffic perspective.
- author
possible value: specific author id - section
possible value: specific section id - topic
possible value: specific topic id - article_subs_type
possible value: free, paid, preview - campaign
possible value: name of campaign - campaign_source
possible value: name of campaign source - campaign_medium
possible value: name of campaign medium - channel
possible value: name of the channel - device_type
possible value: Desktop, Mobile, Tablet, Other - reader_type
possible value: Anonymous, Registered, Subscribed - referrer
possible value: name of the referrer - referrer_type
possible value: specific referrer type id (Social - 1, Search - 2, Internal - 3, Direct - 4, Other - 5, Promoted - 6)
Available operators:
- NOT_NULL
- IS_NULL
- EQUAL
- EQUAL_TYPE
- NOT_EQUAL
- GREATER_THAN
- GREATER_THAN_OR_EQUAL
- LESS_THAN
- LESS_THAN_OR_EQUAL
- IN_RANGE
- NOT_IN_RANGE
- CONTAIN
- NOT_CONTAIN
- IN
- NOT_IN